Zephyr flash 项目错误 - west flash 命令失败

问题描述 投票:0回答:1

我指的是以下入门指南:https://docs.zephyrproject.org/latest/develop/getting_started/index.html

west build -p always -b rpi_pico samples/basic/blinky

运行时出现以下错误

west flash

操作系统:Ubuntu 24.04 LTS
开发板:Raspberry Pi Pico W
调试器/闪光器:Raspberry Pi 调试探针

我已将调试探针连接到 Raspberry Pi Pico W 上的调试连接器。

我已经安装了 J-Link 驱动程序。
我已经安装了openocd。

输出

(.venv) admin@admin-desktop:~/zephyrproject/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: /home/admin/zephyrproject/zephyr/build/zephyr/zephyr.hex
Open On-Chip Debugger 0.11.0+dev-00728-gb6f95a16c (2024-05-29-12:13)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
set_adapter_speed_if_not_set
swd
Can't find target/rp2040.cfg
FATAL ERROR: command exited with status 1: /home/admin/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -s /home/admin/zephyrproject/zephyr/boards/raspberrypi/rpi_pico/support -s /home/admin/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts -f /home/admin/zephyrproject/zephyr/boards/raspberrypi/rpi_pico/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 2000' '-c init' '-c targets' -c 'reset init' -c 'flash write_image erase /home/admin/zephyrproject/zephyr/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown
zephyr-rtos
1个回答
0
投票

您正在使用 openOCD 0.11,但根据文档,您至少需要 0.12 才能使用带有调试器的 SWT 界面。

查看https://docs.zephyrproject.org/latest/boards/raspberrypi/rpi_pico/doc/index.html#using-openocd

© www.soinside.com 2019 - 2024. All rights reserved.