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.
I am currently evaluating CCS V4.2.1.
For this I imported an existing project which was made some time ago with CCS V3.1. I rebuild all, however the linker outputs that the section .econst does not fit into the flash memory of the used F2812. However that is possible with CCS V3.1. The code generation tools are 4.14 (V3.1) and 5.29 (V4.2.1).
The project settings seems the same, I have not changed them after the project import. I do not assume that the new code generation tools are less efficient, maybe the project settings need some change. The optimisation level is set to 3 in both cases.
Any ideas are welcome ;-)
I would suggest comparing the link map files generated by the two versions and see which sections are differing enough in size to cause the sections to no longer fit in the available memory. If the memory allocation was already tight in the earlier build, then even if some section sizes increased with the newer version of codegen tools you could run into alocation issues.
Do you already have the the --opt_for_space option enabled? If not, you may want to give that a try to see if it helps reduce code size further. The option is documented in the C28x Compiler Users Guide.
Thanks for the reply Aarti,
the linker says:
object ".econst", size 0x940c (page 0). Available ranges:
FLASH size: 0x1ff80 unused: 0x87ae max hole: 0x8782
The code is tight, just fitted into the FLASH section before. There is -O3 set in the project settings, I think it is the same as --opt you mentioned. Is there another chance to reduce code size?
-O3 means --opt_level=3, and is not the same as --opt_for_space.
For best code size, you should use both. See also http://processors.wiki.ti.com/index.php/C28x_Code_Generation_Tips_and_Tricks
Where can I set --opt_for_space in CCS 4.2.1? I see --opt_for_speed in the project properties but not --opt_for_space.
If I set --optimize_with_debug the code fits into the memory. However I have to test if I am still able to debug.
The --opt_for_space option is under Project Properties->C/C++ Build->C2000 Compiler->Runtime Model Options (the very last option in the list).