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.

TMS570LC4357: loadti Erasing Flash

Part Number: TMS570LC4357


Hello,

Our project consists of a BootLoader, loaded into Flash Bank 0, and an application loaded into Flash Bank 1. The boot and interrupt vectors are defined in the BootLoader starting at address 0x0, and the BootLoader has modified interrupt vectors to point to the application vector addresses. The application linker command script has the necessary modifications to allocate to Flash bank 1. 

This is the process we have been using reliably for 2+ years. We typically program the application through the Serial port, but for debugging purposes we are also able to flash the application directly using the JTAG debugger. To accomplish this, the project has been set up to only erase the necessary Flash sectors, because otherwise the BootLoader (and therefore, BootLoader vector assignments) are erased and the application cannot execute.

Recently, we've begun using third-party tools for code tracing and verification. Part of the procedure is to use a script to build and flash the application onto the board and integrate this script into the third party toolchain. To this end, we're trying to use the 'loadti' command, which so far is building and flashing the application correctly. However, it is also erasing the entire Flash space on the target board. This causes the BootLoader and interrupt vector assignments to be erased, and therefore causes the application to fail. 

We've set up a .ccxml target configuration file in our project, and our loadti script points to this file. When manually launching the configuration in CCS, it has been set up to only erase the necessary flash sectors for application upload. 

My question is thus; how can we configure loadti or the linked .ccxml file to only erase the required Flash Bank 1 sectors when flashing code, rather than the entire Flash space of the target? Alternatively, is there another command or tool we can use in an automated script to build and upload our application? 

Thank you,

James

  • Hi James,

    I don't know how to erase the necessary flash sectors using loadti. You can post loadti question to the Code Composer Forum as the people monitoring that forum are the tool experts.

  • James,

    No need to post something to the Code Composer Forum.  The thread has already been flagged for the CCS team.

    Regards,

    John

  • QJ and John,

    Thank you both for your responses. I was able to figure it out, I dug up an old forum post that mentioned a command to add to the loadti script:

    For anyone else who may encounter this issue, here's what I did: In the loadti installation directory, there will be a main.js file. In the run() function, before the program is loaded to the target, add the following line:

    debugSession.options.setString("FlashEraseSelection", "Necessary Sectors Only (for Program Load)");

    This forces the debugger to only erase the necessary Flash sectors.

    Thanks,

    James