Create Debug/Run configuration

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.

ComponentDescription
ProjectSpecifies the name of the project.
C/C++ ApplicationSpecifies the name of the application.
Search Project...Specifies the binary or binaries to run within the project.
Build before launchingConfigure 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.

ComponentDescription
GDB CommandSpecifies the GDB debugger command (default: arm-none-eabi-gdb)
OpenOCD CommandSpecifies the OpenOCD command (default: openocd)
ProbeSpecifies the debugger interface (ST-Link, CMSIS-DAP or J-Link)
Port numberSpecifies 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 flagsSpecifies the user extra flags to the OpenOCD command
AdvancedWarning: Debug session might failed if wrong settings are applied
Probe InterfaceOnly SWD supported
FrequencySpecifies the debug frequency (default: 1200kHz)
Serial IDSpecifies the USB Probe serial ID
Reset modeSpecifies the reset mode (default: Software system reset)
Reset delaySpecifies the reset delay (in milliseconds)
Reset durationSpecifies 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.