pico-ice
RaspberryPi Pico with an iCE40 FPGA
|
Once you receive the board, you would be able to plug via USB and see the RGB LED blinking. You might want to update the default firmware to make sure to have the latest bugfixes:
To provide the various USB programming methods and allow to boot the FPGA, a default firmware is loaded onto the RP2040 (Pico part of the pico-ice).
It provides:
See Programming the RP2040 for how to load this firmware file.
In case you ordered the board without the Pmod connectors soldered, you would need to solder them in to plug something onto the board. For instance like this:
The RP2040 on the pico-ice can be programmed with either custom C firmware, or languages such as MicroPython, CircuitPython, Go, Rust, JavaScript, ZeptoForth, Mecrisp Forth, ...
Currently C/C++ programming is best suported through the pico-ice-sdk: a Raspberry Pi pico-sdk library.
This is a guide for how to build application running on the RP2040 microcontroller.
The pico-ice-sdk provides an API for communicating with the pico-ice hardware, also allowing to use the Raspberry Pi pico-sdk directly.
The pico-ice-sdk is organised as a normal pico-sdk project with pico_ice
custom board.
The examples show how everything can be to get started.
Here is how to turn an example into a new project:
# copy the whole example directory cp -r pico-ice-sdk/examples/pico_usb_uart my-new-pico-ice-firmware cd my-new-pico-ice-firmware # turn it into a git repository git init git remote add origin git@github.com:your-username/my-new-pico-ice-firmware # replace the two symlinks by git submodules rm pico-sdk pico-ice-sdk git submodule add https://github.com/raspberrypi/pico-sdk git submodule add https://github.com/tinyvision-ai-inc/pico-ice-sdk # fetch the submodules (using --recursive is very slow) git -C pico-ice-sdk submodule update --init git -C pico-sdk submodule update --init lib/tinyusb # you can now build it as a CMake project mkdir build && cd build cmake .. && make
You can now edit the name of the project in the CMakeLists.txt, add new sources, and change the code.
Feel free to join the chat server to ask for help.
In order to power the FPGA, some peripherals and GPIO pins are in use by the pico-ice-sdk. In case both the firmware and SDK use the same peripheral, it is possible to use another free peripheral instance, or if none left, disable the feature of the SDK The ice_init()
is responsible for setting-up all peripherals used by the SDK. Instead, calling manually each ice_init_<feature>()
of interest permits to select what to enable or not in the board, and therefore keeping some more peripherals for the user.
The pico-sdk is written in C, but uses a single C++ file to enable C++ support in the SDK. This means you need a working C++ cross compiler, often named arm-none-eabi-g++
.
Even if this binary is present in your system, it might not be a full C++ installation. If you do not need C++ and want to work around this bug, you can disable the C++ support in the pico-sdk. From your project repo:
$ cd build $ cmake .. # download the SDK if not yet done $ sed -i '/new_delete.cpp/ d' _deps/pico-sdk-src/src/rp2_common/pico_standard_link/CMakeLists.txt $ cmake .. # rebuild the Makefile with the fix