Multi-Core Debugging Commands
13.
With core 0 still selected, click the Step Over button several times until you reach the printf()
statement.
Debugger executes the current statement, the following statements, and halts at the printf()
statement.
14. Switch to the other debug window.
15. Select the main()
thread for core 1 by clicking it. Notice that the program counter icon in the Source view did not move. The debugger controls the execution of each core individually.
16.
In the Debug view, click the Resume button.
Core 1 enters an infinite loop. The status of the program changes to (
Running
).
17.
In the Debug view, click the main()
thread for core 0 and click the Resume button.
Core 0 enters an infinite loop and core 1 continues to execute in its loop.
18.
Select main()
thread from core 1 and click the Suspend button.
The debugger halts core 1 at the current statement and the status of the program changes to (
Halted
). Core 0 continues to execute.
19. Select Run > Multicore Terminate.
The debugger terminates the active debug session. The threads associated with each core in the Debug view disappear.
9.3 Multi-Core Debugging Commands
This section describes the multi-core commands available in the Run menu of
CodeWarrior IDE and in the Debugger Shell.
If you are debugging a multi-core project, you can use single and multi-core debugging commands to debug parts of each core project.
•
Multi-Core Commands in CodeWarrior IDE
•
Multi-Core Commands in Debugger Shell
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
272 Freescale Semiconductor, Inc.
9.3.1 Multi-Core Commands in CodeWarrior IDE
Chapter 9 Multi-Core Debugging
This section describes the multi-core commands in the CodeWarrior IDE.
When you start a multi-core debug session, multi-core commands are enabled on the
CodeWarrior IDE Run menu. These commands, when issued, affect all cores simultaneously. The table below describes each menu choice. For detailed information on these commands, see CodeWarrior Development Studio Common Features Guide.
Command
Multicore Resume
Table 9-2. Multi-Core Debugging Commands
Icon Description
Starts all cores of a multi-core system running simultaneously.
Multicore Suspend
Multicore Restart
Multicore Terminate
Multicore Groups
Stops execution of all cores of a multi-core system simultaneously.
Restarts all the debug sessions for all cores of a multi-core system simultaneously.
Kills all the debug sessions for all cores of a multi-core system simultaneously.
Use All Cores: If the selected debug context is a multi-core system, then all cores are used for multi-core operations.
Disable Halt Groups: Disables breakpoint halt groups. For more information on halt groups, see "Multicore Breakpoint Halt Groups" in
CodeWarrior Development Studio Common Features Guide.
Limit new breakpoints to current group: If selected, all new breakpoints set during a debug session are reproduced only on cores belonging to the group of the core on which the breakpoint is set.
Edit Target Types: Opens Target Types dialog box that lets you add and remove system types.
Edit Multicore Groups: Opens the Multicore Groups dialog box to create multi-core groups. You can also use this option to modify the existing multi-core groups.
NOTE
For more information about creating/modifying multi-core groups, or editing target type, see "Multicore Groups" in
CodeWarrior Development Studio Common Features Guide
.
To use the multi-core commands from the Debug perspective, follow these steps:
1. Start a debugging session by selecting the appropriately configured launch configuration.
2. If necessary, expand the desired core's list of active threads by clicking on the tree control in the Debug view.
3. Click the thread you want to use with multi-core operations.
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
Freescale Semiconductor, Inc.
273
Multi-Core Debugging Commands
4. From the Run menu, specify the multi-core operation to perform on the thread.
NOTE
The keyboard shortcut for the Multicore Resume operation is Alt+Shift+F8.
9.3.2 Multi-Core Commands in Debugger Shell
This section describes the multi-core commands in debugger shell.
In addition to the multicore-specific toolbar buttons and menu commands available in the
Debug view, the Debugger Shell has multi-core specific commands that can control the operation of one or more processor cores at the same time. Like the menu commands, the multi-core debugger shell commands allow you to select, start, and stop a specific core.
You can also restart or kill sessions executing on a particular core. The table below lists and defines the affect of each multi-core debugging command.
Command
mc::config mc::go mc::group mc::c mc::g
Table 9-3. Multi-Core Debugging Commands
mc::gr
Shortcut Description
List or edit multicore group options.
Syntax
mc::config
Resume multiple cores
Syntax
mc::go
Examples
mc::go
Resumes the selected cores associated with the current thread context.
Display or edit multicore groups
Syntax
group group new <type-name> [<name>] group rename
<name>|<group-index> <new-name>group remove <name>|
<group-index> ... group removeall group enable|disable
<index> ...|all
Examples
mc::group
Shows the defined groups, including indices for use in the mc::group rename|enable|remove set of commands.
mc::group new 8572
Table continues on the next page...
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
274 Freescale Semiconductor, Inc.
mc::kill
Command
mc::reset mc::restart mc::stop mc::type
Chapter 9 Multi-Core Debugging
Table 9-3. Multi-Core Debugging Commands (continued)
mc::kill mc::t
Shortcut
mc::reset mc::restart mc::stop
Description
Creates a new group for system type 8572. The group name will be based on the system name and will be unique. The enablement of the group elements will be all non-cores enabled, all cores disabled.
mc::group rename 0 "My Group Name"
Renames the group at index 0 to "My Group Name".
mc::group enable 0 0.0
Enables the group at index 0 and the element at index 0.0 of the mc::group command.
mc::group remove "My Group Name"
Removes the group named "My Group Name".
mc::group removeall
Removes all groups.
Terminates the debug session for selected cores associated with the current thread context.
Syntax
mc::kill
Examples
mc::kill
Terminates multiple cores.
Resets multiple cores.
Syntax
mc::reset
Restarts the debug session for selected cores associated with the current thread context.
Syntax
mc::restart
Examples
mc::restart
Restarts multiple cores.
Stops the selected cores associated with the current thread context.
Syntax
mc::stop
Examples
mc::stop
Suspends multiple cores.
Shows the system types available for multicore debugging as well as type indices for use by the mc::type remove and mc::group new commands.
Syntax
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
Freescale Semiconductor, Inc.
275
Multi-Core Debugging Commands
Table 9-3. Multi-Core Debugging Commands
Command Shortcut Description
type type import <filename> type remove <filename>|
<type-index> ... type removeall
Examples
mc::type
Display or edit system types.
mc::type import 8572_jtag.txt
Creates a new type from the JTAG configuration file.
mc::type remove 8572_jtag.txt
Removes the type imported from the specified file.
mc::type removeall
Removes all imported types.
CodeWarrior Development Studio for StarCore 3900FP DSP Architectures Targeting Manual, Rev. 10.9.0,
11/2015
276 Freescale Semiconductor, Inc.