title: Note of Raspberry Pi Pico

src: posts/2023-11-19-pico note.md

change log: None

created at: Jan. 24, 2026, 12:39 p.m., last updated: Jan. 24, 2026, 12:39 p.m.

Note of Raspberry Pi Pico

买了一块 pico 开发板,重新学习单片机

开箱体验

点亮 LED

用 respaberry 400 来搭开发环境,全靠官方文档

一步步走下来发现几个要点:

串口 Hellow World

pico/pico-examples/hello_world/serial

重要的工具

通用 cpu 编程的工具:

cmake

和 linux 应用编程不一样,单片机嘛,全都是静态链接!发现编译 sdk 挺慢的。

openocd

下载

openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg "program hello_serial.elf verify reset exit"

链接 debug

openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg 

gcc-arm-none-eabi

gdb-multiarch

(gdb) monitor reset init (gdb) continue

Hub07

参考 https://docs.circuitpython.org/en/8.2.x/shared-bindings/rgbmatrix/index.html

在 timer 里面延时

居然会在 uart 报错!

Attempted to sleep inside of an exception handler; use busy_wait if you must

太贴心了