CODECOMPOSER: cc20.2 launch.json is overwritten when start debug sesion

Part Number: CODECOMPOSER

Tool/software:

Hello,

I am currently testing the new ccs 20.2 and i have come accross an issue. I have a launch.json file where i specifiy to not erase the entire flash when starting a new debug session. However, when i click on debug, the config is overwritten and changes to its default "Erase entire flash". 

Where can i find the json file and how can i protect it to be the default configuration?

Also, sometimes it seems that the CCs is not able to find the .json file and it does not let me generate a proper launch.json file. How would be the process to configure a proper debug sesion?

Regards,

David

  • Hello,

    Where can i find the json file

    See: https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs/ccs_debug-main.html#launch-configurations

    If a launch.json file does not exist, CCS should create it when when attempting to do a debug launch and create a the launch configuration for it in the launch.json. Subsequent launches would be added to the file.

    However, when i click on debug, the config is overwritten and changes to its default "Erase entire flash". 

    The launch should not get overwritten if none of the related properties changed.

    Also, sometimes it seems that the CCs is not able to find the .json file and it does not let me generate a proper launch.json file.

    This looks like a bug of some sort. Are you using a multi-root workspace environment?

    Thanks

    ki

  • Ki,

    Let me add you the steps I follow to see if it helps.

    •  I have a project created from the launchpad f280039C adapted to work with f280037C. This project comes from CCs 12.2. I have not found any migration guide if any.

    • The launch file is found inside the project folders, and I am sure the config is set as Active.
    • When I click on the project properties and select debug option, it appears to show this config(What is important here is the option of necessary sectors):

    • Then, when I go to the debug section, the option appear in the launch config.

    • Also, I check that in the folder .theia placed right above the our project where the ccs is placing the launch.json file.
    • When I click on the green button in the image above, and start a debug session, checking again the properties it clearly shows that the configuration is changed, and the option erase entire flash is selected. Also, I check through the memory browser a parameter written and it clearly shows that the parameter has disappeared.

    I have gone through the user guide and I am not doing anything outside the tutorial. I would like to know how to solve this issue as it is really important not to erase the flash each time we start a debug session.

    Regards,

    David

  • The launch file is found inside the project folders, and I am sure the config is set as Active.

    Can you provide a screenshot of your Explorer view? I think you either opened the workspace folder to be your project folder or are working with a multi-root workspace. It is not clear based on your description so a screenshot will help explain it to me.

    Thanks

    ki

  • Sure, let me attach the screenshot.

    Also, let me add the following: The .theia file is in two places. One inside this folder and another one in the parent directory where this folder is located. Both have the same exact launch file

  • Based on your screenshot it looks like you once had a multi-root workspace environment and then removed one of the roots (folder) to have a single root workspace save to the workspace file. That single root contains on project.

    Is that correct?

  • Hello Ki,

    Thank you for your response. It may be possible what you say because i did some testing to import the project and it may have caused this conflict. However, the project was originally created from ccs 12.2 and I tried to import the settings to ccs 20.2. I can try whatever you think can be useful to undo my mistakes.

    Regards,

    David

  • I think I can reproduce this. However, it took several tries. I believe it is related to a multi-root workspace environment.

    Can you open a NEW workspace and then when importing your project, select the option to COPY the project to the workspace folder? Then see if the issue goes away. 

  • Ki,

    Great, with your steps, I can import the project and maintain the launch settings. However, I have 2 questions:

    - How can I make sure the project options from CCS12 are properly importe to the new CCS20? I mean all the files and folder starting with a "."

    - How can I synchornize the git with the project by copying the project? By importing the porject through the option Import project at their original locations, I am able to synchronize with git but the multirootworkspace appears. Justo to clairify, the git repository contains several folders with other files and the repo root is in a parent folder

    David