aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/extmod/ulab/build/rp2.sh
blob: e89ab13c446f64c5a09635824243e7c386a6ad61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

export BUILD_DIR=$(pwd)
export MPY_DIR=$BUILD_DIR/micropython
export ULAB_DIR=$BUILD_DIR/../code

if [ ! -d $ULAB_DIR ]; then
    printf "Cloning ulab\n"
    ULAB_DIR=$BUILD_DIR/ulab/code
    git clone https://github.com/v923z/micropython-ulab.git ulab
fi

if [ ! -d $MPY_DIR ]; then
    printf "Cloning MicroPython\n"
    git clone https://github.com/micropython/micropython.git micropython
fi

cd $MPY_DIR
git submodule update --init
cd ./mpy-cross && make # build cross-compiler (required)

cd $MPY_DIR/ports/rp2
rm -r build
make USER_C_MODULES=$ULAB_DIR/micropython.cmake