-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
281 changed files
with
4,908 additions
and
8,458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
export TERM=${TERM:="xterm-256color"} | ||
|
||
function log_success { | ||
echo -e "$(tput setaf 2)$1$(tput sgr0)" | ||
} | ||
|
||
function log_inform { | ||
echo -e "$(tput setaf 6)$1$(tput sgr0)" | ||
} | ||
|
||
function log_warning { | ||
echo -e "$(tput setaf 1)$1$(tput sgr0)" | ||
} | ||
|
||
function micropython_clone { | ||
log_inform "Using MicroPython $MICROPYTHON_VERSION" | ||
git clone https://github.com/micropython/micropython | ||
cd micropython | ||
git checkout $MICROPYTHON_VERSION | ||
git cherry-pick -n 932f76c6ba64c5a3e68de3324556d9979f09303b | ||
git submodule update --init lib/pico-sdk | ||
git submodule update --init lib/cyw43-driver | ||
git submodule update --init lib/lwip | ||
git submodule update --init lib/mbedtls | ||
git submodule update --init lib/micropython-lib | ||
git submodule update --init lib/tinyusb | ||
git submodule update --init lib/btstack | ||
cd ../ | ||
} | ||
|
||
function micropython_build_mpy_cross { | ||
cd micropython/mpy-cross | ||
ccache --zero-stats || true | ||
CROSS_COMPILE="ccache " make | ||
ccache --show-stats || true | ||
cd ../../ | ||
} | ||
|
||
function apt_install_build_deps { | ||
sudo apt update && sudo apt install ccache | ||
} | ||
|
||
function micropython_version { | ||
echo "MICROPY_GIT_TAG=$MICROPYTHON_VERSION, $BOARD_NAME $TAG_OR_SHA" >> $GITHUB_ENV | ||
echo "MICROPY_GIT_HASH=$MICROPYTHON_VERSION-$TAG_OR_SHA" >> $GITHUB_ENV | ||
} | ||
|
||
function hack_patch_pico_sdk { | ||
# pico-sdk-patch.sh will apply the patch if it exists | ||
cd micropython | ||
$PIMORONI_PICO_DIR/micropython/board/pico-sdk-patch.sh $MICROPY_BOARD | ||
cd ../ | ||
} | ||
|
||
function cmake_configure { | ||
cmake -S micropython/ports/rp2 -B build-$BOARD_NAME \ | ||
-DPICO_BUILD_DOCS=0 \ | ||
-DUSER_C_MODULES=$USER_C_MODULES \ | ||
-DMICROPY_BOARD_DIR=$MICROPY_BOARD_DIR \ | ||
-DMICROPY_BOARD=$MICROPY_BOARD \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
} | ||
|
||
function cmake_build { | ||
ccache --zero-stats || true | ||
cmake --build build-$BOARD_NAME -j 2 | ||
ccache --show-stats || true | ||
cd build-$BOARD_NAME | ||
cp firmware.uf2 $RELEASE_FILE.uf2 | ||
} |
Oops, something went wrong.