From f1d75e780f2ee11b8750945e426954b0479cef39 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Fri, 3 Jul 2026 01:04:45 +0200 Subject: [PATCH] device.properties must set user data path to internal flash or sd card --- CMakeLists.txt | 1 + Devices/btt-panda-touch/device.properties | 2 ++ Devices/cyd-2432s024c/device.properties | 2 ++ Devices/cyd-2432s024r/device.properties | 2 ++ Devices/cyd-2432s028r/device.properties | 2 ++ Devices/cyd-2432s028rv3/device.properties | 2 ++ Devices/cyd-2432s032c/device.properties | 2 ++ Devices/cyd-3248s035c/device.properties | 2 ++ Devices/cyd-4848s040c/device.properties | 2 ++ Devices/cyd-8048s043c/device.properties | 2 ++ Devices/cyd-e32r28t/device.properties | 2 ++ Devices/cyd-e32r32p/device.properties | 2 ++ .../elecrow-crowpanel-advance-28/device.properties | 2 ++ .../elecrow-crowpanel-advance-35/device.properties | 2 ++ .../elecrow-crowpanel-advance-50/device.properties | 2 ++ Devices/elecrow-crowpanel-basic-28/device.properties | 2 ++ Devices/elecrow-crowpanel-basic-35/device.properties | 2 ++ Devices/elecrow-crowpanel-basic-50/device.properties | 2 ++ Devices/generic-esp32/device.properties | 1 + Devices/generic-esp32c6/device.properties | 1 + Devices/generic-esp32p4/device.properties | 1 + Devices/generic-esp32s3/device.properties | 1 + Devices/guition-jc1060p470ciwy/device.properties | 2 ++ Devices/guition-jc2432w328c/device.properties | 2 ++ Devices/guition-jc3248w535c/device.properties | 2 ++ Devices/guition-jc8048w550c/device.properties | 2 ++ Devices/heltec-wifi-lora-32-v3/device.properties | 2 ++ Devices/lilygo-tdeck/device.properties | 2 ++ Devices/lilygo-tdisplay-s3/device.properties | 2 ++ Devices/lilygo-tdisplay/device.properties | 2 ++ Devices/lilygo-tdongle-s3/device.properties | 2 ++ Devices/lilygo-thmi/device.properties | 2 ++ Devices/lilygo-tlora-pager/device.properties | 2 ++ Devices/m5stack-cardputer-adv/device.properties | 2 ++ Devices/m5stack-cardputer/device.properties | 2 ++ Devices/m5stack-core2/device.properties | 2 ++ Devices/m5stack-cores3/device.properties | 4 +++- Devices/m5stack-papers3/device.properties | 4 ++-- Devices/m5stack-stackchan/device.properties | 2 ++ Devices/m5stack-stickc-plus/device.properties | 2 ++ Devices/m5stack-stickc-plus2/device.properties | 2 ++ Devices/m5stack-sticks3/device.properties | 2 ++ Devices/m5stack-tab5/device.properties | 2 ++ Devices/simulator/device.properties | 2 ++ Devices/unphone/device.properties | 2 ++ Devices/waveshare-esp32-s3-geek/device.properties | 2 ++ Devices/waveshare-s3-lcd-13/device.properties | 2 ++ Devices/waveshare-s3-touch-lcd-128/device.properties | 4 +++- Devices/waveshare-s3-touch-lcd-147/device.properties | 2 ++ Devices/waveshare-s3-touch-lcd-43/device.properties | 2 ++ .../wireless-tag-wt32-sc01-plus/device.properties | 2 ++ Firmware/Kconfig | 12 ++++++++++++ Tactility/Source/Paths.cpp | 11 ++++++++--- device.py | 8 ++++++++ 54 files changed, 127 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ebdb742a..4054608f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ else () add_compile_definitions(CONFIG_TT_DEVICE_NAME_SIMPLE="Simulator") add_compile_definitions(CONFIG_TT_LAUNCHER_APP_ID="Launcher") add_compile_definitions(CONFIG_TT_AUTO_START_APP_ID="") + add_compile_definitions(CONFIG_TT_USER_DATA_LOCATION_INTERNAL) endif () project(Tactility) diff --git a/Devices/btt-panda-touch/device.properties b/Devices/btt-panda-touch/device.properties index b34ee6e4b..8e65fa6d2 100644 --- a/Devices/btt-panda-touch/device.properties +++ b/Devices/btt-panda-touch/device.properties @@ -12,6 +12,8 @@ hardware.esptoolFlashFreq=120M hardware.bluetooth=true hardware.usbHostEnabled=true +storage.userDataLocation=Internal + display.size=5" display.shape=rectangle display.dpi=187 diff --git a/Devices/cyd-2432s024c/device.properties b/Devices/cyd-2432s024c/device.properties index 8c41c3e86..0f2a5c1de 100644 --- a/Devices/cyd-2432s024c/device.properties +++ b/Devices/cyd-2432s024c/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.4" display.shape=rectangle display.dpi=167 diff --git a/Devices/cyd-2432s024r/device.properties b/Devices/cyd-2432s024r/device.properties index b54d29d5f..b2e05d040 100644 --- a/Devices/cyd-2432s024r/device.properties +++ b/Devices/cyd-2432s024r/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.4" display.shape=rectangle display.dpi=167 diff --git a/Devices/cyd-2432s028r/device.properties b/Devices/cyd-2432s028r/device.properties index ff1db8b35..c0047a338 100644 --- a/Devices/cyd-2432s028r/device.properties +++ b/Devices/cyd-2432s028r/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/cyd-2432s028rv3/device.properties b/Devices/cyd-2432s028rv3/device.properties index c35b6414e..ae3e926f9 100644 --- a/Devices/cyd-2432s028rv3/device.properties +++ b/Devices/cyd-2432s028rv3/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/cyd-2432s032c/device.properties b/Devices/cyd-2432s032c/device.properties index 239afa35b..e483bd8c2 100644 --- a/Devices/cyd-2432s032c/device.properties +++ b/Devices/cyd-2432s032c/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=3.2" display.shape=rectangle display.dpi=125 diff --git a/Devices/cyd-3248s035c/device.properties b/Devices/cyd-3248s035c/device.properties index fedfa096f..c8fc929d1 100644 --- a/Devices/cyd-3248s035c/device.properties +++ b/Devices/cyd-3248s035c/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Devices/cyd-4848s040c/device.properties b/Devices/cyd-4848s040c/device.properties index 6dc012050..45c66c54e 100644 --- a/Devices/cyd-4848s040c/device.properties +++ b/Devices/cyd-4848s040c/device.properties @@ -10,6 +10,8 @@ hardware.spiRamMode=OCT hardware.spiRamSpeed=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=4" display.shape=rectangle display.dpi=170 diff --git a/Devices/cyd-8048s043c/device.properties b/Devices/cyd-8048s043c/device.properties index 94659babd..8056421d5 100644 --- a/Devices/cyd-8048s043c/device.properties +++ b/Devices/cyd-8048s043c/device.properties @@ -12,6 +12,8 @@ hardware.spiRamSpeed=80M hardware.esptoolFlashFreq=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=4.3" display.shape=rectangle display.dpi=217 diff --git a/Devices/cyd-e32r28t/device.properties b/Devices/cyd-e32r28t/device.properties index f9b582a91..0adcd93d7 100644 --- a/Devices/cyd-e32r28t/device.properties +++ b/Devices/cyd-e32r28t/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/cyd-e32r32p/device.properties b/Devices/cyd-e32r32p/device.properties index 1895aa401..3c10c3e89 100644 --- a/Devices/cyd-e32r32p/device.properties +++ b/Devices/cyd-e32r32p/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=125 diff --git a/Devices/elecrow-crowpanel-advance-28/device.properties b/Devices/elecrow-crowpanel-advance-28/device.properties index 797e53f9c..9d2fd7949 100644 --- a/Devices/elecrow-crowpanel-advance-28/device.properties +++ b/Devices/elecrow-crowpanel-advance-28/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/elecrow-crowpanel-advance-35/device.properties b/Devices/elecrow-crowpanel-advance-35/device.properties index 0bc352e62..833744397 100644 --- a/Devices/elecrow-crowpanel-advance-35/device.properties +++ b/Devices/elecrow-crowpanel-advance-35/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Devices/elecrow-crowpanel-advance-50/device.properties b/Devices/elecrow-crowpanel-advance-50/device.properties index f1a00e282..9fa787d6a 100644 --- a/Devices/elecrow-crowpanel-advance-50/device.properties +++ b/Devices/elecrow-crowpanel-advance-50/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=5" display.shape=rectangle display.dpi=187 diff --git a/Devices/elecrow-crowpanel-basic-28/device.properties b/Devices/elecrow-crowpanel-basic-28/device.properties index 7843d8298..61b715566 100644 --- a/Devices/elecrow-crowpanel-basic-28/device.properties +++ b/Devices/elecrow-crowpanel-basic-28/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/elecrow-crowpanel-basic-35/device.properties b/Devices/elecrow-crowpanel-basic-35/device.properties index b768e1574..c9bb6094c 100644 --- a/Devices/elecrow-crowpanel-basic-35/device.properties +++ b/Devices/elecrow-crowpanel-basic-35/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Devices/elecrow-crowpanel-basic-50/device.properties b/Devices/elecrow-crowpanel-basic-50/device.properties index 5f71e02e4..69633d2ae 100644 --- a/Devices/elecrow-crowpanel-basic-50/device.properties +++ b/Devices/elecrow-crowpanel-basic-50/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=5.0" display.shape=rectangle display.dpi=187 diff --git a/Devices/generic-esp32/device.properties b/Devices/generic-esp32/device.properties index 4dd70ea65..29bc5ae0c 100644 --- a/Devices/generic-esp32/device.properties +++ b/Devices/generic-esp32/device.properties @@ -7,3 +7,4 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=Internal diff --git a/Devices/generic-esp32c6/device.properties b/Devices/generic-esp32c6/device.properties index c8941ee30..c63b73634 100644 --- a/Devices/generic-esp32c6/device.properties +++ b/Devices/generic-esp32c6/device.properties @@ -7,3 +7,4 @@ hardware.target=ESP32C6 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=Internal diff --git a/Devices/generic-esp32p4/device.properties b/Devices/generic-esp32p4/device.properties index d2fefc160..303c23ba3 100644 --- a/Devices/generic-esp32p4/device.properties +++ b/Devices/generic-esp32p4/device.properties @@ -7,3 +7,4 @@ hardware.target=ESP32P4 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=Internal diff --git a/Devices/generic-esp32s3/device.properties b/Devices/generic-esp32s3/device.properties index 3bb4a9d42..7aa6c75e5 100644 --- a/Devices/generic-esp32s3/device.properties +++ b/Devices/generic-esp32s3/device.properties @@ -7,3 +7,4 @@ hardware.target=ESP32S3 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=Internal diff --git a/Devices/guition-jc1060p470ciwy/device.properties b/Devices/guition-jc1060p470ciwy/device.properties index 4ad803c6a..fcc7421ee 100644 --- a/Devices/guition-jc1060p470ciwy/device.properties +++ b/Devices/guition-jc1060p470ciwy/device.properties @@ -11,6 +11,8 @@ hardware.spiRamSpeed=200M hardware.esptoolFlashFreq=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=7" display.shape=rectangle display.dpi=187 diff --git a/Devices/guition-jc2432w328c/device.properties b/Devices/guition-jc2432w328c/device.properties index a938ef23a..7ef40633b 100644 --- a/Devices/guition-jc2432w328c/device.properties +++ b/Devices/guition-jc2432w328c/device.properties @@ -7,6 +7,8 @@ hardware.target=ESP32 hardware.flashSize=4MB hardware.spiRam=false +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/guition-jc3248w535c/device.properties b/Devices/guition-jc3248w535c/device.properties index dabe1b878..88497b41a 100644 --- a/Devices/guition-jc3248w535c/device.properties +++ b/Devices/guition-jc3248w535c/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Devices/guition-jc8048w550c/device.properties b/Devices/guition-jc8048w550c/device.properties index 46c912bdd..b0450a3c8 100644 --- a/Devices/guition-jc8048w550c/device.properties +++ b/Devices/guition-jc8048w550c/device.properties @@ -11,6 +11,8 @@ hardware.spiRamSpeed=80M hardware.esptoolFlashFreq=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=5" display.shape=rectangle display.dpi=187 diff --git a/Devices/heltec-wifi-lora-32-v3/device.properties b/Devices/heltec-wifi-lora-32-v3/device.properties index 84afa8f0f..729c48738 100644 --- a/Devices/heltec-wifi-lora-32-v3/device.properties +++ b/Devices/heltec-wifi-lora-32-v3/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=Internal + display.size=0.96" display.shape=rectangle display.dpi=149 diff --git a/Devices/lilygo-tdeck/device.properties b/Devices/lilygo-tdeck/device.properties index cba55320e..04207e460 100644 --- a/Devices/lilygo-tdeck/device.properties +++ b/Devices/lilygo-tdeck/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=143 diff --git a/Devices/lilygo-tdisplay-s3/device.properties b/Devices/lilygo-tdisplay-s3/device.properties index 006ae7393..759018c91 100644 --- a/Devices/lilygo-tdisplay-s3/device.properties +++ b/Devices/lilygo-tdisplay-s3/device.properties @@ -13,6 +13,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=Internal + display.size=1.9" display.shape=rectangle display.dpi=191 diff --git a/Devices/lilygo-tdisplay/device.properties b/Devices/lilygo-tdisplay/device.properties index 0dd37c332..590086137 100644 --- a/Devices/lilygo-tdisplay/device.properties +++ b/Devices/lilygo-tdisplay/device.properties @@ -10,6 +10,8 @@ hardware.flashSize=16MB hardware.spiRam=false hardware.esptoolFlashFreq=80M +storage.userDataLocation=Internal + display.size=1.14" display.shape=rectangle display.dpi=242 diff --git a/Devices/lilygo-tdongle-s3/device.properties b/Devices/lilygo-tdongle-s3/device.properties index 62d1e2187..f92ed6ebe 100644 --- a/Devices/lilygo-tdongle-s3/device.properties +++ b/Devices/lilygo-tdongle-s3/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=0.96" display.shape=rectangle display.dpi=186 diff --git a/Devices/lilygo-thmi/device.properties b/Devices/lilygo-thmi/device.properties index 4da5dd345..d58efc9f3 100644 --- a/Devices/lilygo-thmi/device.properties +++ b/Devices/lilygo-thmi/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2.8" display.shape=rectangle display.dpi=125 diff --git a/Devices/lilygo-tlora-pager/device.properties b/Devices/lilygo-tlora-pager/device.properties index a74d00ca7..1e363302f 100644 --- a/Devices/lilygo-tlora-pager/device.properties +++ b/Devices/lilygo-tlora-pager/device.properties @@ -13,6 +13,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=40M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2.33" display.shape=rectangle display.dpi=227 diff --git a/Devices/m5stack-cardputer-adv/device.properties b/Devices/m5stack-cardputer-adv/device.properties index e500bcf08..ab63ce706 100644 --- a/Devices/m5stack-cardputer-adv/device.properties +++ b/Devices/m5stack-cardputer-adv/device.properties @@ -10,6 +10,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.14" display.shape=rectangle # TODO: dps is actually 242, but this breaks UI (button selection becomes invisible and switch visibility is reduced) diff --git a/Devices/m5stack-cardputer/device.properties b/Devices/m5stack-cardputer/device.properties index c2419c324..f2545fab2 100644 --- a/Devices/m5stack-cardputer/device.properties +++ b/Devices/m5stack-cardputer/device.properties @@ -10,6 +10,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.14" display.shape=rectangle # TODO: dps is actually 242, but this breaks UI (button selection becomes invisible and switch visibility is reduced) diff --git a/Devices/m5stack-core2/device.properties b/Devices/m5stack-core2/device.properties index eafb7c194..17156143d 100644 --- a/Devices/m5stack-core2/device.properties +++ b/Devices/m5stack-core2/device.properties @@ -10,6 +10,8 @@ hardware.spiRamMode=QUAD hardware.spiRamSpeed=80M hardware.esptoolFlashFreq=80M +storage.userDataLocation=SD + display.size=2" display.shape=rectangle display.dpi=200 diff --git a/Devices/m5stack-cores3/device.properties b/Devices/m5stack-cores3/device.properties index 8fbb67685..28e15bcd0 100644 --- a/Devices/m5stack-cores3/device.properties +++ b/Devices/m5stack-cores3/device.properties @@ -12,8 +12,10 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2" display.shape=rectangle display.dpi=200 -lvgl.colorDepth=16 \ No newline at end of file +lvgl.colorDepth=16 diff --git a/Devices/m5stack-papers3/device.properties b/Devices/m5stack-papers3/device.properties index 80ce7247e..91cc994f9 100644 --- a/Devices/m5stack-papers3/device.properties +++ b/Devices/m5stack-papers3/device.properties @@ -13,6 +13,8 @@ hardware.esptoolFlashFreq=80M hardware.tinyUsb=true hardware.bluetooth=true +storage.userDataLocation=SD + display.size=4.7" display.shape=rectangle display.dpi=235 @@ -22,5 +24,3 @@ lvgl.fontSize=24 lvgl.theme=Mono sdkconfig.CONFIG_EPD_DISPLAY_TYPE_ED047TC2=y - - diff --git a/Devices/m5stack-stackchan/device.properties b/Devices/m5stack-stackchan/device.properties index ad8c15c1a..fa5fcaf99 100644 --- a/Devices/m5stack-stackchan/device.properties +++ b/Devices/m5stack-stackchan/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=2" display.shape=rectangle display.dpi=200 diff --git a/Devices/m5stack-stickc-plus/device.properties b/Devices/m5stack-stickc-plus/device.properties index 181cd2422..92b88d185 100644 --- a/Devices/m5stack-stickc-plus/device.properties +++ b/Devices/m5stack-stickc-plus/device.properties @@ -10,6 +10,8 @@ hardware.flashSize=4MB hardware.spiRam=false hardware.esptoolFlashFreq=80M +storage.userDataLocation=Internal + display.size=1.14" display.shape=rectangle display.dpi=242 diff --git a/Devices/m5stack-stickc-plus2/device.properties b/Devices/m5stack-stickc-plus2/device.properties index f763c2ff4..0dddc0764 100644 --- a/Devices/m5stack-stickc-plus2/device.properties +++ b/Devices/m5stack-stickc-plus2/device.properties @@ -12,6 +12,8 @@ hardware.spiRamMode=QUAD hardware.spiRamSpeed=80M hardware.esptoolFlashFreq=80M +storage.userDataLocation=Internal + display.size=1.14" display.shape=rectangle display.dpi=242 diff --git a/Devices/m5stack-sticks3/device.properties b/Devices/m5stack-sticks3/device.properties index a055ee356..685147d1c 100644 --- a/Devices/m5stack-sticks3/device.properties +++ b/Devices/m5stack-sticks3/device.properties @@ -12,6 +12,8 @@ hardware.esptoolFlashFreq=80M hardware.tinyUsb=true hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.14" display.shape=rectangle display.dpi=242 diff --git a/Devices/m5stack-tab5/device.properties b/Devices/m5stack-tab5/device.properties index dbb155125..8c11c4b69 100644 --- a/Devices/m5stack-tab5/device.properties +++ b/Devices/m5stack-tab5/device.properties @@ -13,6 +13,8 @@ hardware.bluetooth=true hardware.usbHostEnabled=true hardware.tinyUsb=true +storage.userDataLocation=SD + display.size=5" display.shape=rectangle display.dpi=294 diff --git a/Devices/simulator/device.properties b/Devices/simulator/device.properties index 1c66595e5..8406fffb3 100644 --- a/Devices/simulator/device.properties +++ b/Devices/simulator/device.properties @@ -5,5 +5,7 @@ apps.launcherAppId=Launcher hardware.target=POSIX +storage.userDataLocation=Internal + lvgl.colorDepth=16 lvgl.fontSize=14 diff --git a/Devices/unphone/device.properties b/Devices/unphone/device.properties index 82ecc6589..3b2f5c7a3 100644 --- a/Devices/unphone/device.properties +++ b/Devices/unphone/device.properties @@ -10,6 +10,8 @@ hardware.spiRamMode=OCT hardware.spiRamSpeed=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Devices/waveshare-esp32-s3-geek/device.properties b/Devices/waveshare-esp32-s3-geek/device.properties index f17c7f40f..19b06a31b 100644 --- a/Devices/waveshare-esp32-s3-geek/device.properties +++ b/Devices/waveshare-esp32-s3-geek/device.properties @@ -14,6 +14,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.14" display.shape=rectangle display.dpi=143 diff --git a/Devices/waveshare-s3-lcd-13/device.properties b/Devices/waveshare-s3-lcd-13/device.properties index 6e7e57052..ed6889941 100644 --- a/Devices/waveshare-s3-lcd-13/device.properties +++ b/Devices/waveshare-s3-lcd-13/device.properties @@ -14,6 +14,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.3" display.shape=rectangle display.dpi=261 diff --git a/Devices/waveshare-s3-touch-lcd-128/device.properties b/Devices/waveshare-s3-touch-lcd-128/device.properties index 5f03f80aa..071fa9f95 100644 --- a/Devices/waveshare-s3-touch-lcd-128/device.properties +++ b/Devices/waveshare-s3-touch-lcd-128/device.properties @@ -14,6 +14,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.28" display.shape=circle display.dpi=265 @@ -24,4 +26,4 @@ lvgl.uiDensity=compact # Fix error "PSRAM space not enough for the Flash instructions" on boot: sdkconfig.CONFIG_SPIRAM_FETCH_INSTRUCTIONS=n sdkconfig.CONFIG_SPIRAM_RODATA=n -sdkconfig.CONFIG_SPIRAM_XIP_FROM_PSRAM=n \ No newline at end of file +sdkconfig.CONFIG_SPIRAM_XIP_FROM_PSRAM=n diff --git a/Devices/waveshare-s3-touch-lcd-147/device.properties b/Devices/waveshare-s3-touch-lcd-147/device.properties index c4f263b2d..092fa342c 100644 --- a/Devices/waveshare-s3-touch-lcd-147/device.properties +++ b/Devices/waveshare-s3-touch-lcd-147/device.properties @@ -14,6 +14,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=1.47" display.shape=rectangle display.dpi=247 diff --git a/Devices/waveshare-s3-touch-lcd-43/device.properties b/Devices/waveshare-s3-touch-lcd-43/device.properties index 5bf22b8ca..821fb60d7 100644 --- a/Devices/waveshare-s3-touch-lcd-43/device.properties +++ b/Devices/waveshare-s3-touch-lcd-43/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=120M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=4.3" display.shape=rectangle display.dpi=217 diff --git a/Devices/wireless-tag-wt32-sc01-plus/device.properties b/Devices/wireless-tag-wt32-sc01-plus/device.properties index beecefe50..18f88ac7b 100644 --- a/Devices/wireless-tag-wt32-sc01-plus/device.properties +++ b/Devices/wireless-tag-wt32-sc01-plus/device.properties @@ -12,6 +12,8 @@ hardware.tinyUsb=true hardware.esptoolFlashFreq=80M hardware.bluetooth=true +storage.userDataLocation=SD + display.size=3.5" display.shape=rectangle display.dpi=165 diff --git a/Firmware/Kconfig b/Firmware/Kconfig index 9ec78134c..4ddbf8ef5 100644 --- a/Firmware/Kconfig +++ b/Firmware/Kconfig @@ -77,6 +77,18 @@ menu "Tactility App" config TT_TDECK_WORKAROUND bool "Temporary work-around until we fix the T-Deck keyboard and trackball settings" default n + choice TT_USER_DATA_LOCATION + prompt "User Data Location" + default TT_USER_DATA_LOCATION_INTERNAL + help + Where user data is stored on this device. + "Internal Flash" assumes /data always exists. + "SD Card" looks for the first mounted SD card at runtime and requires one to be present. + config TT_USER_DATA_LOCATION_SD + bool "SD Card" + config TT_USER_DATA_LOCATION_INTERNAL + bool "Internal Flash" + endchoice config TT_SPLASH_DURATION int "Splash Duration (ms)" default 1000 diff --git a/Tactility/Source/Paths.cpp b/Tactility/Source/Paths.cpp index 8affa3c0f..3e57255b0 100644 --- a/Tactility/Source/Paths.cpp +++ b/Tactility/Source/Paths.cpp @@ -4,6 +4,7 @@ #include #include +#include #include namespace tt { @@ -36,11 +37,15 @@ FileSystem* findSdcardFileSystem(bool mustBeMounted) { } std::string getSystemRootPath() { +#ifdef CONFIG_TT_USER_DATA_LOCATION_INTERNAL + return file::MOUNT_POINT_DATA; +#elif CONFIG_TT_USER_DATA_LOCATION_SD std::string root_path; - if (!findFirstMountedSdCardPath(root_path)) { - root_path = file::MOUNT_POINT_DATA; - } + check(findFirstMountedSdCardPath(root_path), "No SD card mounted"); return root_path; +#else +#error CONFIG_TT_USER_DATA_* not set or unsupported +#endif } std::string getTempPath() { diff --git a/device.py b/device.py index 93ccbbcc9..89c739e99 100644 --- a/device.py +++ b/device.py @@ -128,6 +128,14 @@ def write_tactility_variables(output_file, device_properties: dict, device_id: s if auto_start_app_id is not None: safe_auto_start_app_id = auto_start_app_id.replace("\"", "\\\"") output_file.write(f"CONFIG_TT_AUTO_START_APP_ID=\"{safe_auto_start_app_id}\"\n") + # User data location + user_data_location = get_property_or_exit(device_properties, "storage", "userDataLocation") + if user_data_location == "SD": + output_file.write("CONFIG_TT_USER_DATA_LOCATION_SD=y\n") + elif user_data_location == "Internal": + output_file.write("CONFIG_TT_USER_DATA_LOCATION_INTERNAL=y\n") + else: + exit_with_error(f"storage.userDataLocation must be 'SD' or 'Internal', but was: '{user_data_location}'") def write_core_variables(output_file, device_properties: dict): idf_target = get_property_or_exit(device_properties, "hardware", "target").lower()