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.

How to start custom launch configuration for a project?

Other Parts Discussed in Thread: TM4C1294NCPDT

I'm looking for advice on how to create a custom launch configuration for my project. I've tried several methods, but they all seem unreliable and don't launch with the correct settings.

CCS 6.1.1.00022
TM4C1294XL Evaluation Kit

My goal is to create a launch configuration for a specific project. The configuration must issue a CPU Reset after program download and I want to disable auto-run to main. The executable has no function called main; I get a warning with this option selected. Here are the steps I think should have worked.

Select my project (bootloaderusb) in the Project Explorer
File > New > Target Configuration File

File name: bootloaderusb.ccxml
Use shared location > Unselect
Workspace...
Select my project

This opens the target configuration in the editor. I make the following edits, save the file, and close it.

Connection: Stellaris In-Circuite Debug Interface
Device: Tiva TM4C1294NCPDT > Select
Save

So far, this all makes sense. Now I want to customize my launch configuration as described above. I think this is where I go wrong.

Project Explorer
bootloaderusb.ccxml > RMB > Properties
Run/Debug Settings > Select
New...
Code Composer Studio - Device Debugging > Select
OK

Edit launch configuration properties (dialog)
Name: bootloaderusb LC
Target Configuration: C:\Projects\USB\ccsws_6_1_1\bootloaderusb\bootloaderusb.ccxml
Target (tab) > Select
Program/Memory Load Options > Select
Reset the target on a program load or restart > Select
Apply
Auto Run and Launch Options > Select
Auto Run Options > On a program load or restart > Unselect
Apply
OK

Back in the Properties for bootloaderusb.ccxml dialog
Select booloaderusb LC
OK

At this point, my expectation is that I've created a custom target configuration for my project (bootloaderusb.ccxml) and I have associated it to a custom launch configuration (booloaderusb LC). When I hover over the "Bug" icon in the toolbar, the tool tip displays "Debug bootloaderusb.ccxml". I click the bug.

This opens the CCS Debug perspective, starts the debug session, and connects to the target. However, it is not using the custom launch configuration I just created above. It seems to have created a new launch configuration on-the-fly. The name seems to be my project name (bootloaderusb).

I open the Debug Configurations dialog and I see both my custom launch configuration (bootloaderusb LC) and the new one (bootloaderusb). Inspecting the properties, I see the new launch configuration does not contain my custom modifications.

Any suggestions on how to make this work?

Also, what is the difference between 1) target configuration, 2) launch configuration, and 3) debug configuration? It seems there are some subtle differences I'm not understanding.

Finally, in the launch configuration edit dialog, when I select my bootloaderusb.ccxml file using the Workspace... button, I would expect to get a workspace relative pathname. However, I get an absolute pathname. How to fix this?

Thank you,
~Ramsey

  • Ramsey said:
    I open the Debug Configurations dialog and I see both my custom launch configuration (bootloaderusb LC) and the new one (bootloaderusb). Inspecting the properties, I see the new launch configuration does not contain my custom modifications.

    The custom launch configuration you created needs to be launched at least once before it shows up in the drop down list when you click on the arrow next to the green bug icon.  To launch your custom configuration, go to Run-.Debug Configurations, select booloaderusb LC and click on "Debug". This should launch the debug session with your custom settings. After it has been launched once, it should appear in the Green bug icon drop-down list, and can subsequently be launched directly from there.

    Ramsey said:
    Also, what is the difference between 1) target configuration, 2) launch configuration, and 3) debug configuration? It seems there are some subtle differences I'm not understanding.

    Please see this wiki article: http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS

    Ramsey said:
    Finally, in the launch configuration edit dialog, when I select my bootloaderusb.ccxml file using the Workspace... button, I would expect to get a workspace relative pathname. However, I get an absolute pathname. How to fix this?

    Please see http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#Portable_Debug_configurations

    Hope this helps!

  • AartiG,

    Thank you for the CCS Debug Handbook link. This information is helpful in gaining an understanding. I'm still working out the details between Target Configuration and Debug Configuration.

    From your reply and further testing, it seems that I must *always* launch my custom target configuration explicitly. I can do this either from the Debug Configuration dialog or from the launch history menu. I understand that the target configuration must be launched at least one time in order to show up in the history menu.

    I had been trying to get CCS to launch my custom target configuration automatically for my project when clicking the debug icon. In fact, the Debug Handbook Section 2.2.1 would indicate that this is possible. In the second paragraph, it states that when clicking the Debug launch button (Green Bug), the first place it looks is for an Active Target Configuration for the selected project. However, this is not what happens, even after explicitly launching my custom target configuration. CCS always creates a new launch configuration (based on some default?) and always runs that one. Seems like a CCS bug to me. What's the point of having an "Active" target configuration if CCS simply ignores it.

    Thanks,
    ~Ramsey

  • Ramsey said:
    CCS always creates a new launch configuration (based on some default?) and always runs that one.

    The key distinction is mentioned here: http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#Debug_configurations

    If you have a project active in Project Explorer and click the Green bug icon to launch the debugger (automatic launch) the Debug Configuraton created (and later reused) has the same name as the project. If you instead launch the debugger manually, then the Debug configuration has the same name as the Target Configuration File.  So which debug configuration you choose to customize will depend on the method used for debugging.

    In your case, since you wish to debug using the Green bug icon, go into menu Run->Debug Configurations, in the left pane select the configuration that has the same name as your project (assuming it has been launched once previously) and customize its settings as needed. Those settings should then be used for future debug sessions if the debugger is launched "automatically".

  • AartiG,

    I understand what you are saying. But that is in conflict with Section 2.2.1 Advanced target configuration options. Specifically, in the second paragraph it states:

    Target Configuration files can be tagged as Active or Default. This tagging affects which configuration the Debug launch button will use. The Debug launch button will search for and use a target configuration file in the order below:

    * Use the file that is part of the project (physically or linked) - specified as Active (this is the first item in the list).

    Since my observed behavior of CCS matches the description in Section 2.3 Debug configurations, it seems that Section 2.2.1 is incorrect. But then what is the point of having an "Active" configuration?

    It is also unfortunate that you must first launch the configuration in order to customize the debug configuration. This means the customer must always configure the debug configuration or explicitly launch the ccxml file. It would be better if I could ship a project which launches the correct debug configuration when clicking the bug icon. But maybe CCS just does not support this.

    At any rate, it would be good to fix the wiki page to eliminate this confusion.

    Thanks,
    ~Ramsey