Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-push-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: read
packages: write
env:
image: ghcr.io/${{ github.repository_owner }}/grid-fw-build:latest
image: ghcr.io/${{ github.repository_owner }}/grid-fw:latest
d51-path: d51n20a
esp-path: esp32s3
outputs:
Expand All @@ -30,7 +30,7 @@ jobs:
uses: ./.github/actions/prepare-image
with:
token: ${{ secrets.GITHUB_TOKEN }}
image-name: "grid-fw-build"
image-name: "grid-fw"
dockerfile: "Dockerfile"

- name: Build ESP32 firmware
Expand Down
4 changes: 2 additions & 2 deletions docker_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ else
exit 1
fi

IMAGE=${IMAGE:-grid-fw-build}
IMAGE=${IMAGE:-grid-fw}

# Check that the image exists
if [ -z "$(sudo docker images -q "$IMAGE")" ] ; then
if [ -z "$($CONTAINER_CMD images -q "$IMAGE")" ] ; then
echo "Image does not seem to exist."
exit 1
fi
Expand Down
9 changes: 0 additions & 9 deletions esp_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

SRC_DIR=esp32s3

NEW_BIN="$SRC_DIR"/build/grid_"$SRC_DIR".bin
OLD_BIN="$SRC_DIR"/build/old_grid_"$SRC_DIR".bin

if [ -f "$NEW_BIN" ] ; then
cp "$NEW_BIN" "$OLD_BIN"
else
truncate --size=0 "$OLD_BIN"
fi

if ! idf.py -C "$SRC_DIR" build ; then
exit 1
fi
Expand Down
11 changes: 10 additions & 1 deletion esp_flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ SRC_DIR=esp32s3
PORT=${PORT:-/dev/ttyUSB0}
OTA=${OTA:-yes}

esptool --chip esp32s3 -p "$PORT" -b 2000000 --before=default-reset --after=no-reset write-flash --flash-mode dio --flash-size detect --flash-freq 80m 0x10000 $SCRIPT_DIR/"$SRC_DIR"/build/grid_"$SRC_DIR".bin --diff-with $SCRIPT_DIR/"$SRC_DIR"/build/old_grid_"$SRC_DIR".bin
NEW_BIN=$SCRIPT_DIR/"$SRC_DIR"/build/grid_"$SRC_DIR".bin
OLD_BIN=$SCRIPT_DIR/"$SRC_DIR"/build/old_grid_"$SRC_DIR".bin
DIFF_ARG=""
if [ -f "$OLD_BIN" ]; then
DIFF_ARG="--diff-with $OLD_BIN"
fi

esptool --chip esp32s3 -p "$PORT" -b 2000000 --before=default-reset --after=no-reset write-flash --flash-mode dio --flash-size detect --flash-freq 80m 0x10000 "$NEW_BIN" $DIFF_ARG

cp "$NEW_BIN" "$OLD_BIN"

if [ "$OTA" = "yes" ]; then
otatool.py -p "$PORT" switch_ota_partition --slot 0
Expand Down
Loading