Add the Raspberry Pi Pico 2 board (RP2350A, LED on GPIO25)

未关闭 适合新手
#111 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
cmake, python, raspberry-pi, yaml

调研方向

从 boards/rpi/pico2_w/board.yaml 开始,然后阅读 docs/engineering/hwgen.md 中的“A second board on the same SoC”和“A numbered GPIO bank: the RP2350”部分;使用 pico-sdk 的 boards/pico2.h 和 Pico 2 数据手册获取板卡信息。添加 boards/rpi/pico2/board.yaml,并使用 python3 -I hw/gen/emb-hwgen.py generate --board boards/rpi/pico2 生成文件。运行生成器检查和给定的 CMake 构建;检查通过且板卡构建成功即完成。

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue help wanted

Goal

Support the Raspberry Pi Pico 2 (the one without wireless). The Pico 2 W is supported and tested on hardware. The Pico 2 is the same RP2350A, but its user LED is on GPIO25, driven directly by the chip (the W's LED sits behind the wireless chip, so the W has none).

A board here is a description, not code: this should need one YAML file and no C.

What exists

  • boards/rpi/pico2_w/board.yaml: start from it.
  • docs/engineering/hwgen.md, "A second board on the same SoC", shows how the NUCLEO-F446ZE was added this way. "A numbered GPIO bank: the RP2350" shows how its pins are named.
  • Boards with an LED declare it as leds: [ { name: user, gpio: ..., active: high, doc: ... } ] (see the NUCLEO-F446RE's).

Steps

  1. Create boards/rpi/pico2/board.yaml from the Pico 2 W's: name pico2, the LED on GPIO25, and the text in doc: updated. Take facts from pico-sdk's boards/pico2.h and the Pico 2 datasheet, and say so in the header comment.
  2. python3 -I hw/gen/emb-hwgen.py generate --board boards/rpi/pico2, then python3 -I hw/gen/emb-hwgen.py check.
  3. Build it: cmake --preset cm33-pico2w -B build/pico2 -DEMB_BOARD=pico2 && cmake --build build/pico2.
  4. If the generator or board support refuses the LED, describe what it said in the issue. That is a useful finding in itself.
  5. If you have a Pico 2: copy a test image's UF2 to it and tell us what the console printed (UART0 on GPIO0/GPIO1, 115200 baud).

Done when

  • boards/rpi/pico2/ holds board.yaml and the generated/ the tool wrote, and nothing else.
  • emb-hwgen.py check passes, and the board builds.
主要语言
C
星标
1
派生
1
平均合并
14 小时 21 分钟
30 天内合并 PR
125

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

EmbLinkOs/EmbLinkRTOS 的其他 Issue

查看 EmbLinkOs/EmbLinkRTOS 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。