|
This guide will explain how to setup Eclipse in order to use an ST-Link probe for debugging. The guide applies to both the standalone ST-Link and the embedded ST-Link found in the various STMicroelectronics Discovery kits. |
|
This guide will not enter into details of common system tasks like and not limited to:
This guide requires at least one of:
This guide will cover the use of the GDB server from TrueSTUDIO. Note that less expert users could just use TrueSTUDIO as-is, this guide is mainly directed to those of us who like to create their own development environment.
In order to get the TrueSTUDIO GDB server you need to download the TrueSTUDIO Lite for STM32 from here. The you have to extract the GDB server by opening the downloaded installer using an unpacker such as 7-Zip.
The server is located under ”./$[31]/Servers”, extract the whole directory “ST-LINK_gdbserver” and store it somewhere in your filesystem, for example “c:/utils”.
The server requires no installation except unpacking but you may want to update your ST-Link firmware using the provided ST-LinkUpgrade.exe utility.
Now we may want to launch the server directly from Eclipse, we need to configure a launcher:
Note that you have to create two launch configurations, one for the SWD mode and the other for the JTAG mode, the only difference is the ”-d” which selects the SWD mode and is not required in JTAG mode. Of course “Location” and “Working Directory” depend on where you unpacked the GDB Server.
Now we need to create a debug configuration for our project, you may use one of the STM32 projects present in ChibiOS/RT after having imported them into Eclipse using the procedure described in Using an Eclipse-based IDE.
Before debugging you have to start the ST-Link GDB Server but debugging using ST-Link is not different than debugging using any other GDB Server, please refer to the guide Using an Eclipse-based IDE.