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.

Debug configuration variable for project location



Hi Ti,

Is there any environment variable for the project location?

I would like to keep the project path (in this case "MCU2_0_UDMA_Memcpy_Test") variable and not hardcoded. Similar to workspace_loc: but project_loc: did not work.
I searched around and couldnt find a solution.

Can you help me?

Regards,
Thomas

  • Thomas,

    Are you looking to use the project_loc variable because the project is outside of the workspace folder?  Support for using variables in the debug configuration is pretty limited today.  Is the target configuration file in the project?  If so maybe we could use another variable to specify the script relative to that.  I am going to try that out.

    Regards,

    John

  • Hi John,

    The project is within the workspace folder. I have several projects in my workspace folder and would like to not have to adjust everytime the debug configuration when I want to debug another project.

    Edit: I have to add here, that a successfull debugging of my project requires the execution of the project specific "loadcustomApplicationRapid.js" script. I hope you can follow/understand my environment/setup better now.. If not, please ask.

    However, the target configuration is not in the project or in the workspace. It's in a other location, because it is shared to various workspaces.

    Best Regards,
    Thomas

  • Thomas,

    I think I understand better now.

    You have a "project-less" debug configuration.  i.e. one that is associated with a .ccxml file and not a project.  Then depending on what project is currently active you want CCS to pick up a .js file from that project.  Is that right?  I don't think that can work as the debug configuration would not have a project context.  

    One option would be to create a project based debug configuration.  You could override the setting to have the config load the program if that is something that your script is doing.  You would need to have separate configurations for each project.

    Alternatively, you could have multiple "project-less" debug configurations.  You would use the workspace_loc variable with the project name specified to distinguish which project is being debugged and that can be used to pick up the correct .js file.  

    If I am understanding that correctly I could try creating a couple examples and share the screen shots.

    Regards,

    John

  • Hi John,

    Then depending on what project is currently active you want CCS to pick up a .js file from that project.  Is that right?

    Yes, exactly that was my plan.

    You could override the setting to have the config load the program if that is something that your script is doing. 

    Yes, that is - more or less - the job of the project specific .js file. We use uboot to do a fast initialization of the TDA4 and then load the Out-File on the specific core and hold the core. This way, we avoid doing the slow initialization via GEL-scripts and speedup our development process massivly.

    If I am understanding that correctly I could try creating a couple examples and share the screen shots.

    That would be perfect! Thank you very much for helping.

    Best regards,
    Thomas

  • In my workspace I have 2 projects: Project_A and Project_B

    Project-less debug configuration scenario

    So here I have debug configurations that are based on the .ccxml file vs the project.  This should match more closely with what you have now.

    • Started by launching a debug session for my .ccxml file.  This then created the debug configuration.
    • I opened the debug configuration dialog
    • I then did the following to this configuration:
      • Renamed it to reflect that ti would be for my Project_A.  (cc1352_xds110.ccxml_Project_A)
      • Specified that it should use the .js initialization script that is inside Project_A.  Very much like what you have done in your first screen capture
      • I then specified that this configuration is using Project_A and that it should load the symbols (and not load the program).  I did this to help with source lookup but depending on what your script does you could skip this.
    • Next I created a new debug configuration by clicking the button that looks like a file wth a + on top in the debug configurations dialog
    • I then did the following to this configuration
      • Renamed to note that it is for Project_B 
      • Specified to use the script inside Project_B
      • I then connected it to Project_B and specified to load symbols only as the script will take care of the loading of the binary.
    • Now when I click on the down arrow beside the bug button I get 2 separate debug configurations that I can choose from
      • When I select a config it launches it, runs the specified script inside the desired project, loads the symbols in the debugger.

    Would that accomplish what you need?

    Regards,

    John

  • Hi John,

    thank you very much for your effort! I will try this and see how it works in the field.

    Is it possible to set a particular debug configuration as default, to start via shortcut?

    Best regards,
    Thomas

  • Thomas,

    You can create favorites.  This will place 1 or more identified configurations in a new section at the top of the drop-down list.

    I am not aware of a way to assign a shortcut to them.

    Another option would be to use a "project" debug configuration.  If we did it that way then that configuration would be associated with a project and when you select a project and then click the debug button it would use the associated debug configuration.  The "Project_A" and "Project_B" configurations in my list are project configurations.  This option would only be good if you always use the same configuration for a project.

    If you wanted to do that you would need to add the .ccxml file to the project.  If you want to use the same .ccxml file across projects that is ok as when the file is copied over you can choose to "link" it.  The easiest way to do that would be to use the "target configurations" view and then to right click on the .ccxml file that you want to associate with the project and then select "link to project"

    Then you could select the project and click on the bug button and it will try to launch a debug session and will generate a debug configuration.  Once that is created you could then use the steps from the previous post to modify it to only load symbols and to use your script.

    Regards,

    John