How to add a debugging target to an existing project?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a debugging target to an existing project?

Jump to solution
1,320 Views
MarcV
Contributor I
I have an existing codewarrior HCS12 project that is set up for debugging with the simulator and the serial monitor, but I would like to debug the project using the P&E ICD.
But I can't figure out how to add a new debugging target to the project. Does anyone have a solution for this?
Thanks in advance!
Labels (1)
Tags (1)
0 Kudos
1 Solution
165 Views
Sten
Contributor IV

Here is an extract from the tips.txt file that is created in the root of your project directory when you create a new project with CW for S12 v. 4.5:

//------------------------------------------------------------------------
//  Appending an additional connection
//------------------------------------------------------------------------
If you missed to add a specific connection during the project creation,
you can do this later as well. However, you have to consider following points:
- Within your project choose the 'Target' tab and use the menu
 'Project' > 'Create Target...'. In this dialog enter the new
 connection name and choose 'Clone existing target'. You may choose any existing
 target.
- Select the newly created target. We need now to prepare the
 debugger. Use the menu 'Project' > 'Set Default Target' to select the created target.
- In case you need a different memory mapping for that specific connection
 (e.g. 'Serial Monitor'),
 you will need to add the modified prm file to the project. Make
 sure that the new .prm file is selected in the target. Make sure the new prm file
 has the bullet set in the target column in the project window. Also make sure that
 the existing prm file has no bullet.
- The debugger configuration files (.ini) are located in the '{Project}' directory.
 You will need to copy an existing '.ini' file to the same path. For the file
 name use the connection name. You can now drag and drop the ini file to
 'Debugger Project File'.
- You will need to adapt the 'Arguments' option in the 'CodeWarrior' project setting
 panel 'Build Extras'. Replace the '.ini' file name with the new one.
 Optional: In the same option line replace the '-instance=x' with '-instance=y',
 where y is the new connection. The -instance options makes sure that only one debugger
 instance is open for a certain connection.
- We need now to setup the debugger. You can do this by starting the debugger.
 In the debugger dialog 'Component' > 'Set Connection...' you can choose the connection.
 - For the Full Chip Simualtion\Simulator Connection:
   Use Processor= HC12 and Connection= Full Chip Simulation
 - For the P&E Multilink/Cyclone Pro Connection:
   Use Processor= HC12 and Connection= P&E Multilink/Cyclone Pro
 - For the SofTec HCS12 Connection:
   Use Processor= HC12 and Connection= SofTec HCS12
 - For the HCS12 Serial Monitor Connection:
   Use Processor= HC12 and Connection= HCS12 Serial Monitor
- Optional: In case you need 'Command Files', you can create empty files in the '{Project}cmd'
 directory. In the debugger you can use the 'Command Files...' dialog in the Connection
 menu to adapt the debugger.
- Now you have a new connection in the project.

View solution in original post

0 Kudos
1 Reply
166 Views
Sten
Contributor IV

Here is an extract from the tips.txt file that is created in the root of your project directory when you create a new project with CW for S12 v. 4.5:

//------------------------------------------------------------------------
//  Appending an additional connection
//------------------------------------------------------------------------
If you missed to add a specific connection during the project creation,
you can do this later as well. However, you have to consider following points:
- Within your project choose the 'Target' tab and use the menu
 'Project' > 'Create Target...'. In this dialog enter the new
 connection name and choose 'Clone existing target'. You may choose any existing
 target.
- Select the newly created target. We need now to prepare the
 debugger. Use the menu 'Project' > 'Set Default Target' to select the created target.
- In case you need a different memory mapping for that specific connection
 (e.g. 'Serial Monitor'),
 you will need to add the modified prm file to the project. Make
 sure that the new .prm file is selected in the target. Make sure the new prm file
 has the bullet set in the target column in the project window. Also make sure that
 the existing prm file has no bullet.
- The debugger configuration files (.ini) are located in the '{Project}' directory.
 You will need to copy an existing '.ini' file to the same path. For the file
 name use the connection name. You can now drag and drop the ini file to
 'Debugger Project File'.
- You will need to adapt the 'Arguments' option in the 'CodeWarrior' project setting
 panel 'Build Extras'. Replace the '.ini' file name with the new one.
 Optional: In the same option line replace the '-instance=x' with '-instance=y',
 where y is the new connection. The -instance options makes sure that only one debugger
 instance is open for a certain connection.
- We need now to setup the debugger. You can do this by starting the debugger.
 In the debugger dialog 'Component' > 'Set Connection...' you can choose the connection.
 - For the Full Chip Simualtion\Simulator Connection:
   Use Processor= HC12 and Connection= Full Chip Simulation
 - For the P&E Multilink/Cyclone Pro Connection:
   Use Processor= HC12 and Connection= P&E Multilink/Cyclone Pro
 - For the SofTec HCS12 Connection:
   Use Processor= HC12 and Connection= SofTec HCS12
 - For the HCS12 Serial Monitor Connection:
   Use Processor= HC12 and Connection= HCS12 Serial Monitor
- Optional: In case you need 'Command Files', you can create empty files in the '{Project}cmd'
 directory. In the debugger you can use the 'Command Files...' dialog in the Connection
 menu to adapt the debugger.
- Now you have a new connection in the project.

0 Kudos