Skip to content

Commit

Permalink
CI: Use correct baked examples directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Dec 4, 2024
1 parent 9817f61 commit 9bed6c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ci/micropython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ function ci_cmake_configure {
function ci_cmake_build {
BOARD=$1
MICROPY_BOARD_DIR=$CI_PROJECT_ROOT/boards/$BOARD
EXAMPLES_DIR=$CI_PROJECT_ROOT/examples/launcher/
# Hack to deal with each board needing its own baked directory
# TODO: We should probably define some means to configure this
# Like using CMake to invoke dir2uf2
EXAMPLES_DIR="$(print $BOARD | cut -d_ -f3)_unicorn/launch"
EXAMPLES_ROOT="$CI_PROJECT_ROOT/examples"
TOOLS_DIR=$CI_BUILD_ROOT/tools
BUILD_DIR="$CI_BUILD_ROOT/build-$BOARD"
ccache --zero-stats || true
Expand All @@ -129,7 +133,8 @@ function ci_cmake_build {

if [ -f "$MICROPY_BOARD_DIR/manifest.txt" ] && [ -d "$TOOLS_DIR/dir2uf2" ]; then
log_inform "Creating $(pwd)/$BOARD-with-filesystem.uf2"
log_inform "Using dir: $EXAMPLES_ROOT/$EXAMPLES_DIR"
python3 -m pip install littlefs-python==0.12.0
$TOOLS_DIR/dir2uf2/dir2uf2 --fs-compact --sparse --append-to "$(pwd)/$BOARD.uf2" --manifest "$MICROPY_BOARD_DIR/manifest.txt" --filename with-filesystem.uf2 "$EXAMPLES_DIR"
$TOOLS_DIR/dir2uf2/dir2uf2 --fs-compact --sparse --append-to "$(pwd)/$BOARD.uf2" --manifest "$MICROPY_BOARD_DIR/manifest.txt" --filename with-filesystem.uf2 "$EXAMPLES_ROOT/$EXAMPLES_DIR"
fi
}

0 comments on commit 9bed6c7

Please sign in to comment.