PI-HAT-Pico-BreakoutBoard
RPI-HAT-Pico-BreakoutBoard
Pico-BreakoutBoard is a user-friendly expansion board for Pico launched by MuseLab. The BreakoutBoard act as a raspberrypi hat, leads all GPIOs of Pico, and the pico is connected with SWD download interface and serial port provided by raspberrypi, which can be easily used for program & test of Pico.
Feature
- All GPIOs
- Serial
- SWD
- Reset
How to Use
Serial
raspberrypi | Pico |
---|---|
GND | GND |
GPIO15/RXD | GP0/UART0_TX |
GPIO14/TXD | GP1/UART0_RX |
on raspberrypi, you can use the minicom or picocom to open the serial port, for example:
$sudo apt install minicom
$minicom -b 115200 -o -D /dev/serial0
$sudo apt install picocom
$picocom -b 115200 /dev/serial0
more details please reference getting-started-with-pico section 4.5
SWD
Pico's onchiprom program implements a USB disk with drag-and-drop burning function, However, in some development scenarios, if you need to frequently modify the code and test, you need to repeatedly power down Pico, hold down the button and power up again, and wait for the USB enumeration to complete before you can drag and drop, which is a slightly tedious process. In fact, the Pico can be programmed & debugged through the SWD interface with the openocd, no need to re-power the Pico, just enter a command to complete, the detail is described as follows
- install openocd
$ cd ~/pico
$ sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-
dev
$ git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
$ make -j4
$ sudo make install
- This repository has wrapped the command into scripts, after export the environments variables, you can call the script in any path, note that the format of the burn suffix is hex or bin, not the drag and drop uf2 file
$cd RPI-HAT-Pico-BreakoutBoard/tools
$source env.sh
$rfw xxx.hex/xxx.bin
more details please reference getting-started-with-pico section 5
Product Link
Reference
pico-sdk
https://github.com/raspberrypi/pico-sdk
pico-examples
https://github.com/raspberrypi/pico-examples