personal_site/_drafts/2023-07-24-building-micropython.md
2023-07-31 14:27:48 +01:00

1.1 KiB

title, layout, image, alt
title layout image alt
Building Micropython from source post

These are notes to myself mainly.

  1. Start by following the main guide.

  2. For Mac you can get the build chain through a [special brew tap](https://github.com/ARMmbed/homebrew-formulae:

brew tap ArmMbed/homebrew-formulae
brew install arm-none-eabi-gcc

You also need the brew equivalents of the dependencies listed: brew install gcc cmake libffi-dev git pkg-config

  1. Build mpy-cross as directed.

  2. Build the unix port just because it's useful

  3. Build the port for the board you want, RP2040 for me

cd ports/rp2 
make submodules
make -j 16
  1. Build the port with additional libraries. I wanted to try out this display driver so following the build instructions there, I ran:
make USER_C_MODULES=../../../gc9a01_mpy/src/micropython.cmake all

If you run into trouble, it helps to make clean in between trying things. I upgraded my cmake and it didn't seem to help until I ran make clean and tried again.