Nov 15, 2018
11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 15, 2018
11:52 AM
Been stuggling with the for 2 days not. Trying to use the GNU GCC compiler with the XMCLibs sdk. I am using the GCC startup_XMC1300.S along with the XMC1300x0032.ld
using the following gcc command
with that I keep receiving
I can use -nostartfiles to get rid of it but then I get
Please help! I have been googling for hours!
using the following gcc command
arm-none-eabi-gcc -g -Wall -O0 --specs=nano.specs -mthumb -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -mcpu=cortex-m0 -o prog.out -T XMC1300x0032.ld -DUC_FAMILY=XMC1 -DXMC1302_T016x0032 -DPROD [-I INCLUDE FILES] [SOURCE FILES] startup_XMC1300.S
with that I keep receiving
(.text+0x68): undefined reference to `__bss_start__'
(.text+0x6c): undefined reference to `__bss_end__'
I can use -nostartfiles to get rid of it but then I get
init.c:(.text.__libc_init_array+0x12): undefined reference to `_init'
Please help! I have been googling for hours!
1 Reply
Nov 19, 2018
01:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 19, 2018
01:40 AM
I think you should first compile your .S file, for example:
Afterwards, the following linker command should work:
[edit]
Also make sure to include syscalls.c available from the 'ThirdPartyLibraries' folder of your XMCLib
arm-none-eabi-gcc -mthumb -mcpu=cortex-m0 -MD -I. -I./Libraries/CMSIS/Include -I./Libraries/CMSIS/Infineon/XMC1400_series/Include -I./Libraries/XMCLib/inc -o build/startup_XMC1400.o -c ./Startup/startup_XMC1400.S
Afterwards, the following linker command should work:
arm-none-eabi-gcc -T linker_script.ld -nostartfiles -Xlinker --gc-sections -specs=nano.specs -specs=nosys.specs -mcpu=cortex-m0 -mthumb -o build/main.elf [OBJECT FILES]
[edit]
Also make sure to include syscalls.c available from the 'ThirdPartyLibraries' folder of your XMCLib