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


Try to flash STM32 with openocd from Ubuntu console

I try to flash my STM32 Boards with console.

What i try:
beowoolf@UbuntuVM:~/STM32Pro/F334R8Test/Debug$ ~/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.23.0.201904120827/tools/openocd/bin/openocd -f ~/STM32Pro/F334R8Test/F334R8Test\ Run.cfg -s ~/STM32Pro/F334R8Test/ -s ~/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.5.0.201904120827/resources/openocd/st_scripts -c “program Debug/F334R8Test.elf verify reset exit”

/home/beowoolf/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.23.0.201904120827/tools/openocd/bin/openocd: error while loading shared libraries: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory



I also try to install openocd independently from Ac6:

beowoolf@UbuntuVM:~/STM32Pro/F334R8Test/Debug$ ~/opt/gnu-mcu-eclipse/openocd/0.10.0-12-20190422-2015/bin/openocd -d0 -f ~/STM32Pro/F334R8Test/F334R8Test\ Run.cfg -c “init;targets;halt;flash write_image erase F334R8Test.hex;shutdown”

GNU MCU Eclipse OpenOCD, 64-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-20:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
srst_only separate srst_nogate srst_open_drain connect_assert_srst
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
TargetName Type Endian TapName State
-- ------ ---- -- ------ ------
0* STM32F334R8Tx.cpu hla_target little STM32F334R8Tx.cpu reset
Error: timed out while waiting for target halted

Somebody know which command Ac6 use to Flash?
over UI of eclipse flashing is working.

nobody knows how to use openocd?

Hi,

To run openocd from System Workbench for STM32 on a external console, you need to indicate the openocd shared libraries location (eg. export LD_LIBRARY_PATH=~/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.23.0.201904120827/tools/openocd/bin/openocd/lib:$LD_LIBRARY_PATH) then you can run the openocd command.

Our version of OpenOCD was modified to be adapted to ST latest targets as early as possible. The generated configuration scripts are not compatible with other OpenOCD versions.

Sorry for late reply, hope it helps.
Kevin
Ac6


hi,

thank you for the Linking hint. Now i can call openocd. But using my RUN.config generated by CubeMX failed with Can’t find interface/stlink.cfg.
is there something more i need to link?

beowoolf@UbuntuVM:~$ Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.23.0.201904120827/tools/openocd/bin/openocd -f STM32Pro/F334R8Test/F334R8Test\ Run.cfg -c “program STM32/F334R8Test/Debug/F334R8Test.elf verify reset exit”
Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
STM32Pro/F334R8Test/F334R8Test Run.cfg:6: Error: Can’t find interface/stlink.cfg
in procedure ‘script’
at file “embedded:startup.tcl”, line 60
at file “STM32Pro/F334R8Test/F334R8Test Run.cfg”, line 6


I think you need to add the scripts directory in the openocd command.
The scripts are in ~/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug.XXXXXXXXXXX/resources/openocd/st_scripts

> Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.23.0.201904120827/tools/openocd/bin/openocd -f STM32Pro/F334R8Test/F334R8Test\ Run.cfg -s ~/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug.XXXXXXXXXXX/resources/openocd/st_scripts -c “program STM32/F334R8Test/Debug/F334R8Test.elf verify reset exit”


fabulous.

Thank you
so it run :-))


 

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