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


Openocd Options wont pass command arguments correctly

I’m using the AC6 eclipse environment for debugging a number of applications running on the Nucleo-64 boards.
Usually I have 2 boards, one running a client application, the other running a server application.
When I’m using a single board the openocd debugging works well.
When I have more boards connected to my system I am unable to control which board Eclipse communicates with. It appears to always pick the first one it sees.

I know I can use the openocd command “hla_serial 066FFF545253675187172455” to select the target board by the serial. I know this works because I use this from the command line to load the images onto individual boards. I should be able to do the same thing from eclipse.
However when I provide the same command using the OpenOCD Options box in the debugger configuration

OpenOCD Options: -c “hla_serial 066FFF545253675187172455”

OpenOCD is unable to separate the command and parameter and thinks the whole string is the command giving this error:
invalid command name “hla_serial 066FFF545253675187172455”

If I remove the quotes then openocd does not receive the serial number argument, and tells me hla_serial requires a parameter.

I’ve tried every way I can think of to specify a string (single quotes, double quotes, escaped quotes, escaped spaces.) I simply cannot pass arguments to openOCD commands using the Options field.

It does appear to work for command strings in the OpenOCD Command field. However commands here come before the configuration script at which point the hla_serial is not valid. It needs to come after the scripts.
I suspect there is some error in the way the Options field is passed to the openocd command.

Has anyone else experienced this issue, and know of a workaround, either for passing the command arguments or selecting the target boards?

Cheers,
Andrew.

Tarek,

Glad it works for you. Are you running Ac6 on Winodws or Linux?
I’m running it on Ubuntu 16.04.
I ran the Eclipse updated, and confirmed I have the latest versions.
1.10.0.201607251855 for the OpenOCD and Debugging tools.

I’ve also discovered Eclipse works much cleaner when I set the environment variable SWT_GTK3=0.
With this I’ve managed to get the “Use Local Script” option working.

So my workaround for now is to create a custom configuration script and put the hla_serial into that.
This appears to work OK.
It would be nicer if the options field worked though.

Cheers,
Andrew.


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs