Undefined reference to __tdata_load_start__ in crt0.s
Using:
CrossWorks for ARM
Release 4.0.3.2017073100.32958
Windows x64
At linkage, this is what I get:
1>Linking XXX_LPC24xx.elf from project 'Airborne_LPC24xx' in configuration 'ARM Flash Release'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `memory_set':
1>(.init+0x270): undefined reference to `__tdata_load_start__'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `memory_set':
1>(.init+0x274): undefined reference to `__tdata_start__'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `memory_set':
1>(.init+0x278): undefined reference to `__tdata_end__'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `memory_set':
1>(.init+0x284): undefined reference to `__tbss_start__'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `memory_set':
1>(.init+0x288): undefined reference to `__tbss_end__'
1>XXX_LPC24xx ARM Flash Release/crt0.o: In function `__aeabi_read_tp':
1>(.text.__aeabi_read_tp+0x8): undefined reference to `__tbss_start__'
There were 1 build errors
In source/crt0.s, this is probably where it fails?
ldr r0, =__tdata_load_start__
ldr r1, =__tdata_start__
ldr r2, =__tdata_end__
bl memory_copy
-
The standard startup files crt0.s and thumb_crt0.s now initialise the tdata and tbss sections. It sounds like you are using an old section placement file that doesn't place these sections. To fix this you will need to modify your section placement file as follows.
For RAM based placement files you will need to add the following to the RAM segment:
<ProgramSection alignment="4" load="No" name=".tbss"/> <ProgramSection alignment="4" load="Yes" name=".tdata"/>
For FLASH based placement files you will need to add the following to the FLASH segment:
<ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
and the following to the RAM segment:
<ProgramSection alignment="4" load="No" name=".tbss"/> <ProgramSection alignment="4" load="No" name=".tdata_run"/>
Please sign in to leave a comment.
Comments
1 comment