Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Debug 2 devices on the same PC

Hi,
I have 2 custom board and 2 different workspace. I want try to debug the 2 boards with 2 different ST- LINK V2, is it possible ? Any guide I can follow to configure the 2 ST-LINK V2.

Thanks
Riccardo

You can configure each project to use a specific ST-Link by explicitly saying which ST-Link S/N to use.
To set specific ST-Link S/N you need to open Debug Configurations->Debugger and there in OpenOCD Options type “-c hla_serial xxxxxxxxxxxxxxxxxxxxxxxx”
To get your ST-Link’s serial you can use ST-Link Utility or STM CubeProgrammer
See screenshot attached
Stlink Sn

Hello,
so the only way to debug 2 board is have 2 different PC ?

Thanks
Riccardo


Hi Riccardo,

You can debug several boards in parallel with the same SW4STM32 and so the same workspace.

To do that:
- two projects, one for each custom board (on the same workspace)
- two debug configuration (one for each project)

Now you need to precise for each debug configuration, what is the board concerned.
Two possibilities in the debugger tab:
- using the STLink Server if the tool is installed on your machine OR
- using the openocd option : “-c hla_serial XXXXXXX” (where XXXXX is the ST-Link SN number that you can get through ST-Link Utility or STM CubeProgrammer)

Furthermore, if you debug the two projects in parallel, you must to define a different port number in the debug configuration (debugger tab).
Example 3333 for one and 3334 for the other.

BR,
Elliot

Hello,
thank you so much. I follow your instructions and able to debug without problem.

Thanks
Riccardo

Hi Elliot,

Any idea how to do your suggestion on PlatformIO IDE? I want to use several boards and would like to manage uploading on remotely using 2 st link, howerver, I am experiencing this error when having two ST-Link connected at the same time, but works just fine when I upload with one programmer on connected on the remote device
Warn : UNEXPECTED idcode: 0x1ba01477
Error: expected 1 of 1: 0x2ba01477
in procedure ‘program’

    • OpenOCD init failed **

shutdown command invoked

Thanks and hoping for your consideration. Beginner on programming here.

BR,

Jude


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs