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.

Default debug configuration

Hi all,

I use a subversion based repository to store CCS projects and I would like to avoid that a custom debug configuration will erase a sector containing code (i.e. a bootloader) .

One option is to version (on SVN repository) also the .launch but the only option available is "Use default target configuration" because no relative path to the Target configuration is allowed. In this way, the user has to pay attention to change the default target configuration every time he switches between projects loaded on CCS.

Anyway, if a a new debug is launched (a user mistake for example), a new debug configuration is created with all the default parameters: all flash sectors to be erased and automatic code loading; in this way the flash is erased without the user intervention.

How can be solved this issue? Where the default options like "Loading options", "Erase sector selection"..., used by any new configuration, are located? Can they be changed in some way (also manually in some "hidden" file)?

  • Hi,

    One way to solve this is to create a target configuration folder and add it into SVN, relative to your project(s). Then link the ccxml file into your project. Now, modify the launch configuration and set the target configuration file to have this variable, ${target_config_active_default:myProject}. Replace myProject with the name of you project. Modify the launch configuration with the debugger settings that you wanted, and put the .launch file together with your project in SVN.

    I hope this help.

    Regards,
    Patrick 

  • Hi Patrick,

    first of all thank you for your fast replay!

    Some passages are not so clear to me, sorry!

    At the moment I have a project (one of many) called "F28335_SW" (originality first of all) and I created a file called "F28335_system.launch" with the debugger settings I need. This launcher refers to my "XDS100_v2.ccxml" (set as "Active/Default" btw) by means of the variable  "${target_config_active_default:F28335_SW}" as you kindly suggested. These files are in project root and are versioned with the rest of the project in SVN.

    What is not clear to me is if I need a target configuration folder or those file can be in the root; what do you mean with linking the ccxml into the project?

    The architecture I have works if I choose to debug the project as the launch configuration I created but if a press "F11" (Run->Debug) a new launch configuration is created that automatically connects to the target, erase all the flash memory and loads the code, deleting a lot of nice things like bootloader, calibration parameters and control settings.

    My hope is to find a way to avoid this kind of user error in some way...even if the solution could be not elegant.

    Thank you again.

    Gianluca

  • Hi Gianluca,

    I suggested to link the ccxml file to your project due to my previous understanding that you need to share the target configuration folder. It doesn't look like it is the case. Yes, you can place the ccxml file within the project root. 

    To understand you question a little bit better. Why do you need to create a new launch configuration? Why can't you use the same launch configuration for each debug session?

    "F11" shouldn't create a new launch configuration, it should be re-using the same launch configuration that is stored in your project. i.e F28335_SW.launch in your project.
    Ah... I think you need to rename your launch configuration "F28335_system.launch" to "F28335_SW.launch". CCS will generate a .launch file if it isn't already exist in your project, it will have the same name as your project.
    Regards,
    Patrick 
  • Patrick Chuong said:

    "F11" shouldn't create a new launch configuration, it should be re-using the same launch configuration that is stored in your project. i.e F28335_SW.launch in your project.

    Ah... I think you need to rename your launch configuration "F28335_system.launch" to "F28335_SW.launch". CCS will generate a .launch file if it isn't already exist in your project, it will have the same name as your project.
    Regards,
    Patrick 

    Hi Patrick,

    Apart the first time, in which CCS created a new configuration file with default settings even if a configuration file with the same name alraedy existed, all the later times your suggestion worked!! I Also successfully tried with different projects: first fail was, at the moment, unreasonable and not repeatable.

    Thank you again for your support.

    Regards,

    Gianluca