Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is openocd in Zephyr toolchain too old? #858

Open
binEncoder opened this issue Feb 6, 2025 · 0 comments
Open

Is openocd in Zephyr toolchain too old? #858

binEncoder opened this issue Feb 6, 2025 · 0 comments

Comments

@binEncoder
Copy link

binEncoder commented Feb 6, 2025

I have the following questions related to the zephyr debug environment. Please help me if you are good at debugging. Thank you.

  1. Is openocd( https://github.com/zephyrproject-rtos/openocd?tab=readme-ov-file ) used by zephyr no longer maintained? Its version has been stuck at 0.11.0, which is several years old.
  2. If there is a debugging requirement, how can I install a higher version of openocd myself and use it in zephyr instead of using the lower version of zephyr provided.

The following are some of the processes I use to debug with pico 2.
I use a RasberryPi Pico2 and want to debug an elf built with zephyr using CMSIS-DAP( https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html ).
Below is my environment information.
OS: Ubuntu 22.04 jammy
Zephyr SDK( Toolchain ): 0.17.0
Zephyr: 4.0.99

The openocd version in the zephyr toolchain is 0.11.0, which does not contain rp2350.cfg.
I tried to get some openocd configuration information from the raspberrypi official website( https://github.com/raspberrypi/openocd ), and after using it with zephyr, I got the following errors.

  1. Can't find target/rp2350.cfg
    => I tried downloading it from the Raspberry Pi website and placing it in the appropriate location.
  2. rp2350.cfg:38: Error: Unknown param: -adiv6, try one of: -chain-position, -ignore-syspwrupack, -dp-id, or -instance-id
    => I deleted the error section in rp2350.cfg.
  3. rp2350.cfg:43: Error: Invalid AP number!
    ...

I also use the Raspberry Pi Pico SDK
( https://www.raspberrypi.com/documentation/pico-sdk/index_doxygen.html#raspberry-pi-pico-sdk ) and it can connect to my pico 2 normally.
From the pico sdk, I found that the openocd version it uses is 0.12.0.

  • Pico SDK( 2.1.0 ) + Openocd( 0.12.0 ) + Debug Probe => Connect Success
  • Zephyr( 4.0.99 ) + Zephyr SDK( 0.17.0 ) + Openocd( 0.11.0 ) + Debug Probe => Connect Fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant