Update build and deploy scripts

This commit is contained in:
Gabor Peresztegi 2025-03-15 13:46:23 +01:00
parent 25bbc174dc
commit dac523c8b4
10 changed files with 68 additions and 32 deletions

View File

@ -1,14 +1,17 @@
# Build MicroPython-LVGL firmware for: Generic ESP32 boards #!/bin/bash
# Build MicroPython-LVGL firmware for ESP32 boards
source env-variables-micropython.sh source env-variables-micropython.sh
source env-variables-esp32.sh source env-variables-esp32.sh
BOARD=ESP32_GENERIC source menu-esp32.sh
VARIANT=SPIRAM if [ -z "$BOARD" ]; then
exit 1
fi
cd $MICROPYTHON cd $MICROPYTHON
make -C mpy-cross make -C mpy-cross
cd $MICROPYTHON/ports/esp32 cd $MICROPYTHON/ports/esp32
make submodules
make BOARD=$BOARD VARIANT=$VARIANT make BOARD=$BOARD VARIANT=$VARIANT

View File

@ -1,13 +0,0 @@
# Build MicroPython-LVGL firmware for: M5Stack Core2 ESP32
source env-variables-micropython.sh
source env-variables-esp32.sh
BOARD=M5STACK_CORE2
cd $MICROPYTHON
make -C mpy-cross
cd $MICROPYTHON/ports/esp32
make submodules
make BOARD=$BOARD

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Build MicroPython-LVGL app for: Unix/Linux systems # Build MicroPython-LVGL app for: Unix/Linux systems
source env-variables-micropython.sh source env-variables-micropython.sh

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Clear build directories # Clear build directories
ORIGINAL_DIR=$PWD ORIGINAL_DIR=$PWD

View File

@ -1,10 +1,14 @@
# Deploy firmware to device: Generic ESP32 boards #!/bin/bash
# Deploy firmware ESP32 boards
source env-variables-micropython.sh source env-variables-micropython.sh
source env-variables-esp32.sh source env-variables-esp32.sh
BOARD=ESP32_GENERIC source menu-esp32.sh
VARIANT=SPIRAM if [ -z "$BOARD" ]; then
exit 1
fi
cd $MICROPYTHON/ports/esp32 cd $MICROPYTHON/ports/esp32
make deploy BOARD=$BOARD VARIANT=$VARIANT make deploy BOARD=$BOARD VARIANT=$VARIANT

View File

@ -1,9 +0,0 @@
# Deploy firmware to device: M5Stack Core2 ESP32
source env-variables-micropython.sh
source env-variables-esp32.sh
BOARD=M5STACK_CORE2
cd $MICROPYTHON/ports/esp32
make deploy BOARD=$BOARD

View File

@ -1,8 +1,7 @@
#!/bin/bash
# Set environment variables for ESP32 development # Set environment variables for ESP32 development
ESPIDF=~/esp/esp-idf-5-2-3 ESPIDF=~/esp/esp-idf-5-2-3
BOARD=ESP32_GENERIC
source $ESPIDF/export.sh source $ESPIDF/export.sh

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Set environment variables for MicroPython development # Set environment variables for MicroPython development
BUILD_VERBOSE=1 BUILD_VERBOSE=1

View File

@ -1,7 +1,14 @@
#!/bin/bash
# Erase the flash memory of the ESP32 board # Erase the flash memory of the ESP32 board
source env-variables-micropython.sh source env-variables-micropython.sh
source env-variables-esp32.sh source env-variables-esp32.sh
source menu-esp32.sh
if [ -z "$BOARD" ]; then
exit 1
fi
cd $MICROPYTHON/ports/esp32 cd $MICROPYTHON/ports/esp32
make erase BOARD=$BOARD make erase BOARD=$BOARD

39
scripts/menu-esp32.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
# Show ESP32 board / variant selector menu
# Array of configurations
configs=(
"ESP32_GENERIC"
"ESP32_GENERIC SPIRAM"
"ESP32_GENERIC_S3"
"ESP32_GENERIC_S3 SPIRAM_OCT"
"M5STACK_CORE2"
)
# Function to display menu and get user choice
show_menu() {
echo "Select a configuration:"
for i in "${!configs[@]}"; do
echo "$((i+1)). ${configs[$i]}"
done
read -p "Enter your choice (1-${#configs[@]}): " choice
return $choice
}
# Display menu and get user choice
show_menu
choice=$?
# Validate user input
if [[ $choice -lt 1 || $choice -gt ${#configs[@]} ]]; then
echo "Invalid choice. Exiting."
exit 1
fi
# Set BOARD and VARIANT based on user choice
selected_config=(${configs[$((choice-1))]})
BOARD=${selected_config[0]}
VARIANT=${selected_config[1]:-""}
echo "Selected configuration: BOARD=$BOARD, VARIANT=$VARIANT"