From db7535cf3e0358f96d1deb2e9d361144ff7c57fd Mon Sep 17 00:00:00 2001
From: tyeth <tyethgundry@googlemail.com>
Date: Thu, 19 Sep 2024 19:30:27 +0100
Subject: [PATCH] WipperSnapper on Funhouse causes bootloop and crash.
 Investigate #630

---
 platformio.ini | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/platformio.ini b/platformio.ini
index 05ac613fd..a91a87a1d 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -77,6 +77,14 @@ lib_deps =
     https://github.com/Sensirion/arduino-i2c-sen5x.git
     https://github.com/adafruit/WiFiNINA.git
     https://github.com/Starmbi/hp_BH1750.git
+    ;;;;;;;;;;;  FunHouse / LVGL Boards  ;;;;;;;;;;;;;;
+    https://github.com/adafruit/Adafruit_HX8357_Library.git
+    https://github.com/adafruit/Adafruit_ILI9341.git
+    https://github.com/adafruit/Adafruit_STMPE610.git 
+    https://github.com/adafruit/Adafruit-ST7735-Library.git
+    https://github.com/adafruit/Adafruit_TouchScreen.git
+    https://github.com/brentru/lvgl.git#wippersnapper
+    https://github.com/brentru/Adafruit_LvGL_Glue.git#development
 
 
 ; Common build environment for ESP32 platform
@@ -253,6 +261,53 @@ build_flags = -DARDUINO_METRO_ESP32S2 -DBOARD_HAS_PSRAM
 board_build.partitions = tinyuf2-partitions-4MB.csv
 extra_scripts =  pre:rename_usb_config.py
 
+; Adafruit Funhouse ESP32-S2
+[env:adafruit_funhouse_esp32s2]
+extends = common:esp32
+board = adafruit_funhouse_esp32s2
+build_flags = -DARDUINO_FUNHOUSE -DBOARD_HAS_PSRAM
+;set partition to tinyuf2-partitions-4MB.csv as of idf 5.1
+board_build.partitions = tinyuf2-partitions-4MB-noota.csv
+extra_scripts =  pre:rename_usb_config.py
+
+; Adafruit Funhouse ESP32-S2
+[env:adafruit_funhouse_esp32s2_debug]
+extends = common:esp32
+board = adafruit_funhouse_esp32s2
+;lib_extra_dirs = 
+build_type = debug
+build_flags =
+    -DARDUINO_FUNHOUSE
+    -DBOARD_HAS_PSRAM
+    -DCFG_TUSB_DEBUG=1
+    -DNDEBUG=1
+    -DDEBUG=1
+    -DESP_LOG_LEVEL=5
+    -DARDUINO_CORE_DEBUG_LEVEL=5
+    -DARDUINO_DEBUG_LEVEL=5
+    ;# -DARDUINO_DEBUG_OUTPUT=Serial
+    ;# -DARDUINO_DEBUG_BAUD=115200
+    ;-DARDUINO_USB_CDC_ON_BOOT=1
+    ;; cdc + usb otg (tinyusb)
+    ;-DARDUINO_USB_MODE=0
+    ;; hwcdc jtag
+    ;;-DARDUINO_USB_MODE=1
+    -DARDUINO_LOG_LEVEL=5
+    -DCORE_DEBUG_LEVEL=5
+    -DARDUHAL_LOG_LEVEL=5
+    ; lvgl debug
+    -DLVGL_DEBUG=1
+    -DLV_USE_LOG=1
+    -DLV_LOG_PRINTF=1
+    -DLV_LOG_MEM=1
+    -DLV_LOG_MEM_GUARD=1
+    -DLV_LOG_MEM_LEAK=1
+    -DLV_LOG_COLOR=1
+    -DLV_LOG_LEVEL=5
+;set partition to tinyuf2-partitions-4MB.csv as of idf 5.1
+board_build.partitions = tinyuf2-partitions-4MB-noota.csv
+extra_scripts =  pre:rename_usb_config.py
+
 ; Adafruit QT Py ESP32 Pico
 [env:adafruit_qtpy_esp32]
 extends = common:esp32