notes to build dev environment
resources: https://learn.adafruit.com/building-circuitpython/linux
VM build OS is Ubuntu 20.04.
sudo add-apt-repository ppa:pybricks/ppa
sudo apt-get update
sudo apt install build-essential git gettext uncrustify mtools
sudo apt install python3-pip
cd ~/
mkdir dev
cd dev
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
tar xvf gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
export PATH=/home/$USER/dev/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin:$PATH
cd ~/dev
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
tar xvf dosfstools-4.2.tar.gz
cd dosfstools-4.2
./configure
make
cd ~/dev
git clone https://github.com/im-redactd/circuitpython.git
cd circuitpython
make fetch-submodules
pip3 install --upgrade -r requirements-dev.txt
pip3 install --upgrade -r requirements-doc.txt
CPUS=8
make -j${CPUS} -C mpy-cross
git checkout 7.3.0
(for Ken: BOARD=adafruit_qtpy_rp2040 )
BOARD=raspberry_pi_pico
cd ~/dev/circuitpython/ports/raspberrypi
make -j${CPUS} BOARD=${BOARD}
build i2cperipheral library for circuitpython: ports/raspberrypi/common-hal/i2cperipheral
here's the micropython implementation: https://github.com/adamgreen/i2cperipheral
here's adafruits circuitpython implementation for another board as a reference: https://github.com/adafruit/circuitpython/blob/main/ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c
here's the rp2040 i2c class for references to the apis that might be needed for i2cperipheral: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/busio/I2C.c
here's a guide on how to extend circuitpython (old. not sure if still relevant): https://learn.adafruit.com/extending-circuitpython/overview