From 529bd7e5565cb20fdba818303d91fa1763552b4e Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 17 Oct 2024 01:01:37 +0200 Subject: [PATCH] tune cangrow.sh --- Arduino/CanGrow/CanGrow.ino | 1 + cangrow.sh | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Arduino/CanGrow/CanGrow.ino b/Arduino/CanGrow/CanGrow.ino index ac07033..00a03e1 100644 --- a/Arduino/CanGrow/CanGrow.ino +++ b/Arduino/CanGrow/CanGrow.ino @@ -59,6 +59,7 @@ // https://github.com/PaulStoffregen/Time #include +#include "LittleFS.h" void setup() { diff --git a/cangrow.sh b/cangrow.sh index 0cb3f4c..d5162ce 100755 --- a/cangrow.sh +++ b/cangrow.sh @@ -4,11 +4,12 @@ test -z $TTY && TTY="/dev/ttyUSB0" test -z $IP && IP="192.168.30.212" test -z $VER && VER="0.1-dev" +test -z $BOARD && BOARD="esp8266:esp8266:d1_mini_clone" + BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')" ACLI="$HOME/.local/bin/arduino-cli" ACLI_CMD="$ACLI --config-file arduino-cli.yml" -BOARD="esp8266:esp8266:d1_mini_clone" function help() { echo "$0 [setup|build|upload|webupload|monitor]" @@ -74,11 +75,11 @@ case $1 in check_acli echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/" test -d build || mkdir build - echo "/* CanGrow_Version.h gets generated from cangrow.sh */ - -const char* CanGrowVer = \"${VER}\"; -const char* CanGrowBuild = \"${BUILD}\"; -" > Arduino/CanGrow/CanGrow_Version.h +# echo "/* CanGrow_Version.h gets generated from cangrow.sh */ +# +#const char* CanGrowVer = \"${VER}\"; +#const char* CanGrowBuild = \"${BUILD}\"; +#" > Arduino/CanGrow/CanGrow_Version.h ${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --output-dir build/ || exit 1 cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin ;;