To debug a project in WiSE Studio, a debug configuration is needed. To create a new debug
configuration, right-click on the project in the « Project Explorer » tab and select
Debug As > Debug configuration... or click on the debug button ()
in the toolbar. A New windows with the supported debug configuration is displayed. Please create a « WiSE C/C++ Application
Debugging » launch configuration.
You can change the name of your debug/run configuration in the « Name » edit box.
If the project was selected in the Project Explorer view to create the debug configuration, most of following data is automatically entered, take a moment to verify its accuracy or change as needed.
On the « Main » page, it regroup the information about your project. If not filled, browse your project then select the built application you want to debug.
Component | Description |
---|---|
Project | Specifies the name of the project. |
C/C++ Application | Specifies the name of the application. |
Search Project... | Specifies the binary or binaries to run within the project. |
Build before launching | Configure auto-build before launching the Run/Debug session |
The « Debugger » tab is automatically filled with ST-Link as the default JTAG probe, select the debug probe you are using. WiSE Studio supports ST-Link, Segger J-Link and CMSIS-DAP.
The communication between gdb and openocd requires a available port (default : 3333). If you need multiple debug session, do not forget to set different port number to avoid conflict between sessions.
Optionnally, you can also enter extra flags to the openocd command (such as debug flags « -d » to check error logs when openocd fails to connect with the debug interface).
For advanced user, it is possible to configure the probe and the reset.
Component | Description |
---|---|
GDB Command | Specifies the GDB debugger command (default: arm-none-eabi-gdb) |
OpenOCD Command | Specifies the OpenOCD command (default: openocd) |
Probe | Specifies the debugger interface (ST-Link, CMSIS-DAP or J-Link) |
Port number | Specifies the OpenOCD TCP/IP associated port (default:3333) if you have multiple debug sessions, each one must specifies a different port to avoid conflicts |
Other flags | Specifies the user extra flags to the OpenOCD command |
Advanced | Warning: Debug session might failed if wrong settings are applied |
Probe Interface | Only SWD supported |
Frequency | Specifies the debug frequency (default: 1200kHz) |
Serial ID | Specifies the USB Probe serial ID |
Reset mode | Specifies the reset mode (default: Software system reset) |
Reset delay | Specifies the reset delay (in milliseconds) |
Reset duration | Specifies the reset pulse width (in milliseconds) |
To change the debugger startup behavior, go to the « Startup » tab and set the needed commands. You can debug without loading the binary by unchecking « Load image » in the Load Image and Symbols section.
To start the debug session, click on the Debug button. If the current perspective is not on the Debug perspective, a message will suggest you to switch into the Debug perspective.