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.

TMS320F280049: Make RAMLSx larger in command file and assign memory to CLA as data memory

Part Number: TMS320F280049


Hello,

In my code I have two large independent arrays in CLA memory, since I ran out of space I tried to make RAMLS4 larger (Which is the sector assigned to "Cla1DataRam" ) in the command file, however, I'm getting peculiar results when running the CLA task, it seems like data is kind of been mixed between the two arrays or getting corrupted.

I guess this behavior is related to the memory configuration. I use MemCfg_setCLAMemType to assign the RAMLS sectors to CLA_MEM_PROGRAM or MEMCFG_CLA_MEM_DATA, nevertheless, I suppose the line:

MemCfg_setCLAMemType(MEMCFG_SECT_LS4, MEMCFG_CLA_MEM_DATA);

isn't quite right because I changed RAMLS4 size in the command file. Could it be the cause of the peculiar behavior?, is it legal to modify RAMLSx sectors to a custom size?

I guess the solution would be to assign both RAMLS4 and RAMLS5 to "Cla1DataRam" but RAMLS5 is being assigned to ".const_cla" and there isn´t any other RAMLS sector available for use


What could I do in this situation?

Thank you

  • By now it seems like, making RAMSL4 larger and  RAMLS5 smaller:

    RAMLS4           : origin = 0x00A000, length = 0x000B00

    RAMLS5           : origin = 0x00AB00, length = 0x000500

    and using:

    MemCfg_setCLAMemType(MEMCFG_SECT_LS4, MEMCFG_CLA_MEM_DATA);

    MemCfg_setCLAMemType(MEMCFG_SECT_LS5, MEMCFG_CLA_MEM_DATA);

    could work even if  RAMLS5 is being assigned to ".const_cla" , but will that have some side effect?  

  • Daniel,

    I don't see any reason that shouldn't work.  The linker command file is just how you are describing the device to the compiler tools.  You could make a block called RAMLS4_5 that has the origin/length of the combined block.  Then in your code you assign both of those to the CLA as data memory as you have done.  Constants are just a special type of data that are not expected to change.  CLA doesn't have access to the flash so putting them in Data RAM is fine.

    Regards

    Lori