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.

CCS/CCSTUDIO-TM4X: XDS200 Erase only necessary pages

Part Number: CCSTUDIO-TM4X

Tool/software: Code Composer Studio

Hi,

I am using Code Composer Studio v9.2 for a development on a Tiva TM4C123 using the debug probe XDS200.

In our project we have two code partition, a bootloader and the application, each in a separate CCS project, giving thus two .out file out of compilation. My purpose is to load each .out on the target through the debug interface but I am having a hard time as loading one erases the other in flash memory.

I checked the option "Erase only necessary pages" in Project properties -> Debug -> Flash settings but it did not change anything. I also generated hex files using the HEX utility and checked that both binaries are on different flash sectors. Of course, I also tried with specified options and a memory range to erase as it has been a workaround for this kind of issue for CCS v7 in another post but it did not work either.

Is there a way to make this works?

  • Hello,

    This should work for your use case, assuming the two programs are completely different pages. I tried it out with my CCS 9.2.0 setup with a Tiva target (though different device) and it worked fine. Can you share your *.out files? You can send it by private message if you do not want to share publicly.

    Thanks

    ki

  • I am having an error message when I try to send you a private message with attachment. Is there another way I could transmit them to you?

  • Can you start a private conversation with me to discuss?

  • Thank you for the test case. When I change the "Program Load Settings" to "Necessary Pages Only", it works as expected for me. For example, when I first load DialysateValvesLoaderBootloader.out and then DialysateValvesLoader.out, the first program (DialysateValvesLoaderBootloader.out) is still there. I confirmed this by checking address 0x1D00 after loading DialysateValvesLoader.out. If the "Erase Method" is set to "Use the Erase Option Specified Below" (with "Entire Flash" selected), then I do see contents at 0x1D00 erased.

    Can you try starting a project-less debug session and setting the flash properties for the launch itself? Make sure the "Remember My Settings" option is applied.

    Try loading the out files in the project-less debug session and see if the entire flash continues to get erased.

    Thanks

    ki

  • Thank you for your reply. As I read your post, I couldn't help thinking I never saw the "Remember my settings" button. So I figured out I must have been in the wrong menu. Indeed, when I changed the option from Project properties -> Debug -> Flash settings, it has no effect:


    However I found the exact same options from another place: Project properties ->Run/Debug Settings -> TM4C123GH6PZ.ccxml -> Edit -> Target -> Flash Settings. Changing it to Erase necessary pages only and restarting the debug session did work!



  • Glad to hear you resolved the issue and thanks for the update. Also my apologies for having to deal with the intricacies of debug configurations. Project debug configurations are generated when first launching a debug session for a project. It will check the project debug properties and use that information to generate the debug configuration. Think of it as a type of cache file. Subsequent launches will use that cache to start the debug session for the project. Now, if you modify the project debug properties, then the debug configuration *should* get regenerated. But that didn't seem to be happening in your case (though it did in mine). That functionality can be a little wonky at times, hence why we sometimes recommend clearing out the debug configuration to ensure it gents regenerated (see: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_troubleshooting.html#delete-the-debug-launch-configuration 9.7.3 and 9.7.4).

     Hence:

    Matthieu Tardivon said:
    . Indeed, when I changed the option from Project properties -> Debug -> Flash settings

    This *should* have worked. I'm not sure why it did not. Perhaps the configuration file had issues with it.

    When changing the debugger options during a debug session and using the "Remember my settings" button, this will write the changes directly to the debug configuration "cache" file. Hence why this is a more reliable way to change the debug settings.

    Matthieu Tardivon said:
    Project properties ->Run/Debug Settings -> TM4C123GH6PZ.ccxml -> Edit -> Target -> Flash Settings. Changing it to Erase necessary pages only and restarting the debug session did work!

    And what you did above is essentially doing the same - modifying the debug configuration file directly.

    Anyway, I hope this helps shed a little bit of light on what was going on under the hood.

    Thanks

    ki

  • It does! Thank you for you time and support!