Tool/software:
Hi Champs,
I ask this for customer.
There are two projects, project1 and project2 -- these two projects use exactly the same CCS version, exactly the same compiler, the exact same source files (.c, .cla, .h), the exact same cmd file, runs on the same computer.
The cmd file specifies that the allocation for FLASH_BANK0 is as follows:
FLASH_BANK0_SEC1_2_3_4_5_6 : origin = 0x083040, length = 0x003FC0 /* on-chip Flash */
FLASH_BANK0_SEC7_8_9_10 : origin = 0x087000, length = 0x005000 /* on-chip Flash */
FLASH_BANK0_SEC11_12_13_14_15 : origin = 0x08C000, length = 0x004000 /* on-chip Flash */
.cinit : > FLASH_BANK0_SEC1_2_3_4_5_6 | FLASH_BANK0_SEC11_12_13_14_15, PAGE = 0, ALIGN(4)
.text : >> FLASH_BANK0_SEC7_8_9_10 | FLASH_BANK0_SEC1_2_3_4_5_6 | FLASH_BANK0_SEC11_12_13_14_15, PAGE = 0, ALIGN(4)
But Project1 builds successfully. Project2 failed, error message is as below:
"../28004x_cla_flash_lnk.cmd", line 119: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".cinit" size 0x339 page 0. Available memory ranges:
FLASH_BANK0_SEC1_2_3_4_5_6 size: 0x3fc0 unused: 0x2 max hole: 0x2
FLASH_BANK0_SEC11_12_13_14_15 size: 0x4000 unused: 0x33f max hole: 0x33b
error #10010: errors encountered during linking; "QT2_AC_side.out" not built
I asked the customer to compare the map files of the two projects, and it really did make a difference.
Project 1:
FLASH_BANK0_SEC1_2_3_ 00083040 00003fc0 00003d39 00000287 RWIX
FLASH_BANK0_SEC7_8_9_ 00087000 00005000 00005000 00000000 RWIX
FLASH_BANK0_SEC11_12_ 0008c000 00004000 0000385f 000007a1 RWIX
Project 2:
FLASH_BANK0_SEC1_2_3_ 00083040 00003fc0 00003fbe 00000002 RWIX
FLASH_BANK0_SEC7_8_9_ 00087000 00005000 00005000 00000000 RWIX
FLASH_BANK0_SEC11_12_ 0008c000 00004000 00003cc1 0000033f RWIX
Project1 and project2 is the difference on which setting causes the allocation of FLASH_BANK0 to be different? How do I find it? Thanks!
Julia
For both builds please send the following:
I cannot guarantee this information will allow me to determine the cause of the problem. But it might. I'm sure I'll be able to ask better questions.
Thanks and regards,
-George
Hi George,
All the files you asked were sent to Julia, and she will send the file to you.
please be aware that 28004x_cla_flash_lnk.cmd is the linker command file used by both project1 and project2
Thanks,
Quentin
Thank you for submitting the files I requested. I can explain why the link part of the build works differently. I am unable to tell you the best way to fix it.
The linker command for project1 uses the Release variant of driverlib ...
"C:/ti/c2000/C2000Ware_3_01_00_00/driverlib/f28004x/driverlib/ccs/Release/driverlib.lib"
... while project2 uses the Debug variant ...
"C:/ti/c2000/C2000Ware_3_01_00_00/driverlib/f28004x/driverlib/ccs/Debug/driverlib.lib"
The difference this causes is most clearly seen in these lines from the linker map file. In this screenshot, project1 is on the left, and project2 is on the right.
The debug variant uses much more code, and adds some RO (read only) sections.
I can't see enough to tell you how to change project2 so it uses the Release variant of driverlib.
Thanks and regards,
-George