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


Debugging more than one board

Hello there,
I was wondering how would the setup have to look like if I wanted to debug more than one board, at the same time, in the same workspace?

For example, I have 2x STM32 nucleo boards and 2 projects opened in eclipse, each one corresponding to one board. Now, how can make each debug configuration to be linked with a certain board? Because as for now, no matter which configuration I run, the board that will be debugged is the one that got connected to the USB first.

Screenshot: https://edysk.zut.edu.pl/index.php/s/Yuuz6CxZYnVuTEWQuestion

With Jlink I did 2 things to achieve this:
I changed the tcp port for each debugger,
I assigned different Jlink serial number to each debug configuration.
I would appreciate all help regarding this case.

Hi,
Are you using Ubuntu or Mac?
Warning : The fllowing tip is not functional on Ubuntu. It could be fixed in the next version of SW4STM32.

For all the boards and Debug Configurations :
1 - Find the ST-LINK SN : Launch from a terminal window :
cd C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility
ST-LINK_CLI.exe -c SWD
For example, the result is : ST-LINK SN : 0674FF485452785087212707
Then in all Debug Configurations, in the Debugger tab, update the OpenOCD Options field with :
“-c hla_serial 0674FF485452785087212707”

For only one Board/Debug Configuration :
2 - Change the port number in only one Debug configuration, for example Port Number = 3334 (instead of 3333)


I am on a windows platform. Thank you for the reply, I will test this as soon as I get the targets back. Will post back in case it wont work.

Hello there,
The configuration you have provided for me have worked for a while, but now it does not anymore. I Am not sure what happened. All I did really was changing the usb ports for the boards (Same PC, same system). Now no matter which configuration I run (I have 2 configs for 2 different boards just like you described) the first (lets call it first...) board is being programmed. The only way to program the second board is to disconnect the first one.

Please take a look at my configurations, they used to work:
https://www.dropbox.com/s/pm4kq2if3zt8ph2/Zrzut%20ekranu%202016-12-28%2008.05.28.png?dl=0Question
https://www.dropbox.com/s/j5foq47sxfkxpkl/Zrzut%20ekranu%202016-12-28%2008.05.33.png?dl=0Question

I would appreciate all help!


Hi there,
I have some further information about this problem (Maybe it could help somehow to resolve the bug).
I have noticed that when having 2 different debug configurations for 2 different boards (just like described in the topic) the following behaviour occurs:
- When I DEBUG the proper board is being debugged each time.
- When I use RUN on this configuration instead of DEBUG, always the 1st board is being programmed.

I could provide more details but please let me know either anyone could take a look at this?


Hello Bremenpl,
I reproduce this issue. It occurs while using the runner whereas it works with the debugger.
It seems that the runner configuration does not handle the “-c hla_serial XXX” option.
I think a fix is on going. I am looking for a workaround.
Keep you informed.


Ok, Ill appreciate all info!

Hi Bremenpl and Vetch,

You are both right.
Indeed, the runner does not handle options passed in the “OpenOCD Options” field.
A fix has been found, it will be integrated as soon as possible.

Regards,
vionf


 

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