Hi,
Thanks for the help, TonyB and Sergey. I followed your recommendations (and also tried several other different options), but it
still doesn't work, I always get the same errors:
opt/mspgcc/lib/gcc-lib/msp430/3.2.3/libgcc.a(_copy_data.o): In function `__do_copy_data':
(.init4+0x2): undefined reference to `__data_size'
/opt/mspgcc/lib/gcc-lib/msp430/3.2.3/libgcc.a(_copy_data.o): In function `__do_copy_data':
(.init4+0xc): undefined reference to `__data_load_start'
/opt/mspgcc/lib/gcc-lib/msp430/3.2.3/libgcc.a(_clear_bss.o): In function `__do_clear_bss':
(.init4+0x2): undefined reference to `__bss_size'

Basically compiling the mspgcc toolchain works fine, with both gcc-4.1 and gcc-3.4. I applied all patches and carefully followed all the instructions provided, etc. etc. I think that it's "just" a problem of telling the linker to load/execute the right files/script. In fact, I looked in the /opt/mspgcc tree and I could see that the undefined data types (__bss_size, etc.) are actually defined in
the linker script files ($ARCH is actually 1612 for me):
/msp430/lib/ldscripts/msp430x$ARCH.x | xn | xr etc.

If I add /msp430/lib/ldscripts/msp430x1612.xn in the command line for the linker then it works! but I get some warnings:

/opt/mspgcc/bin/msp430-ld:/opt/mspgcc/msp430/lib/ldscripts/msp430x1612.xn:6: warning: redeclaration of memory region 'text' /opt/mspgcc/bin/msp430-ld:/opt/mspgcc/msp430/lib/ldscripts/msp430x1612.xn:7: warning: redeclaration of memory region 'data' /opt/mspgcc/bin/msp430-ld:/opt/mspgcc/msp430/lib/ldscripts/msp430x1612.xn:9: warning: redeclaration of memory region 'bootloader' /opt/mspgcc/bin/msp430-ld:/opt/mspgcc/msp430/lib/ldscripts/msp430x1612.xn:10: warning: redeclaration of memory region 'infomem' /opt/mspgcc/bin/msp430-ld:/opt/mspgcc/msp430/lib/ldscripts/msp430x1612.xn:11: warning: redeclaration of memory region 'infomemnobits'

Any idea about what should I do in order to avoid the 'trick' to add directly a link script file to the linking command line?

Thanks!

Reply via email to