Skip to content

Commit 637d989

Browse files
committed
CI: Use correct baked examples directories.
1 parent 9817f61 commit 637d989

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ci/micropython.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ function ci_cmake_configure {
114114
function ci_cmake_build {
115115
BOARD=$1
116116
MICROPY_BOARD_DIR=$CI_PROJECT_ROOT/boards/$BOARD
117-
EXAMPLES_DIR=$CI_PROJECT_ROOT/examples/launcher/
117+
# Hack to deal with each board needing its own baked directory
118+
# TODO: We should probably define some means to configure this
119+
# Like using CMake to invoke dir2uf2
120+
EXAMPLES_DIR="$(printf $BOARD | cut -d_ -f3)_unicorn/launch"
121+
EXAMPLES_ROOT="$CI_PROJECT_ROOT/examples"
118122
TOOLS_DIR=$CI_BUILD_ROOT/tools
119123
BUILD_DIR="$CI_BUILD_ROOT/build-$BOARD"
120124
ccache --zero-stats || true
@@ -129,7 +133,8 @@ function ci_cmake_build {
129133

130134
if [ -f "$MICROPY_BOARD_DIR/manifest.txt" ] && [ -d "$TOOLS_DIR/dir2uf2" ]; then
131135
log_inform "Creating $(pwd)/$BOARD-with-filesystem.uf2"
136+
log_inform "Using dir: $EXAMPLES_ROOT/$EXAMPLES_DIR"
132137
python3 -m pip install littlefs-python==0.12.0
133-
$TOOLS_DIR/dir2uf2/dir2uf2 --fs-compact --sparse --append-to "$(pwd)/$BOARD.uf2" --manifest "$MICROPY_BOARD_DIR/manifest.txt" --filename with-filesystem.uf2 "$EXAMPLES_DIR"
138+
$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"
134139
fi
135140
}

0 commit comments

Comments
 (0)