stm32f4-discovery st-link support (con't)

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

cross mob
Anonymous
Not applicable

Hi,

I'm using Wiced SDK 3.5.2. I'm trying to flash images using stlink-v2(embedded on stm32f4 discovery board.)

Suppose i have blinky code built using keil, I can flash the image using command line as

start /B ./tools/OpenOCD/Win32/openocd-0.8.0.exe -f ./tools/OpenOCD/stlink-v2.cfg -f ./tools/OpenOCD/stm32f4x_stlink.cfg -f ./tools/OpenOCD/stm32f4x-flash-app.cfg -c init targets -c "halt" -c "program ./tools/OpenOCD/Win32/Blinky.hex" -c "reset run" -c "shutdown"

And it works!!

I downloaded the openocd-0.8.0 and performed the following

  • uzipped the zip file
  • Placed the openocd-0.8.0.exe(from extracted) to the /tools/OpenOCD/Win32/
  • Placed the stlink-v2.cfg(from openocd-0.8.0\scripts\interface) to /tools/OpenOCD/
  • Placed the  stm32f4x_stlink.cfg and stm32_stlink.cfg(openocd-0.8.0\scripts\target) and placed in to /tools/OpenOCD/

Then i tried to figure out the macros "OPENOCD_INTERFACE & OPENOCD_TARGET" but could ,and hence was unable follow the steps further . I just replaced the OPENOCD_FULL_NAME as

  • OPENOCD_FULL_NAME := $(OPENOCD_PATH)Win32/openocd-0.8.0.exe

This does not seems to work and I get following errors.

Downloading Bootloader ...

"**** 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 Application ...

"**** 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. ****"

Build complete

Making .gdbinit

Can you please elaborate to the steps preferable with exact changes in make file with example. Kindly help in this regard.

Waiting for response.

Thanks,

Nishal

0 Likes
3 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Adding seyhan​ on the applications team as he has helped others with similar issues.

gangi

0 Likes

The OpenOCD of WICED SDK 3.5.2 could direct support stlink!

You don't need to replace OpenOCD!, just change add stlink.cfg and stm324xx*.cfg !

It work for me under linux32/linux64/Win32(WinXP) !

0 Likes
daan_4428806
Level 1
Level 1

nilic_2169481

Hi Nishal,

Is this issue been resolved?

I'm facing this same kind of with WICED studio 6.3.0 for stm32f2xx series micro.

Please let me have your feedback as it will be very use full information even though this post been old.

Thanks in Advance.

Regards

JD

0 Likes