|
@ -28,6 +28,7 @@ OPTIONS |
|
|
-a --autobuild PIO Build using the MOTHERBOARD environment. |
|
|
-a --autobuild PIO Build using the MOTHERBOARD environment. |
|
|
-u --autoupload PIO Upload using the MOTHERBOARD environment. |
|
|
-u --autoupload PIO Upload using the MOTHERBOARD environment. |
|
|
-v --verbose Extra output for debugging. |
|
|
-v --verbose Extra output for debugging. |
|
|
|
|
|
-s --silent Silence build output from PlatformIO. |
|
|
|
|
|
|
|
|
env shortcuts: tree due esp lin lpc|lpc8 lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41 |
|
|
env shortcuts: tree due esp lin lpc|lpc8 lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41 |
|
|
" |
|
|
" |
|
@ -62,6 +63,7 @@ while getopts 'abhmruvyn:t:-:' OFLAG; do |
|
|
esac |
|
|
esac |
|
|
;; |
|
|
;; |
|
|
r) REBUILD=1 ; bugout "Rebuilding previous..." ;; |
|
|
r) REBUILD=1 ; bugout "Rebuilding previous..." ;; |
|
|
|
|
|
s) SILENT_FLAG="-s" ;; |
|
|
t) TESTENV="$OPTARG" ; bugout "Got a target: $TESTENV" ;; |
|
|
t) TESTENV="$OPTARG" ; bugout "Got a target: $TESTENV" ;; |
|
|
u) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;; |
|
|
u) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;; |
|
|
v) DEBUG=1 ; bugout "Debug ON" ;; |
|
|
v) DEBUG=1 ; bugout "Debug ON" ;; |
|
@ -105,8 +107,8 @@ if ((REBUILD)); then |
|
|
# Build with the last-built env |
|
|
# Build with the last-built env |
|
|
[[ -f "$STATE_FILE" ]] || { errout "No previous (-r) build state found." ; exit 1 ; } |
|
|
[[ -f "$STATE_FILE" ]] || { errout "No previous (-r) build state found." ; exit 1 ; } |
|
|
read TESTENV <"$STATE_FILE" |
|
|
read TESTENV <"$STATE_FILE" |
|
|
pio run -s -d . -e $TESTENV |
|
|
pio run $SILENT_FLAG -d . -e $TESTENV |
|
|
exit |
|
|
exit 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
case $TESTENV in |
|
|
case $TESTENV in |
|
@ -189,12 +191,12 @@ if ((AUTO_BUILD)); then |
|
|
|
|
|
|
|
|
if ((AUTO_BUILD == 2)); then |
|
|
if ((AUTO_BUILD == 2)); then |
|
|
echo "Uploading environment $TARGET for board $MB ($BNUM)..." ; echo |
|
|
echo "Uploading environment $TARGET for board $MB ($BNUM)..." ; echo |
|
|
pio run -t upload -e $TARGET |
|
|
pio run $SILENT_FLAG -t upload -e $TARGET |
|
|
else |
|
|
else |
|
|
echo "Building environment $TARGET for board $MB ($BNUM)..." ; echo |
|
|
echo "Building environment $TARGET for board $MB ($BNUM)..." ; echo |
|
|
pio run -s -e $TARGET |
|
|
pio run $SILENT_FLAG -e $TARGET |
|
|
fi |
|
|
fi |
|
|
exit |
|
|
exit 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# |
|
|
# |
|
@ -306,6 +308,6 @@ fi |
|
|
|
|
|
|
|
|
[[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && { |
|
|
[[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && { |
|
|
((USE_MAKE)) && make tests-single-local TEST_TARGET=$TESTENV ONLY_TEST=$CHOICE |
|
|
((USE_MAKE)) && make tests-single-local TEST_TARGET=$TESTENV ONLY_TEST=$CHOICE |
|
|
((USE_MAKE)) || pio run -s -d . -e $TESTENV |
|
|
((USE_MAKE)) || pio run $SILENT_FLAG -d . -e $TESTENV |
|
|
echo "$TESTENV" >"$STATE_FILE" |
|
|
echo "$TESTENV" >"$STATE_FILE" |
|
|
} |
|
|
} |
|
|