This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Dear TI Team,
I have a runtime problem in "Release" Mode. When all my code runs in Flash memory space, the runtime of my code is too slow to work.
So i inserted the following lines in *.cmd file:
.TI.ramfunc : LOAD = FLASH_BANK0_SEC1_2,
RUN = RAMLS3456,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)
.TI.ramfunc2 : LOAD = FLASH_BANK0_SEC3_4,
RUN = RAMGS2,
LOAD_START(_Ramfuncs2LoadStart),
LOAD_SIZE(_Ramfuncs2LoadSize),
LOAD_END(_Ramfuncs2LoadEnd),
RUN_START(_Ramfuncs2RunStart),
RUN_SIZE(_Ramfuncs2RunSize),
RUN_END(_Ramfuncs2RunEnd),
PAGE = 0, ALIGN(4)
".TI.ramfunc" i used for time-critical functions and ".TI.ramfunc2" for some user functions.
After that change my application works most of time good, but sometimes the calculated value in my measuring process is not correct.
If my application runs in debug mode (all code is executed in RAM) the calculated value is always correct. So I suspect that i had to copy the rts2800_fpu32.lib code to a RAM section, too.
I tried to do this with the following code lines in the *.cmd file:
RTS2800_FPU32:
{
rts2800_fpu32.lib(.econst)
rts2800_fpu32.lib(.text)
} LOAD = FLASH_BANK0_SEC7,
RUN = RAMGS3,
LOAD_START(_Ramfuncs3LoadStart),
LOAD_SIZE(_Ramfuncs3LoadSize),
LOAD_END(_Ramfuncs3LoadEnd),
RUN_START(_Ramfuncs3RunStart),
RUN_SIZE(_Ramfuncs3RunSize),
RUN_END(_Ramfuncs3RunEnd),
PAGE = 0, ALIGN(4)
But than i get the following error message:
"../28004x_generic_flash_lnk.cmd", line 114: error #10008-D: cannot find file "rts2800_fpu32.lib"
The path to the library is correct , i think.
Because without the erroneous lines in the *.cmd file the rts2800_fpu32.lib code is linked to the following flash sections:
.text.1 0 00081f50 000010af
00081f50 0000057c measure.obj (.text)
000824cc 000004e8 host.obj (.text)
000829b4 00000495 f28004x_defaultisr.obj (.text:retain)
00082e49 00000107 global.obj (.text)
00082f50 0000009c rts2800_fpu32.lib : fd_add28.asm.obj (.text)
00082fec 00000010 f28004x_pievect.obj (.text)
00082ffc 00000002 rts2800_fpu32.lib : pre_init.c.obj (.text)
00082ffe 00000001 : startup.c.obj (.text)
.text.2 0 00084cb4 0000034b
00084cb4 000002f5 f28004x_sysctrl.obj (.text)
00084fa9 00000056 rts2800_fpu32.lib : boot28.asm.obj (.text)
.text.3 0 00085298 00000d64
00085298 00000487 test.obj (.text)
0008571f 0000036e f28004x_dma.obj (.text)
00085a8d 000002df test.obj (.text:retain)
00085d6c 00000251 rts2800_fpu32.lib : e_log10.c.obj (.text)
00085fbd 00000031 : atoi.c.obj (.text)
00085fee 0000000e : fd_sub28.asm.obj (.text)
.text.4 0 00086660 00000999
00086660 00000222 f28004x_gpio.obj (.text)
00086882 00000204 hv.obj (.text)
00086a86 000000f5 main.obj (.text)
00086b7b 000000ef adc.obj (.text)
00086c6a 000000d1 temperature.obj (.text)
00086d3b 000000c5 f28004x_spi.obj (.text)
00086e00 000000b5 vca.obj (.text)
00086eb5 0000008b rts2800_fpu32.lib : fd_div28.asm.obj (.text)
00086f40 00000083 : fd_mpy28.asm.obj (.text)
00086fc3 0000002d spi.obj (.text)
00086ff0 00000009 rts2800_fpu32.lib : _lock.c.obj (.text)
.text.5 0 00087000 00000436
00087000 0000007f parameter.obj (.text)
0008707f 00000072 dma.obj (.text)
000870f1 00000061 f28004x_adc.obj (.text)
00087152 0000005c f28004x_cputimers.obj (.text)
000871ae 00000055 laser.obj (.text)
00087203 00000046 hvPwm.obj (.text)
00087249 0000002a rts2800_fpu32.lib : fd_cmp28.asm.obj (.text)
00087273 0000002a : l_div28.asm.obj (.text)
0008729d 00000029 : exit.c.obj (.text)
000872c6 00000028 f28004x_piectrl.obj (.text)
000872ee 00000024 cpld.obj (.text)
00087312 00000024 rts2800_fpu32.lib : cpy_tbl.c.obj (.text)
00087336 00000023 : fd_tofsfpu32.asm.obj (.text)
00087359 0000001e : memcpy.c.obj (.text)
00087377 0000001d : i_tofd28.asm.obj (.text)
00087394 0000001c : fs_tofdfpu32.asm.obj (.text)
000873b0 0000001c : l_tofd28.asm.obj (.text)
000873cc 0000001a error.obj (.text)
000873e6 00000019 rts2800_fpu32.lib : args_main.c.obj (.text)
000873ff 00000018 : ll_aox28.asm.obj (.text)
00087417 00000016 : ul_tofd28.asm.obj (.text)
0008742d 00000009 : fd_neg28.asm.obj (.text)
Can you tell my what i made wrong ?
Regards,
Horst Essig
Can you tell me what to do ?
Hi,
Can you try giving the complete path of rts2800_fpu32.lib path such as c:\ti\ccs910\ccs\tools\compiler\ti-cgt-c2000_18.12.2.LTS\lib\rts2800_fpu32.lib?
In the project properties of "File search path" you may find both the library name and path are provided. Similar path is needed to be mentioned in the linker command file if the library is not in the default project folder.
Hope this helps.
Thanks,
Katta
Hi,
You need to use --library option as shown below while defining sections for libraries. Refer to TI Linker command File primer for more details.
http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
RTS2800_FPU64: { --library=rts2800_fpu64_eabi.lib(.text) } LOAD = FLASH3, RUN = RAMGS3, LOAD_START(_Ramfuncs3LoadStart), LOAD_SIZE(_Ramfuncs3LoadSize), LOAD_END(_Ramfuncs3LoadEnd), RUN_START(_Ramfuncs3RunStart), RUN_SIZE(_Ramfuncs3RunSize), RUN_END(_Ramfuncs3RunEnd), ALIGN(4)
Thanks
Vasudha
Hi,
the problem was not the path. I find a hint in another post, that i had to leave some code in flash memory and only copying the remaining functions.
I had managed this with the following lines inserted in the *.cmd file:
rts2800_fpu32_FLASH: > FLASH_BANK0_SEC7, PAGE = 0
{
rts2800_fpu32.lib <boot28.asm.obj> (.text)
rts2800_fpu32.lib <exit.c.obj> (.text)
rts2800_fpu32.lib <args_main.c.obj> (.text)
rts2800_fpu32.lib <pre_init.c.obj> (.text)
rts2800_fpu32.lib <startup.c.obj> (.text)
}
rts2800_fpu32_RAM : LOAD = FLASH_BANK0_SEC7,
RUN = RAMLS2,
LOAD_START(_FpuLibLoadStart),
LOAD_SIZE(_FpuLibLoadSize),
LOAD_END(_FpuLibLoadEnd),
RUN_START(_FpuLibRunStart),
{
rts2800_fpu32.lib <*> (.text)
}
RUN_SIZE(_FpuLibRunSize),
RUN_END(_FpuLibRunEnd),
PAGE = 0, ALIGN(4)
But unfortunately my runtime problem already exists.
I am trying to copy all other functions in RAM sections, now.
I hope i will find the function which is responsible for the runtime problem.
Regards,
Horst Essig