How to share Debug / Run Configurations across projects?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to share Debug / Run Configurations across projects?

548 Views
robertpoor
Senior Contributor I

Each time I create a new project, I find myself

  • going to Run => Debug Configurations..., 
  • making a copy of an existing configuration
  • giving the new configuration the name of my new project
  • changing the name of the Project and the C/C++ Application .elf file
  • ... and using that Configuration each time I want to launch the new project

 

This works, but it's tedious.  And I now have about 16 configurations (and counting).  Which leads me to think I'm probably doing this wrong.

 

Is there a way to create a "master" Debug Configuration* that does macro substitution of the project name and .elf file, so that I can launch any application using the master?  What am I missing?

 

(* I assume that there will be something similar for Run Configurations as well.  I'm just focusing on Debug Configurations to start with...)

Labels (1)
3 Replies

418 Views
BlackNight
NXP Employee
NXP Employee

Hi Robert,

the Eclipse launch configurations are either stored in the .metadata or 'shared' as a file (see Sharing Debug Configuration with Eclipse | MCU on Eclipse ). While you can share that file (with .launch) extension between projects, the important thing is that it has the project name and the binary name to debug in it (you can see this if you open the .launch file with a text editor). So as long as your projects sharing the file have the same project name and binary file name, that's possible. But in usual cases this will not be the case. So you are better off with having launch files for each project.

I hope this helps,

Erich

418 Views
robertpoor
Senior Contributor I

Erich:

> So you are better off with having launch files for each project.

That's very helpful advice.  I don't mind creating a launch file for each project, as long as that's what the experienced folks do! :smileyhappy:

Thanks very much.

0 Kudos

418 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Robert,

It is easy to debug and run on KDS,

Right click the project you want to debug -> Debug As -> Debug Configurations...

pastedImage_2.png

Then click the project under your debug mode -> Debug :

pastedImage_3.png


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos