This firmware implements a co-processor firmware which makes the RP2040 function as both a dual USB to serial converter and an I2C slave device which allows the ESP32 to read button states and control things like the FPGA control signals and the SAO GPIOs.
This firmware has been tested to work when built using pico-sdk version 1.3.1 and 1.5.1
- Set up the Pico SDK and try to compile an example to check whether it's set up correctly
- Run
make build
to build the firmware,make flash
to flash ormake
to build & flash
If you're getting compilation errors, make sure you have the newest version of all toolchain components and run make clean
before retrying.
The included bootloader is based on RP2040 serial bootloader by Brian Starkey, licensed under BSD-3-Clause license.
The I2C peripheral function is based on pico_i2c_slave by Valentin Milea, MIT license.
The NEC infrared transmitter library is rpi-pico-nec-ir-transmit-pio by mjcross, licensed under BSD-3-Clause license.
The USB descriptor is based on the example from the tinyusb library by Ha Thach licensed under MIT license.
The makefile has been provided by Jana Marie Hemsing under MIT license.
The other parts of the firmware are original work by Renze Nicolai (Nicolai Electronics) licensed under MIT license.
You need the Raspberry Pi supplied version of openocd and a Raspberry Pi Pico flashed with the Picoprobe firmware hooked up to the SWD interface of the badge for this to work.
openocd -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl
arm-none-eabi-gdb build/rp2040_firmware.elf
(on the GDB prompt)
target extended-remote :3333
load
monitor reset init
continue