-
Notifications
You must be signed in to change notification settings - Fork 3
Building MicroPython
The following instructions briefly explain how to build the current MicroPython firmware for the rp2040 Pico board and include the ulab
math/vector library and the libraries for the pico display pack module.
These instructions were compiled from here and here. They were tested using Ubuntu 20.4 installed in the Linux Subsystem of Windows 10.
-
To keep different MicroPython ports separated, using a folder for each is recommended. Here, we install the tools in the folder
pico
.mkdir pico cd pico/
-
Make sure your installation is up to date:
sudo apt update sudo apt install cmake gcc-arm-none-eabi build-essential
-
Clone and prepare the pico SDK:
git clone -b master https://github.com/raspberrypi/pico-sdk.git export PICO_SDK_PATH=~/pico/pico-sdk cd pico-sdk git submodule update --init
-
Clone and prepare MicroPython:
cd ~/pico git clone https://github.com/micropython/micropython cd micropython git submodule update --init lib/tinyusb git submodule update --init lib/pico-sdk cd lib/pico-sdk git submodule update --init git submodule update --init lib/tinyusb cd ../../mpy-cross make -j 8
-
Clone and prepare the Pimoroni repository:
cd ~/pico git clone https://github.com/pimoroni/pimoroni-pico.git
-
Clone the ulab repository into a subfolder of the Pimoroni folder :
cd ~/pico/pimoroni-pico/micropython/modules/ rm -r -f ulab git clone https://github.com/v923z/micropython-ulab ulab
-
Build the firmware:
cd ~/pico/micropython/ports/rp2 make clean make -j 8 USER_C_MODULES=../../../pimoroni-pico/micropython/modules/micropython.cmake
-
Deploy the firmware:
Open a Windows explorer window:
explorer.exe .
The file
firmware.uf2
in the folderbuild
contains the firmware image.Disconnect the Pico board from the USB cable, press the button on the board and keep it pressed while plugging in the USB cable. After releasing the button, a drive
RPI-RP2
pops up. Drag the filefirmware.uf2
onto that drive. The board should restart and offer the MicroPython REPL.
- Werkzeuge und Material (DE | EN)
- Aufbau
2.1 Mechanik (DE | EN)
2.2 Aufbau und Hinweise (DE | EN)
2.3 Elektronik und Platine (DE | EN) - Sensoren (DE | EN)
- Demo (DE | EN)
- Erweiterungen & Modifikationen
5.1 Alternatives Display (DE | EN)
5.2 CO2-Wächter (DE | EN) - Galerie (DE | EN)
- Software - MMBasic
7.1 MMBasic zum Laufen bringen (DE | EN)
7.2 Kommentare zum Programm (DE | EN)
7.3 Robotling API (DE | EN)
7.4 Building PicoMite MMBasic (DE | EN) - Software - MicroPython
8.1 Running MicroPython (DE | EN)
8.2 Building MicroPython (DE | EN)