Part Number: AM3358
Other Parts Discussed in Thread: SYSBIOS
Tool/software: Code Composer Studio
Hello
I'm having an issue when compiling an application for the tirtos that uses execute in place or XIP.
I generated this linker file by using the RTSC tool in Code Composer (8.3.1.00004) - (see also the attached)
I've attached both files that the RTSC tool produced The icev2AM335x.zip and the icev2XIPAM335x.zip
When using the icev2AM335x selection as shown,
The application works fine and runs.
If I change the board to the icev2XIPAM335x the application fails to link.
The error I get when linking this application to use the GPMC and the NOR Flash address in the GPMC space is the following.
"C:/Tools/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -mtune=cortex-a8 -marm -fno-exceptions -Dam3358 -Dicev2AM335x -DSOC_AM335x -Og -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"rtos_template_app_am335x_a8.map" -nostartfiles -static -Wl,--gc-sections -L"C:/Tools/ti/pdk_am335x_1_0_16/packages/ti/board/lib/gcaAM335x/a8/debug/" -L"C:/Tools/ti/pdk_am335x_1_0_16/packages/ti/csl/lib/am335x/a8/debug/" -L"C:/Tools/ti/bios_6_76_02_02/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 --specs=nano.specs -o"rtos_template_app_am335x_a8.out" "./app.o" "./main.o" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -l:ti.board.aa8fg -l:ti.csl.aa8fg -lgcc -lm -lrdimon -lc -Wl,--end-group
makefile:148: recipe for target 'rtos_template_app_am335x_a8.out' failed
c:/tools/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/hard\libgcc.a(_udivmoddi4.o):(.ARM.exidx+0x0): relocation truncated to fit: R_ARM_PREL31 against `.text'
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [rtos_template_app_am335x_a8.out] Error 1
gmake: *** [all] Error 2
makefile:144: recipe for target 'all' failed
I'm not sure why it is producing this error, because the it should be linked using the base starting address of 0x0801_0010 and any addresses that are relative in the code should be with that as a base.
The demo application I'm trying to compile for XIP is the one found in the {install_path}/processor_sdk_rtos_am335x_6_01_00_08/demos/rtos_template_app which was copied to my workspace.
The linker file for the board is {Wspace}/rtos_template_app_am335x_a8/Debug/configPkg/linker.cmd
Depending on the selection of the board, I'll get one of the these two linker files.
If icev2AM335x is selected the attached linker file (linker.cmd) would be used to link the code for the DDR.
If icev2XIPAM335x is seleced the attached linker file (linker-XIP.cmd - renamed for clarity) would be used to link the code for the NOR.
These look correct for each type of application being built.
What is not happening correctly to get the XIP application to link?
Respectfully,
Alan Hasty.
Since I was unable to attach these files, I've put them on drop box so that you can download them.
www.dropbox.com/.../linker.cmd
www.dropbox.com/.../linker-XIP.cmd
www.dropbox.com/.../icev2XIPAM335x.zip
www.dropbox.com/.../icev2AM335x.zip