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.

TMS570LS1227: Compile conditionally with different memory mapping

Part Number: TMS570LS1227

Hello,

I have a project where I should compile my code to be deployed to existing products with a bootloader on it, but I also need to compile and debug it first on my desktop without using bootloader.

I can do it changing the mapping in sys_link.cmd file, but thinking on a more stable production process, I want to have different targets where code is compiled "for bootloader" or "for debugging".

I tried the predefined symbols, but I don't know why, the sys_link.cmd file does not see these symbols.

Is there any other strategy I could use so I can just set my target and be sure code is going to be compiled and linked as expected?

Thanks!

  • Hi David,

    You can have one bootloader and more than one application firmware on TMS570 MCU. After boot, the code execution jumps to bootloader, then jump to one application firmware based on the condition in the bootloader. For example if condition 1 is met, the execution jumps to application 1, and if condition 2 is met, the code jumps to application 2.

    You can load application code to flash (for example sector 5) using CCS without touching the bootloader code (always in sector 0), and run the application and debug the application as usual. 

  • I may have not explained myself clearly.

    I know that I can do this. What I want is to compile my application to be able to run stand-alone or to be used to be downloaded with a bootloader on the MCU. I want to change between these 2 compilation options selecting different targets.
    Is that possible?

  • I was able to do it by changing the linker command file in properties/CCS General/Linker command file.

    I made different cmd files, set each one to specific targets, and excluded the rest from build.