Skip to content

Commit

Permalink
fix: do not break build if no openocd.cfg
Browse files Browse the repository at this point in the history
Currently C0 does not have openocd support, so no
openocd.cfg is available anyway build should succeed.

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Mar 30, 2023
1 parent 7fc1375 commit fa8f7b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions system/extras/postbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ BUILD_PATH="$1"
BUILD_SERIE="$2"
BOARD_PLATFORM_PATH="$3"

# Copy the correct openocd.cfg
cp -f "$BOARD_PLATFORM_PATH/variants/$BUILD_SERIE/openocd.cfg" "$BUILD_PATH"
# Copy the correct openocd.cfg if exists
if [ ! -f "$BOARD_PLATFORM_PATH/variants/$BUILD_SERIE/openocd.cfg" ]; then
printf 'No %s available. Debug is not supported.' "$BOARD_PLATFORM_PATH/variants/$BUILD_SERIE/openocd.cfg"
else
cp -f "$BOARD_PLATFORM_PATH/variants/$BUILD_SERIE/openocd.cfg" "$BUILD_PATH"
fi

0 comments on commit fa8f7b8

Please sign in to comment.