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.

TMS320F28379D: Mixed execution RAM/FLASH Debugging

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello everybody,

 

while having a program which has mixed execution, were some parts are executed form flash and some real-time-critical parts are executed from RAM,

I am wondering if there is a possibility to debug both parts in one session.

 

The way I´m going right now is to use a differed .cmd-file for debugging, where I load everything into the RAM (much more useable than the debugging form FLASH).

The problem is, that soon my program will be to big to load completely into RAM.

 

Any suggestions to handle this problem?

 

Much thanks for your help in advance!

Best regards,

Till

  • Hi Till,

    You should be able to debug your application as is with part of it in RAM and part of it in Flash.

    1. When debugging code in RAM make sure you set breakpoints in RAM code after the application has copied over the code from Flash to RAM.

    2. For code placed in Flash the only limitation will be that only hardware breakpoints will be supported by debugger which is limited to 2 units. If you need additional breakpoints, you can embed asm(" ESTOP0"); statements inside your application code. Please remove these statements for production code as it can impact performance.

    Thanks,
    Ashwini

  • Till,

    Would like to add couple of points in addition to what Ashwini said:

    Please note that flash programmers (TI and 3rd party) are designed to support a fully embedded flash application - Meaning, all of the initialized sections should be mapped to flash in the linker cmd file. If you have any code that needs to be executed from RAM, it should be copied from flash to RAM at run time before the function call is made.  Flash programmers do not guarantee loading the RAM content when you have some initialized sections mapped to RAM and some to Flash.  Please take a look at the C2000Ware examples - all of them have a flash build configuration.

    Below FAQ also might help:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/878674/faq-flash---how-to-modify-an-application-from-ram-configuration-to-flash-configuration 

    Thanks and regards,
    Vamsi