System Workbench for STM32 – Bare Metal Edition provides a debug launcher to remotely debug your built project in your target. To create a new debug configuration, right-click on the project in the “Project Explorer” tab and select Debug As -> Debug configuration....
Or by selecting your project then click on the arrow on the right or the debug icon -> Debug configuration....
A New windows with the supported debug configuration is displayed. Please click on”Ac6 STM32 debugging” to create the new launch configuration.
The launch configuration is automatically filled. If your project has been built (binary file is detected in your project folder), you can immediately connect your board and debug your project.
The Main page of the Debug dialog box, identifies the project and application you want to run or debug.
The Debugger page of the Debug dialog box lets you select a debugger and the OpenOCD to use when debugging an application. Do not modify the value if you want to use the tools from System Workbench for STM32 – Bare Metal.
- OpenOCD
You can modify some OpenOCD options (Connection or Mode Setup) by clicking on Show generator options... button:
If you have a custom OpenOCD script or if the script is not detected, you can select another configuration file:
- STLinkServer
ST-Link Server is an application (http://www.st.com/en/development-tools/st-link-server.html) allowing:
- To share the debug interface of a single ST-Link board among several host applications. Typically a debugging tool and a monitoring tool. Of course, two debugging tools can’t control simultaneously the same target, but both may have access to it if choosing appropriate connection settings.
-To easily use and debug setups with multiple boards.
Enabling the “shareable ST-Link” option activates ST-Link Client execution flow.
- This option can only be used if ST-Link Server is installed.
To install ST-Link server see section installation
- Once activated the connected boards are listed.
- If no board are connected, a message informs the user:
The table viewer is subject to the following rules:
- This feature requires a ST-Link firmware version J28 and above.
- Only one board can be selected for a debug configuration.
- A default name is assigned to the board at first connection. It can be customized and remains persistent between workspaces.
- In order to identify a board among others a button allows to blink the led of associated ST-Link (require firmware version J28).
- A refresh button allows to check and update the list of the boards connected. Due to usb restriction with the operating systems, a new board is not automatically detected by ST-Link Server. A manual action by clicking on the refresh button needs to be done by the user.
The Startup page of the Debug dialog box lets you configure the debugger initialization command, runtime option and to add optional run commands.
The Source page of the Debug dialog box lets you specify the location of source files used when debugging a C or C++ application. By default, this information is taken from the build path of your project.
The Common page of the Debug dialog box lets you specify the location in which to store your run configuration and how you access it, how standard input and output is handled, and if background launches are enabled or not.