cancel
Showing results for 
Search instead for 
Did you mean: 

ST-link with system workbench

Shane Gingell
Associate II
Posted on July 13, 2018 at 11:14

ATM I have to build the hex file then use STM ST-Link utility to flash the file to the MCU. 

If I try to flash from within system workbench the if fails this also means that I can't use debugger.

Has anyone else had this problem or know the solution to it??

here is the output from systemwork bench when trying to flash

19:04:19 **** Programming project SD5 on chip ****

'C:\\Ac6\\SystemWorkbench\\plugins\\fr.ac6.mcu.externaltools.openocd.win32_1.17.0.201801121207\\tools\\openocd\\bin\\openocd.exe' -f stm32.flash.4259900286939563601.cfg -s 'C:\\data\\SD5' -s 'C:\\Ac6\\SystemWorkbench\\plugins\\fr.ac6.mcu.debug_2.1.4.201801121207\\resources\\openocd\\st_scripts' -c 'program Debug/SD5.elf verify exit'

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

    

https://community.st.com/external-link.jspa?url=http%3A%2F%2Fopenocd.org%2Fdoc%2Fdoxygen%2Fbugs.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: 1800 kHz

Info : clock speed 1800 kHz

Info : STLINK v2 JTAG v17 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.241579

Info : STM32F407VETx.cpu: hardware has 6 breakpoints, 4 watchpoints

adapter speed: 1800 kHz

Error: timed out while waiting for target halted

TARGET: STM32F407VETx.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
1 REPLY 1
Shane Gingell
Associate II
Posted on July 14, 2018 at 11:23

OK after 3 days of googling I have found the problem and the solution.

The problem is the cheap Aliexpress st-link doesn't have the RST pin connected, it is on the st link but it isn't connected so when system work bench tries to do a hardware reset it can't.

The solution is in debug configurations under debug tab press show generator options then under reset mode choose software reset then the work bench will use a software reset using SWDIO pin instead of a hardware reset using RST pin.