[En-Nut-Discussion] Debugging on SAM7x256

Krzysztof Sroczyński k.sroczynski at gmail.com
Mon Mar 8 16:20:56 CET 2010


Hi!
For some time I am trying to start debuging Nut/OS(4.9.8) on my SAM7x256
from propox (http://www.propox.com/products/t_208.html).
I used manual from yagarto:
http://www.yagarto.de/howto/debugnutos/index.html
Added arm linker script is: at91_ram
Settings of configuration file (at91sam7x-ek.conf): platform arm-gccdbg,
programmer: arm-oocd.
Compilation of Nut/OS is ok.
The problem takes place when I try to compile example httpd project, i got
response from compiler:

C:\ethernut\nutapp\httpd>make all
arm-elf-gcc -c -I../../nutbld/include  -I../../nut/include  -DAT91SAM7X_EK
-mcpu=arm7tdmi -mthumb-interwork -Os -Wall -Wstrict-prototypes
-Wa,-a=httpserv.lst  -o httpserv.o httpserv.c
crurom -r -ourom.c sample
arm-elf-gcc -c -I../../nutbld/include  -I../../nut/include  -DAT91SAM7X_EK
-mcpu=arm7tdmi -mthumb-interwork -Os -Wall -Wstrict-prototypes
-Wa,-a=urom.lst  -o urom.o urom.c
arm-elf-gcc httpserv.o urom.o -mcpu=arm7tdmi -nostartfiles
-T../../nut/arch/arm/ldscripts/at91_ram.ld
-Wl,-Map=httpserv.map,--cref,--no-warn-mismatch -L../../nutbld/lib
-Wl,--start-group ../../nutbld/lib/nutinit.o  -lnutpro -lnutos -lnutarch
-lnutdev -lnutgorp -lnutnet -lnutfs -lnutcrt  -Wl,--end-group -o
httpserv.elf
c:/program
files/yagarto/bin/../lib/gcc/arm-elf/4.4.1/../../../../arm-elf/bin/ld.exe:
error: no memory region specified for loadable section `.ramfunc'
collect2: ld returned 1 exit status
make: *** [httpserv.elf] Error 1

I know that in script file there is no entry for it, and I think it should
look like this:

  .data :
  {
    PROVIDE (__data_start = .);
    *(.data)
    *(.data.*)
    *(.gnu.linkonce.d*)
    SORT(CONSTRUCTORS) /* this entry is in the Anglia example */
    /* CONSTRUCTORS */ /* this entry is in the devkitarm script but not in
the Anglia example */
    . = ALIGN(4);
   *(.ramfunc) /* here your ramsection will be located */
    edata = .;
    _edata = .;
    PROVIDE (__data_end = .);
  } > ram

So I made another compilation of Nut/OS i this time i got  error message:

C:\ethernut\nutapp\httpd>make all
arm-elf-gcc -c -I../../nutbld/include  -I../../nut/include  -DAT91SAM7X_EK
-mcpu=arm7tdmi -mthumb-interwork -Os -Wall -Wstrict-prototypes
-Wa,-a=httpserv.lst  -o httpserv.o httpserv.c
crurom -r -ourom.c sample
arm-elf-gcc -c -I../../nutbld/include  -I../../nut/include  -DAT91SAM7X_EK
-mcpu=arm7tdmi -mthumb-interwork -Os -Wall -Wstrict-prototypes
-Wa,-a=urom.lst  -o urom.o urom.c
arm-elf-gcc httpserv.o urom.o -mcpu=arm7tdmi -nostartfiles
-T../../nut/arch/arm/ldscripts/at91_ram.ld
-Wl,-Map=httpserv.map,--cref,--no-warn-mismatch -L../../nutbld/lib
-Wl,--start-group ../../nutbld/lib/nutinit.o  -lnutpro -lnutos -lnutarch
-lnutdev -lnutgorp -lnutnet -lnutfs -lnutcrt  -Wl,--end-group -o
httpserv.elf
../../nutbld/lib\crtat91_ram.o:(.init1+0x10): undefined reference to
`PS_BASE'
collect2: ld returned 1 exit status
make: *** [httpserv.elf] Error 1

If I put PS_BASE to 0xFFFF4000 compilation is ok. But the program never run.

I am using SAM-ICE and Wiggler as a programmer/debugger.
-- 
Regards,
Krzysztof Sroczynski



More information about the En-Nut-Discussion mailing list