# firmware Custom micropython build for the Olimex RP2350B-XL. Comes with some features enabled and modules bundled that are not part of an eventual upstream build. ## build instructions 0. Make sure to have a compiler toolchain supporting the RP2 architecture installed (Mac: `brew install gcc-arm-embedded`) 1. Clone *[pico-sdk](https://github.com/raspberrypi/pico-sdk)* (to this folder or somewhere else on your machine) 2. Change to the *pico-sdk* folder and run `git submodule update --init` 3. Point an environment variable `PICO_SDK_PATH` to the *pico-sdk* folder 4. Install *[picotool](https://github.com/raspberrypi/picotool)* 5. Clone the `micropython` repo (to this folder or somewhere else on your machine) 6. From within the `micropython` repo root, run `make -C mpy-cross` 7. Copy the `OLIMEX_PICO2_XL` folder to `micropython/ports/rp2/boards` if it doesn't exist; overwrite it if it does 8. Change to the `micropython/ports/rp2` folder 9. Run `make BOARD=OLIMEX_PICO2_XL submodules` to install dependencies 10. Run `make BOARD=OLIMEX_PICO2_XL clean` to remove previous build artefacts (if any) 11. Run `make BOARD=OLIMEX_PICO2_XL` to build the firmware ## flashing 0. The build output can be found in `micropython/ports/rp2/build-OLIMEX_PICO2_XL` (or in this folder for convenience) 1. Connect the MCU board to your computer using a data-capable USB cable 2. On the MCU board, hold `boot` while pressing `rst` 3. A new removable disk drive should appear. Copy `firmware.uf2` onto this disk drive - this will flash the MCU board with the custom micropython build. ## using Once micropython is flashed, copy `boot.py`, `main.py` and any auxiliary files for the specific hardware type onto the MCU flash. Refer to the micropython docs for further info.