how use jlink-swd flashing stm32F205

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
diwuc_3612611
Level 1
Level 1
First like given

I use MXCHIP EMW3162 Module,it is STM32F205RGT6 + CYW43362.

This module only leads to the SWD pin

I have an error when I download the program with jlink-swd

"**** OpenOCD failed - ensure you have installed the driver from the drivers directory, and that the debugger is not running **** In Linux this may be due to USB access permissions. In a virtual machine it may be due to USB passthrough settings. Check in the task list that another OpenOCD process is not running. Check that you have the correct target and JTAG device plugged in. ****"

Downloading DCT ...

"**** OpenOCD failed - ensure you have installed the driver from the drivers directory, and that the debugger is not running **** In Linux this may be due to USB access permissions. In a virtual machine it may be due to USB passthrough settings. Check in the task list that another OpenOCD process is not running. Check that you have the correct target and JTAG device plugged in. ****"

Downloading resources filesystem ... build/snip.tcp_server-BCM943362WCD4-FreeRTOS-LwIP-SDIO/filesystem.bin at sector 1  size 52...

tools/makefiles/wiced_apps.mk:334: recipe for target 'FILESYSTEM_IMAGE_DOWNLOAD' failed

make.exe[1]: *** [FILESYSTEM_IMAGE_DOWNLOAD] Error 1

make.exe[1]: *** Waiting for unfinished jobs....

Makefile:351: recipe for target 'main_app' failed

make: *** [main_app] Error 2

open openocd_log.txt file

Open On-Chip Debugger 0.10.0+dev-00227-g0d15c62 (2018-03-27-15:19)

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 : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04

Info : Hardware version: 7.00

Info : VTarget = 3.300 V

Info : clock speed 1000 kHz

Error: BUG: can't assert SRST

in procedure 'init' called at file "./tools/OpenOCD/stm32f2x-flash-app.cfg", line 32

in procedure 'ocd_bouncer'

Open On-Chip Debugger 0.10.0+dev-00227-g0d15c62 (2018-03-27-15:19)

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 : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04

Info : Hardware version: 7.00

Info : VTarget = 3.300 V

Info : clock speed 1000 kHz

Error: BUG: can't assert SRST

in procedure 'init' called at file "./tools/OpenOCD/stm32f2x-flash-app.cfg", line 32

in procedure 'ocd_bouncer'

Open On-Chip Debugger 0.10.0+dev-00227-g0d15c62 (2018-03-27-15:19)

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 : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04

Info : Hardware version: 7.00

Info : VTarget = 3.300 V

Info : clock speed 1000 kHz

Error: BUG: can't assert SRST

in procedure 'init' called at file "./tools/OpenOCD/stm32f2x-flash-app.cfg", line 32

in procedure 'ocd_bouncer'

Open On-Chip Debugger 0.10.0+dev-00227-g0d15c62 (2018-03-27-15:19)

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 : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04

Info : Hardware version: 7.00

Info : VTarget = 3.300 V

Info : clock speed 1000 kHz

Error: BUG: can't assert SRST

in procedure 'init' called at file "./tools/OpenOCD/stm32f2x-flash-app.cfg", line 32

in procedure 'ocd_bouncer'

Open On-Chip Debugger 0.10.0+dev-00227-g0d15c62 (2018-03-27-15:19)

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 : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

post_init_psoc6_setup

Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04

Info : Hardware version: 7.00

Info : VTarget = 3.300 V

Info : clock speed 1000 kHz

Error: BUG: can't assert SRST

in procedure 'sflash_write_file'

in procedure 'sflash_init' called at file "apps/waf/sflash_write/sflash_write.tcl", line 261

in procedure 'init' called at file "apps/waf/sflash_write/sflash_write.tcl", line 155

in procedure 'ocd_bouncer'

0 Likes
1 Solution
DaMo_2831246
Level 3
Level 3
First like received First like given

Did you update OpenOCD, as per the MX-CHIP github repository for WICED (i.e. your previously cited  https://github.com/MXCHIP/MXCHIP-for-WICED) ? MX-CHIP made some unknown modifications to the default OpenOCD that shipped with the SDK, and programming their EMW3165 fails if you don't use their OpenOCD.

From their WICED GitHub page:

"Replace the same files in the WICED-SDK\tools\OpenOCD folder with the file in the patchs\OpenOCD folder."

Other error cases we've seen (again with the EMW3165, rather than the EM3162) are 1) Having another tool communicating via the ST-Link V2 when attempting to program (e.g. ST-Link Utility), and 2) not having the module powered when attempting to program.

Good luck!

View solution in original post

0 Likes
8 Replies