You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Add support for unPhone 9 (#74)
https://unphone.net/ What worked: - hx8357d Display and XPT2046 touch screen works - Turn display backlight on/off via TCA9555 chip - Buttons TODOs: - Use LEDs - LoRa - IR `.../lib/drivers/display/hx8357d/` is a not modified copy from https://github.com/lvgl-micropython/lvgl_micropython/tree/main/api_drivers/common_api_drivers/display/hx8357d `.../lib/drivers/indev/xpt2046.py` based on https://github.com/lvgl-micropython/lvgl_micropython/blob/main/api_drivers/common_api_drivers/indev/xpt2046.py but is modified: Because of the shared SPI bus for SPI for hx8357d display and xpt2046 touch controller. For this i add the management of `CS` pins for reading the touch controller. Let's discuss how to add this to upstream in https://github.com/lvgl-micropython/lvgl_micropython/issues/536
This commit is contained in:
+12
-4
@@ -14,6 +14,7 @@ if [ -z "$target" ]; then
|
||||
echo "Example: $0 macOS"
|
||||
echo "Example: $0 esp32"
|
||||
echo "Example: $0 esp32s3"
|
||||
echo "Example: $0 unphone"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -97,12 +98,18 @@ popd
|
||||
echo "Refreshing freezefs..."
|
||||
"$codebasedir"/scripts/freezefs_mount_builtin.sh
|
||||
|
||||
if [ "$target" == "esp32" -o "$target" == "esp32s3" ]; then
|
||||
if [ "$target" == "esp32" -o "$target" == "esp32s3" -o "$target" == "unphone" ]; then
|
||||
partition_size="4194304"
|
||||
flash_size="16"
|
||||
extra_configs=""
|
||||
if [ "$target" == "esp32" ]; then
|
||||
if [ "$target" == "esp32" ]; then
|
||||
BOARD=ESP32_GENERIC
|
||||
BOARD_VARIANT=SPIRAM
|
||||
else # esp32s3
|
||||
else # esp32s3 or unphone
|
||||
if [ "$target" == "unphone" ]; then
|
||||
partition_size="3900000"
|
||||
flash_size="8"
|
||||
fi
|
||||
BOARD=ESP32_GENERIC_S3
|
||||
BOARD_VARIANT=SPIRAM_OCT
|
||||
# These options disable hardware AES, SHA and MPI because they give warnings in QEMU: [AES] Error reading from GDMA buffer
|
||||
@@ -131,7 +138,8 @@ if [ "$target" == "esp32" -o "$target" == "esp32s3" ]; then
|
||||
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
|
||||
# CONFIG_ADC_MIC_TASK_CORE=1 because with the default (-1) it hangs the CPU
|
||||
# CONFIG_SPIRAM_XIP_FROM_PSRAM: load entire firmware into RAM to reduce SD vs PSRAM contention (recommended at https://github.com/MicroPythonOS/MicroPythonOS/issues/17)
|
||||
python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=$BOARD BOARD_VARIANT=$BOARD_VARIANT \
|
||||
# python3 make.py --ota --partition-size=$partition_size --flash-size=$flash_size esp32 BOARD=$BOARD BOARD_VARIANT=$BOARD_VARIANT \
|
||||
python3 make.py --optimize-size --partition-size=$partition_size --flash-size=$flash_size esp32 BOARD=$BOARD BOARD_VARIANT=$BOARD_VARIANT \
|
||||
USER_C_MODULE="$codebasedir"/micropython-camera-API/src/micropython.cmake \
|
||||
USER_C_MODULE="$codebasedir"/secp256k1-embedded-ecdh/micropython.cmake \
|
||||
USER_C_MODULE="$codebasedir"/c_mpos/micropython.cmake \
|
||||
|
||||
Reference in New Issue
Block a user