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
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

After looking into the mxchip spec, the integrated STM32F405 host does not have JTAG interface exposed, so I will check on the SWD interface and let you know.

0 Likes

I use EMW3162 , MCU is STM32F205
Many thanks

0 Likes

Did you contact mxchip for documentation on programming this module? You can refer to this documentation for jlink programming https://community.cypress.com/community/wiced-wifi/wiced-wifi-forums/blog/2018/07/26/downloading-thr...

0 Likes

MXCHIP made a Mico SDK by itself, but I don't want to use their SDK.

They don't have documentation on the WICED SDK.

use Mico SDK can download STM32F205,but WICED SDK cannot

I found ,Broadcom WICED patchs for MXCHIP wireless platform. https://github.com/MXCHIP/MXCHIP-for-WICED

but it's WICED SDK 5.0.1.

Can the latest WICED SDK 6.2.1 be used?

please help me.

many thanks

0 Likes

Adding youxiaoxiang​ from MXChip.

0 Likes

No reply, he hasn't logged in for a long time.

0 Likes

The community blog post mentioned above is applicable for WICED SDK 6.2.1 for jlink programming and you can try that. We don't support the github account so I do not know if those patches would work for 6.2.1.

0 Likes
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!

0 Likes