with probe, left connector is uart, right is debug
yellow to swdio, black to gnd, orange to swclock
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
emacs ~/.arduino15/arduino-cli.yaml
board_manager:
additional_urls: [https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json]
arduino-cli core update-index
arduino-cli core install rp2040:rp2040
sudo emacs /etc/udev/rules.d/99-debugprobe.rules
SUBSYSTEM=="usb", \
ATTRS{idVendor}=="2e8a", \
ATTRS{idProduct}=="000c", \
TAG+="uaccess" \
MODE="660", \
GROUP="plugdev"
install openocd from raspberry pi
https://github.com/raspberrypi/openocd.git
./bootstrap
./configure
emacs makefile
FQBN=rp2040:rp2040:rpipico2
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
current_dir := $(notdir $(patsubst %/,%,$(mkfile_dir)))
upload_picoprobe: compile
openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000" -c "program build/$(current_dir).ino.elf verify reset exit"
upload_uf2:compile
arduino-cli upload -p UF2_Board --fqbn rp2040:rp2040:rpipico2 .
compile:
arduino-cli compile --fqbn $(FQBN) --output-dir build