Skip to content

Commit 498c420

Browse files
update build script
1 parent 65e7404 commit 498c420

1 file changed

Lines changed: 34 additions & 19 deletions

File tree

scripts/build_lvgl_micropython.sh

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,45 @@
1-
# Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2:
2-
# --ota: support Over-The-Air updates
3-
# --partition size: both OTA partitions are 4MB
4-
# --flash-size: total flash size is 16MB
5-
#
61

7-
buildtype="$1"
2+
target="$1"
3+
buildtype="$2"
84

9-
echo "Usage: $0 [devbuild/unix]"
10-
echo "Example: $0"
11-
echo "Example: $0 devbuild"
12-
echo
13-
echo "Adding 'devbuild' will build without any preinstalled files or builtin/ filsystem, so it will just start with a black screen and you'll have to do: ./scripts/install.sh to install the User Interface."
14-
sleep 2
5+
6+
if [ -z "$target" -o -z "$buildtype" ]; then
7+
echo "Usage: $0 <esp32 or unix or macos> <dev or prod>"
8+
echo "Example: $0"
9+
echo "Example: $0 devbuild"
10+
echo
11+
echo "Adding 'devbuild' will build without any preinstalled files or builtin/ filsystem, so it will just start with a black screen and you'll have to do: ./scripts/install.sh to install the User Interface."
12+
exit 1
13+
fi
1514

1615
pushd ~/sources/lvgl_micropython
1716

18-
manifest="FROZEN_MANIFEST=/home/user/sources/PiggyOS/manifest.py"
19-
if [ "$buildtype" == "devbuild" ]; then
20-
manifest=""
21-
fi
17+
manifest=""
2218

23-
if [ "$buildtype" != "unix" -a "$buildtype" != "macOS" ]; then
24-
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="/home/user/sources/micropython-camera-API/src/micropython.cmake" "$manifest"
19+
if [ "$target" == "esp32" ]; then
20+
if [ "$buildtype" == "prod" ]; then
21+
manifest="FROZEN_MANIFEST=/home/user/sources/PiggyOS/manifest.py"
22+
fi
23+
# Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2.
24+
# See https://github.com/lvgl-micropython/lvgl_micropython
25+
# --ota: support Over-The-Air updates
26+
# --partition size: both OTA partitions are 4MB
27+
# --flash-size: total flash size is 16MB
28+
# --debug: enable debugging from ESP-IDF but makes copying files to it very slow
29+
# --dual-core-threads: disabled GIL, run code on both CPUs
30+
# --task-stack-size={stack size in bytes}
31+
# CONFIG_* sets ESP-IDF options
32+
# listing processes on the esp32:
33+
# CONFIG_FREERTOS_USE_TRACE_FACILITY=y
34+
# CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y
35+
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
36+
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="/home/user/sources/micropython-camera-API/src/micropython.cmake" CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$manifest"
2537
else
38+
if [ "$buildtype" == "prod" ]; then
39+
manifest="FROZEN_MANIFEST=/home/user/sources/PiggyOS/manifest_unix.py"
40+
fi
2641
# build for desktop
27-
python3 make.py "$buildtype" DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard
42+
python3 make.py "$target" DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest"
2843
fi
2944

3045
popd

0 commit comments

Comments
 (0)