diff --git a/22_write_byhash.sh b/22_write_byhash.sh deleted file mode 100755 index 872eee7..0000000 --- a/22_write_byhash.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -source ./lib.sh - -# Get esptool command -BUILD_TOOL=$(lib_get_esptool_command) - -# Find port - Cross-platform detection -PORT=$(lib_detect_esptool_port) - -if [ -z "$PORT" ]; then - lib_no_esp_device_message_and_exit -fi - -echo "Using port: $PORT" - -# Define the paths to the firmware files -BUILD_PATH="." -BOOTLOADER_PATH="$BUILD_PATH/byhash.bootloader.bin" -PARTITIONS_PATH="$BUILD_PATH/byhash.partitions.bin" -FIRMWARE_PATH="$BUILD_PATH/byhash.bin" - -# Check if all required files exist -if [ ! -f "$BOOTLOADER_PATH" ]; then - echo "Bootloader file not found at $BOOTLOADER_PATH" - exit 1 -fi -if [ ! -f "$PARTITIONS_PATH" ]; then - echo "Partitions file not found at $PARTITIONS_PATH" - exit 1 -fi -if [ ! -f "$FIRMWARE_PATH" ]; then - echo "Firmware file not found at $FIRMWARE_PATH" - exit 1 -fi - -echo "Flashing complete ESP32 firmware..." -echo "Bootloader: $BOOTLOADER_PATH" -echo "Partitions: $PARTITIONS_PATH" -echo "Main firmware: $FIRMWARE_PATH" - -# Upload the complete firmware using esptool.py -$BUILD_TOOL --chip esp32 --port "$PORT" --baud 460800 write_flash -z \ - 0x1000 "$BOOTLOADER_PATH" \ - 0x8000 "$PARTITIONS_PATH" \ - 0x10000 "$FIRMWARE_PATH" && echo "Flashing completed." \ No newline at end of file diff --git a/33_write_latest.sh b/33_write_latest.sh deleted file mode 100755 index 7559a07..0000000 --- a/33_write_latest.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -source ./lib.sh - -# Get esptool command -BUILD_TOOL=$(lib_get_esptool_command) - -# Find port - Cross-platform detection -PORT=$(lib_detect_esptool_port) - -# Check if PORT is set, otherwise prompt user -if [ -z "$PORT" ]; then - lib_no_esp_device_message_and_exit -fi - -echo "Using port: $PORT" - -# Define the paths to the firmware files -BUILD_PATH="." -BOOTLOADER_PATH="$BUILD_PATH/latest.bootloader.bin" -PARTITIONS_PATH="$BUILD_PATH/latest.partitions.bin" -FIRMWARE_PATH="$BUILD_PATH/latest.bin" - -# Check if all required files exist -if [ ! -f "$BOOTLOADER_PATH" ]; then - echo "Bootloader file not found at $BOOTLOADER_PATH" - exit 1 -fi -if [ ! -f "$PARTITIONS_PATH" ]; then - echo "Partitions file not found at $PARTITIONS_PATH" - exit 1 -fi -if [ ! -f "$FIRMWARE_PATH" ]; then - echo "Firmware file not found at $FIRMWARE_PATH" - exit 1 -fi - -echo "Flashing complete ESP32 firmware..." -echo "Bootloader: $BOOTLOADER_PATH" -echo "Partitions: $PARTITIONS_PATH" -echo "Main firmware: $FIRMWARE_PATH" - -# Upload the complete firmware using esptool.py -$BUILD_TOOL --chip esp32 --port "$PORT" --baud 460800 write_flash -z \ - 0x1000 "$BOOTLOADER_PATH" \ - 0x8000 "$PARTITIONS_PATH" \ - 0x10000 "$FIRMWARE_PATH" && echo "Flashing completed." \ No newline at end of file diff --git a/34_write_byhash.sh b/34_write_byhash.sh new file mode 100755 index 0000000..872eee7 --- /dev/null +++ b/34_write_byhash.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +source ./lib.sh + +# Get esptool command +BUILD_TOOL=$(lib_get_esptool_command) + +# Find port - Cross-platform detection +PORT=$(lib_detect_esptool_port) + +if [ -z "$PORT" ]; then + lib_no_esp_device_message_and_exit +fi + +echo "Using port: $PORT" + +# Define the paths to the firmware files +BUILD_PATH="." +BOOTLOADER_PATH="$BUILD_PATH/byhash.bootloader.bin" +PARTITIONS_PATH="$BUILD_PATH/byhash.partitions.bin" +FIRMWARE_PATH="$BUILD_PATH/byhash.bin" + +# Check if all required files exist +if [ ! -f "$BOOTLOADER_PATH" ]; then + echo "Bootloader file not found at $BOOTLOADER_PATH" + exit 1 +fi +if [ ! -f "$PARTITIONS_PATH" ]; then + echo "Partitions file not found at $PARTITIONS_PATH" + exit 1 +fi +if [ ! -f "$FIRMWARE_PATH" ]; then + echo "Firmware file not found at $FIRMWARE_PATH" + exit 1 +fi + +echo "Flashing complete ESP32 firmware..." +echo "Bootloader: $BOOTLOADER_PATH" +echo "Partitions: $PARTITIONS_PATH" +echo "Main firmware: $FIRMWARE_PATH" + +# Upload the complete firmware using esptool.py +$BUILD_TOOL --chip esp32 --port "$PORT" --baud 460800 write_flash -z \ + 0x1000 "$BOOTLOADER_PATH" \ + 0x8000 "$PARTITIONS_PATH" \ + 0x10000 "$FIRMWARE_PATH" && echo "Flashing completed." \ No newline at end of file diff --git a/44_write_latest.sh b/44_write_latest.sh new file mode 100755 index 0000000..7559a07 --- /dev/null +++ b/44_write_latest.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +source ./lib.sh + +# Get esptool command +BUILD_TOOL=$(lib_get_esptool_command) + +# Find port - Cross-platform detection +PORT=$(lib_detect_esptool_port) + +# Check if PORT is set, otherwise prompt user +if [ -z "$PORT" ]; then + lib_no_esp_device_message_and_exit +fi + +echo "Using port: $PORT" + +# Define the paths to the firmware files +BUILD_PATH="." +BOOTLOADER_PATH="$BUILD_PATH/latest.bootloader.bin" +PARTITIONS_PATH="$BUILD_PATH/latest.partitions.bin" +FIRMWARE_PATH="$BUILD_PATH/latest.bin" + +# Check if all required files exist +if [ ! -f "$BOOTLOADER_PATH" ]; then + echo "Bootloader file not found at $BOOTLOADER_PATH" + exit 1 +fi +if [ ! -f "$PARTITIONS_PATH" ]; then + echo "Partitions file not found at $PARTITIONS_PATH" + exit 1 +fi +if [ ! -f "$FIRMWARE_PATH" ]; then + echo "Firmware file not found at $FIRMWARE_PATH" + exit 1 +fi + +echo "Flashing complete ESP32 firmware..." +echo "Bootloader: $BOOTLOADER_PATH" +echo "Partitions: $PARTITIONS_PATH" +echo "Main firmware: $FIRMWARE_PATH" + +# Upload the complete firmware using esptool.py +$BUILD_TOOL --chip esp32 --port "$PORT" --baud 460800 write_flash -z \ + 0x1000 "$BOOTLOADER_PATH" \ + 0x8000 "$PARTITIONS_PATH" \ + 0x10000 "$FIRMWARE_PATH" && echo "Flashing completed." \ No newline at end of file