Re: [uClinux-dev] kernel module and static

2007-05-07 Thread Stéphane
Hi, Thanks a lot everybody, the "-m68000" was missing and require! Greg Ungerer a écrit : > Hi Stephane, > > Stéphane wrote: >> In Makefile: >> >> // >> >> INCLUDE := -isystem ../uClinux-dist-20060803/linux-2.4.x/include >> CFLAGS := -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Greg Ungerer
Hi Stephane, Stéphane wrote: In Makefile: // INCLUDE := -isystem ../uClinux-dist-20060803/linux-2.4.x/include CFLAGS := -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} CC := /opt/uClinux-m68k-elf/bin/m68k-elf-gcc ${TARGET}.o: ${TARGET}.c What CPU are you running on? Wh

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Michael Broughton
That MULS.L instruction is definitely wrong. The source effective address mode specified, is not supported in the longword variant of MULS. Is it just me, or does that whole disassembly look strange? Mike Wolfgang Reissnegger wrote: OK, so it seems like the: 2a:4c39 0800 mu

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Wolfgang Reissnegger
OK, so it seems like the: 2a:4c39 0800 mulsl 0 ,%d0 instruction is causing your illegal instruction trap. I would suspect that the CPU you are running does not support multiplication instructions? You can look into the gcc man page to find out if there are any options you can p

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Stéphane
Hi Ok I do that: /opt/m68k-uclinux-tools-20060615/bin/m68k-uclinux-objdump -D xx.o ucAsserv.o: file format elf32-m68k Disassembly of section .text: : 0:4e56 linkw %fp,#0 4:42b9 clrl 0 a:42b9 clrl 0 10:42b9

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Wolfgang Reissnegger
Hi, try to use "objdump -D xx.o" You should see the disassembled section of module_init. Stéphane wrote: Hi I don't exactly know but: objdump -sx xx.o : ucAsserv.o: file format elf32-big ucAsserv.o architecture: UNKNOWN!, flags 0x0011: HAS_RELOC, HAS_SYMS start address 0x S

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Stéphane
Hi I don't exactly know but: objdump -sx xx.o : ucAsserv.o: file format elf32-big ucAsserv.o architecture: UNKNOWN!, flags 0x0011: HAS_RELOC, HAS_SYMS start address 0x Sections: Idx Name Size VMA LMA File off Algn 0 .text 0058

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Wolfgang Reissnegger
Hi Stéphane, can you also generate an objdump of the module and post it? Stéphane wrote: Hmm, In Makefile: // INCLUDE := -isystem ../uClinux-dist-20060803/linux-2.4.x/include CFLAGS := -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} CC := /opt/uClinux-m68k-elf/bin/m68k-elf

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Stéphane
Hmm, In Makefile: // INCLUDE := -isystem ../uClinux-dist-20060803/linux-2.4.x/include CFLAGS := -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} CC := /opt/uClinux-m68k-elf/bin/m68k-elf-gcc ${TARGET}.o: ${TARGET}.c // and with -S : /*

Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Wolfgang Reissnegger
Hi Stéphane, looks like you are compiling your code with compiler flags that generate instructions that the processor does not support. That's why you see the illegal instruction trap. The reason that it all works if the variables are local is probably that you also use an optimization flag

[uClinux-dev] kernel module and static

2007-05-03 Thread Stéphane
Hi, I have a bug that I can be resume as: /***/ #include // Needed by all modules #include // Needed for KERN_INFO static long global_right_encoder; static long global_left_encoder; static long VitL; int init_module(void) { VitL = 0; global_left_encoder =