zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.71k stars 6.54k forks source link

OpenOCD not working for windows #64171

Closed MishalJasmine closed 10 months ago

MishalJasmine commented 1 year ago

Hi .. I am using Zephyr RTOS to build a firmware for Raspberry Pi Pico and using RaspberryPi Debug Probe for debug purpose. Although the build is happening succesfully, I am facing issues with the flashing.

Things I tried:

  1. I followed the instructions mentioned here. Installed the OpenOCD using MSYS2 but I am getting this error.

C:\Users\protocentral\protocentral_healthypi5_zephyr>west flash -- west flash: rebuilding [1/10] Performing build step for 'second_stage_bootloader' ninja: no work to do. [3/3] Completed 'second_stage_bootloader' -- west flash: using runner openocd FATAL ERROR: required program C:/Program Files/OpenOCD/bin/openocd.exe not found; install it or add its location to PATH

  1. I installed OpenOCD using the instructions given here. But I am getting this error

C:\Users\protocentral\protocentral_healthypi5_zephyr>west flash -- west flash: rebuilding [1/10] Performing build step for 'second_stage_bootloader' ninja: no work to do. [3/3] Completed 'second_stage_bootloader' -- west flash: using runner openocd -- runners.openocd: Flashing file: C:/Users/protocentral/protocentral_healthypi5_zephyr/build/zephyr/zephyr.hex Open On-Chip Debugger 0.12.0 (2023-10-02) [https://github.com/sysprogs/openocd] Licensed under GNU GPL v2 libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3 For bug reports, read http://openocd.org/doc/doxygen/bugs.html set_adapter_speed_if_not_set Can't find interface/cmsis-dap.cfg FATAL ERROR: command exited with status 1: 'C:/Program Files/OpenOCD/bin/openocd.exe' -s 'C:/Users/protocentral/protocentral_healthypi5_zephyr/boards/arm/healthypi5_rp2040\support' -s C:/Users/protocentral/zephyr-sdk-0.16.3/sysroots/AMD64-pokysdk-linux/usr/share/openocd/scripts -f 'C:/Users/protocentral/protocentral_healthypi5_zephyr/boards/arm/healthypi5_rp2040\support\openocd.cfg' -c 'source [find interface/cmsis-dap.cfg]' -c 'transport select swd' -c 'source [find target/rp2040.cfg]' -c 'set_adapter_speed_if_not_set 20000' '-c init' '-c targets' -c 'reset init' -c 'flash write_image erase C:/Users/protocentral/protocentral_healthypi5_zephyr/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown

what is it that I am doing wrong?

`

github-actions[bot] commented 1 year ago

Hi @MishalJasmine! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

github-actions[bot] commented 10 months ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

MishalJasmine commented 10 months ago

i followed the instructions given here and I was able to proceed with the flashing of the firmware.

yonsch commented 10 months ago

i followed the instructions given here and I was able to proceed with the flashing of the firmware.

@MishalJasmine So can this issue be closed?

MishalJasmine commented 10 months ago

Yes the issue can be closed.