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.

Code is overwritten on load

Other Parts Discussed in Thread: TMS320F28035

Normal 0 21 false false false MicrosoftInternetExplorer4

Code is overwritten on load

I use CSS V. 4.2.0.10017 with a Piccolo B (TMS320F28035).

Because of the code size, my debug version loads some code to Flash and some code is loaded to the RAM (by the CSS4 when I start debugging). Now I have the problem that code loaded to address RAM 0x8000 is overwritten later on load process. I don’t find any error in the .map and .cmd file. I think the code which overrides is the same as copied to Flash. So my question: Does the Flash programming tool use MCU RAM and overwrite prior loaded code?

Thomas

 

  • Thomas,

    To load the flash a small program has to be loaded into RAM by CCS.

    Regards,

    John

     

  • Thanks for the answer.

    Can you specify the address and size which is used, I will put the stack on this address?

    Or is it possible to first program the flash and then load the ram by changing the order in the .cmd file.

    Regards,

    Thomas

  • Thomas,

    In theory, we have a way to dynamically backup/restore the RAM data that is used by the Flash algorithm; but upon further analysis of the problem you are describing, it seems we are not backing up the memory location for the Flash algorithm global variables. The address used for the global variables for F28035 ranges from 0x8000 up to 0x8440, depending on the size of your Flash program. So if you able to avoid using these memory addresses, you should be able to work around this issue for now.

    I will do some research to determine if there is a way to improve the RAM backup/restore functionality, and will provide an update if I have any additional information. In the mean time, please let me know if the above workaround works for you or not.

    Thanks.

    Ricky

  • I filed SDSCM00038733 to track this issue.


    John