From 31ee38782b0d9e0eecc01b2d0b1075b83c040613 Mon Sep 17 00:00:00 2001 From: ju6ge Date: Sun, 10 May 2026 14:24:24 +0200 Subject: [PATCH] build: add flash.sh and all.sh scripts --- rust/all.sh | 22 ++++++++++++++++++++++ rust/flash.sh | 15 +++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 rust/all.sh create mode 100755 rust/flash.sh diff --git a/rust/all.sh b/rust/all.sh new file mode 100755 index 0000000..befcff7 --- /dev/null +++ b/rust/all.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +"${SCRIPT_DIR}/build_website.sh" + +cargo build --release +espflash save-image \ + --bootloader "${SCRIPT_DIR}/bootloader.bin" \ + --partition-table "${SCRIPT_DIR}/partitions.csv" \ + --chip esp32c6 \ + target/riscv32imac-unknown-none-elf/release/plant-ctrl2 \ + "${SCRIPT_DIR}/image.bin" + +espflash flash --monitor \ + --bootloader "${SCRIPT_DIR}/bootloader.bin" \ + --chip esp32c6 \ + --baud 921600 \ + --partition-table "${SCRIPT_DIR}/partitions.csv" \ + target/riscv32imac-unknown-none-elf/release/plant-ctrl2 diff --git a/rust/flash.sh b/rust/flash.sh new file mode 100755 index 0000000..67ad0ac --- /dev/null +++ b/rust/flash.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +"${SCRIPT_DIR}/build_website.sh" + +cargo build --release +espflash flash --monitor \ + --bootloader "${SCRIPT_DIR}/bootloader.bin" \ + --chip esp32c6 \ + --baud 921600 \ + --partition-table "${SCRIPT_DIR}/partitions.csv" \ + target/riscv32imac-unknown-none-elf/release/plant-ctrl2