Debugging on a bare-metal target with a PEMicro probe requires the PEMicro GDB server
(Eclipse plug-in) to be installed on S32 Design Studio . Find the
details in topic Installing plug-ins.
To debug a bare-metal application on the board connected to the computer with a
PEMicro probe:
-
Create an application project in the wizard and specify “GDB PEMicro
Debugging Interface” as the debugger.
-
Build the application.
-
Open the Debug Configurations dialog and go to the
GDB PEMicro Interface Debugging group of
configurations. Click the debug configuration for debugging from RAM of from
flash generated for your project.
-
On the Debugger tab, specify the following mandatory
settings:
- Interface: Select the PEMicro debug interface
connected to the target device. Click Compatible
Hardware to open the PEMicro Web page and view the list
of targets supported by the selected debug interface.
- Port: If the debug interface uses a USB
connection, select the COM port labeled with the device name from the
Port menu. Click
Refresh to update the list of connected
ports.
- Target: Click Select
Device and select the target device. The vendor, family,
and type of the device appear in the respective fields.
- Core: Expand the Core list
and select the target core.
- Executable: Select or enter the path to the GDB
client.
Leave the remaining settings with their default values.
Note: To set up your configuration for a special debugging scenario, consult the
P&E GDB Server Plug-In debug configuration user guide. This document is
available in the <S32 Design Studio
installation path>/S32DS/help/pdf/ folder.
-
Click Apply, then click Debug.
The debug session is started and stopped at the first breakpoint (typically, at
main) that is specified on the
Startup tab in the Set breakpoint
at field.
-
To use real-time printf with Instrumentation Trace Macrocell (supported for
particular devices), click . In the SWO Printf console, click the Start
Trace (
) button.
-
Click Resume and debug the application as you always
do.
Note: When you use the GDB console commands to control the program, views are not
updated instantly. Use the step command to see the refreshed
views.