Difference between revisions of "Use ST-Link in Embedded Studio"
Line 1: | Line 1: | ||
+ | [[Category:Embedded Studio]] |
||
This article will explain how a ST-Link can be used for debugging in Embedded Studio. |
This article will explain how a ST-Link can be used for debugging in Embedded Studio. |
||
Latest revision as of 14:16, 16 May 2024
This article will explain how a ST-Link can be used for debugging in Embedded Studio.
Minimum Requirements
- Embedded Studio V8.10 or later
- ST-Link V2 or later
- STM32CubeProgrammer V2.14.0 or later
How to configure Embedded Studio to use ST-Link
- Install the STM32CubeProgrammer (we recommend to use the default path)
- Install Embedded Studio
- Create new Embedded Studio project or open existing one
- In Embedded Studio go to Tools->Options->Building->Build->Global Macros
- Set a global macro as follows: STM32CUBEPROGDIR=<path>
- Where <path> equals to the installation folder of the STM32CubeProgrammer. Default on Windows systems is: C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer
- Open the project settings of your Embedded Studio project and set option Debug > Debugger > Target Connection > ST-Link
- Next set option Debug > ST-Link > STM32CubeProgrammer directory > $(STM32CUBEPROGDIR)
That should be it. Now you should be able to debug with your ST-Link probe like you are used to with your J-Link probe.
Troubleshooting
- If the error is DEV_TARGET_CMD_ERR, it is possible that the target interface speed is selected to high. Try a lower speed in project settings under Debug > ST-Link > Speed.