2 Replies Latest reply on Dec 18, 2019 2:18 AM by RaktimR_11

    OpenOCD failed on WICED6.3 for STM32F412+43438 wlan

    WaLo_3890256

      Hello experts,

       

      We have created a project on WICED 43xx_Wi-Fi sdk for STM32F412 MCU+43438 wlan chip.

      We have downloaded the make target such as "snip.scan-<platform_name> download run" to target platform successfully. When I tried to download the debugger to platform using "snip.scan-<platform_name>-debug download" and using st-link to debug. There are some error message showing:

      *****************************************************************************************************************************************************************************************************

      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

       

       

      16:36:23 Build Finished (took 31s.710ms)

      ****************************************************************************************************************************************************************************************************

       

      In devcie manager I can see the STM32 STLink and WICED USB serial port showing, means I connected both USB port and STlink debugger to the EVB.

      I have attached the openocd_log.txt.

       

      Please help for clarifying this issue and if need anything information please let me know.

      Your help will be appreciated.

      Thanks.

       

      BR,

      Wayne

        • 1. Re: OpenOCD failed on WICED6.3 for STM32F412+43438 wlan
          RaktimR_11

          Are you downloading through ST-Link or with the default FTDI-JTAG route? Please confirm whether the underlying transport protocol used is JTAG or SWD?

          • 2. Re: OpenOCD failed on WICED6.3 for STM32F412+43438 wlan
            RaktimR_11

            No you should not have to largely modify the stm32f4x.cfg. Since the underlying connection is JTAG, you should be able to largely use the existing WICED openocd infrastructure.

            1. Please add a custom .cfg file in 43xxx_Wi-Fi/tools/OpenOCD; maybe named as st-link.cfg. If it is st-link v2.1 you can populate the st-link.cfg with
            interface hla
            ahla_layout stl
            hla_device_desc "ST-LIinkNK/V2-1"
            hla_vid_pid 0x0483 0x374b
            source [find target/stm32f4x.cfg]
            

             

            2. In your sterling platform makefile, please add JTAG = st-link (chosen based on the naming convention shown in step 1) which should source the default stm32f4x.cfg shipped with openocd release and can be located inside at WICED at 43xxx_Wi-Fi/tools/OpenOCD/scripts/target/stm32f4x.cfg. To debug whether WICED is picking up this specific .cfg file instead of the default one, you can add some dummy echo statements in the 43xxx_Wi-Fi/tools/OpenOCD/scripts/target/stm32f4x.cfg file.

            echo "rroy debug"
            

             

            3. If you are following all the above mentioned steps along with the attached standard_platform_targets.mk file from the blog-post where you need to replace stm32f469discovery with st-link, you should not see the last error which is simply complaining about not being able to find the tcl script which is necessary to create the TAP.

             

            #pro tip: Always check the openocd_log.txt generated in the Build folder and see what it is complaining about. May be you can see some macros undefined in the default stm32f4x.cfg which you might need to modify with the WICED specific macros as found in 43xxx_Wi-Fi/tools/OpenOCD/stm32f4x.cfg

            1 of 1 people found this helpful