3 Replies Latest reply on Sep 6, 2019 5:56 AM by daan_4428806 Branched from an earlier discussion.

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

      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