build: add flash.sh and all.sh scripts
This commit is contained in:
22
rust/all.sh
Executable file
22
rust/all.sh
Executable file
@@ -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
|
||||||
15
rust/flash.sh
Executable file
15
rust/flash.sh
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user