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


Problem with st link from IDE

Hi ST Folks!

Just got System Workbench for STM32 installed on my computer and encountered a problem when i tried to “run” the project. This is a dump from the Console:

Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-06-12-17:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v24 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.902500
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
adapter speed: 950 kHz
Error: timed out while waiting for target halted
TARGET: stm32f3x.cpu - Not halted
in procedure ‘program’
in procedure ‘reset’ called at file “embedded:startup.tcl”, line 478
in procedure ‘ocd_bouncer’

    • Unable to reset target **

shutdown command invoked


Maybe someone have had similar issues? I have no problem flashing the mcu with the st link utlity program.

Thanks!

France

Hi,
Which board are you using?
Did you update your System Workbench IDE after installing (Help >> Check for updates)? The installer is only updated a few times a year, while updates are available on a more frequent basis.
Bernard


Hi,
I have the same problem. I just update the Workbench to the latest Version and the working system no longer works.

“C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.8.0.201603291052\tools\openocd\bin\openocd.exe” -f stm32f3discovery.cfg -s “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts\st_board” -s “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts” -c “program Debug/t2.elf verify exit”
Open On-Chip Debugger 0.10.0-dev-00267-g884c33c (2016-03-16-12:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: open failed
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 473
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked

The board which I try to flash is the STM32F3Discovery.

Do someone have in the meantime already a solution?

After I reinstall the ST-Link over the Device Manager. I have a new ERROR:

10:52:53 **** Programing project t2 on chip ****
“C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.openocd.win32_1.8.0.201603291052\tools\openocd\bin\openocd.exe” -f stm32f3discovery.cfg -s “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts\st_board” -s “C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.8.0.201603291114\resources\openocd\scripts” -c “program Debug/t2.elf verify exit”
Open On-Chip Debugger 0.10.0-dev-00267-g884c33c (2016-03-16-12:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.907583
Error: init mode failed (unable to connect to the target)
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 473
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked


10:52:54 Build Finished (took 197ms)

May someone knows the cause?


Hi! Are you a linux user? Looks like the program doesent have permission to access the device. Have you tried running as superuser?

Hi, I’m a WIN 7 user.
I tryed your suggestion, but unfortunately it was not.


Try using the officia stlink drivers from st.com insted of openocd.

So, I already try this, but no result.

I try another hardware with a stm32L03 HW same problem, but with ST-Link utility it works to programm the HW.

here again the error:

Open On-Chip Debugger 0.10.0-dev-00267-g884c33c (2016-03-16-12:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 300 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : Unable to match requested speed 300 kHz, using 240 kHz
Info : clock speed 240 kHz
Error: open failed
in procedure ‘program’
in procedure ‘init’ called at file “embedded:startup.tcl”, line 473
in procedure ‘ocd_bouncer’

    • OpenOCD init failed **

shutdown command invoked


14:12:28 Build Finished (took 143ms)


comment these statement in your cfg file

  1. transport select “hla_jtag”
  2. set CPUTAPID 0x0bb11477

I had the same problem and fixed it by changing the reset config in the board.cfg file to:
reset_config trst_only

This also worked, but didn’t reset the MCU which was annoying:
reset_config none


hi folks ,
iam a beginner to stm32 . when i flashed the code to system workbench it was the result any help will be greatful.
Open On-Chip Debugger 0.10.0-dev-00007-g58350bc-dirty (2018-01-12-12:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter_nsrst_delay: 100
adapter speed: 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
Info : using stlink api v2
Info : Target voltage: 3.217323
Error: Unable to set adapter speed
Info : STM32F103C8Tx.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: Unable to set adapter speed
adapter speed: 950 kHz
Error: timed out while waiting for target halted
TARGET: STM32F103C8Tx.cpu - Not halted
in procedure ‘program’
in procedure ‘reset’ called at file “embedded:startup.tcl”, line 490
in procedure ‘ocd_bouncer’

    • Unable to reset target **

shutdown command invoked

Hi,

You should first update the stlink firmware to be able to change stlink freq (it could work anyway but it’s better to be up to date).

For the message “Unable to reset target ** “, you should connect the reset from the STlink or change the reset config in debug configuration (debugger tab) to “Software system reset”.

Rgds,
Laurent