I'm currently implementing CLA algorithms on 28033 with CCSv5.
Helpful ressources were:
http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/253678.aspx
http://processors.wiki.ti.com/index.php/C2000_CLA_C_Compiler#C_Language_Restrictions
Because I need both CLA Data RAM 0 and 1 for the CPU I placed the scratchpad in CLA-to-CPU Messsage RAM (0x1480).
This does work, but as memory space is used both for scratchpad and messaging, I have to keep CLA_SCRATCHPAD_SIZE as small as possible.
Problems/questions:
1. How do I know the required scratchpad size?
The only way I found is to look for the highest offset to __cla_scratchpad_start in the CLA compiler's assembly output.
2. How can I make the linker warn me if the compiler uses more scratchpad memory than assigned by CLA_SCRATCHPAD_SIZE?
Currently, if the scratchpad overflows, there is no warning at all.
3. Apparently, the first 4 scratchpad memory locations are not used, the lowest reference I see is "__cla_scratchpad_start+4".
4. Why doesn't the compiler simply allocate space for scratchpad data like it does for all other segments?
This would make it much easier to use, and solve problems 1 und 2 as well.
CLA_SCRATCHPAD_SIZE = 0x10;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
....
CLAscratch :
{
*.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end)
} > CLA1_MSGRAMLOW, PAGE = 1