Update build and deploy scripts
This commit is contained in:
parent
25bbc174dc
commit
dac523c8b4
@ -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-esp32.sh
|
||||
|
||||
BOARD=ESP32_GENERIC
|
||||
VARIANT=SPIRAM
|
||||
source menu-esp32.sh
|
||||
if [ -z "$BOARD" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $MICROPYTHON
|
||||
make -C mpy-cross
|
||||
|
||||
cd $MICROPYTHON/ports/esp32
|
||||
make submodules
|
||||
make BOARD=$BOARD VARIANT=$VARIANT
|
||||
@ -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
|
||||
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Build MicroPython-LVGL app for: Unix/Linux systems
|
||||
|
||||
source env-variables-micropython.sh
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Clear build directories
|
||||
|
||||
ORIGINAL_DIR=$PWD
|
||||
|
||||
@ -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-esp32.sh
|
||||
|
||||
BOARD=ESP32_GENERIC
|
||||
VARIANT=SPIRAM
|
||||
source menu-esp32.sh
|
||||
if [ -z "$BOARD" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $MICROPYTHON/ports/esp32
|
||||
make deploy BOARD=$BOARD VARIANT=$VARIANT
|
||||
@ -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
|
||||
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set environment variables for ESP32 development
|
||||
|
||||
ESPIDF=~/esp/esp-idf-5-2-3
|
||||
|
||||
BOARD=ESP32_GENERIC
|
||||
|
||||
source $ESPIDF/export.sh
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set environment variables for MicroPython development
|
||||
|
||||
BUILD_VERBOSE=1
|
||||
|
||||
@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Erase the flash memory of the ESP32 board
|
||||
|
||||
source env-variables-micropython.sh
|
||||
source env-variables-esp32.sh
|
||||
|
||||
source menu-esp32.sh
|
||||
if [ -z "$BOARD" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $MICROPYTHON/ports/esp32
|
||||
make erase BOARD=$BOARD
|
||||
39
scripts/menu-esp32.sh
Normal file
39
scripts/menu-esp32.sh
Normal 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"
|
||||
Loading…
x
Reference in New Issue
Block a user