@geastack/targets 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +83 -0
- package/package.json +50 -0
- package/targets/cmake/geatsc-generated-archive-build.mjs +614 -0
- package/targets/cmake/geatsc_generated_archive.cmake +116 -0
- package/targets/cmake/geatsc_generated_archive_build.cmake +50 -0
- package/targets/esp32/app_project.cmake +33 -0
- package/targets/esp32/apps/app_manager.cpp +188 -0
- package/targets/esp32/apps/app_manager.h +10 -0
- package/targets/esp32/chip_bindings/README.md +58 -0
- package/targets/esp32/chip_bindings/audio/es8311.cpp +556 -0
- package/targets/esp32/chip_bindings/displays/co5300.cpp +510 -0
- package/targets/esp32/chip_bindings/displays/co5300.h +47 -0
- package/targets/esp32/chip_bindings/displays/co5300_async_stream.inc +79 -0
- package/targets/esp32/chip_bindings/displays/qspi_panel.h +65 -0
- package/targets/esp32/chip_bindings/displays/sh8601.cpp +583 -0
- package/targets/esp32/chip_bindings/displays/sh8601.h +36 -0
- package/targets/esp32/chip_bindings/gps/lc76g.cpp +296 -0
- package/targets/esp32/chip_bindings/gps/lc76g.h +7 -0
- package/targets/esp32/chip_bindings/imu/bmi270.cpp +299 -0
- package/targets/esp32/chip_bindings/imu/bmi270_config.inl +439 -0
- package/targets/esp32/chip_bindings/imu/qmi8658.cpp +213 -0
- package/targets/esp32/chip_bindings/power/axp2101.cpp +185 -0
- package/targets/esp32/chip_bindings/touch/cst9217.cpp +229 -0
- package/targets/esp32/chip_bindings/touch/cst9217_controller.h +78 -0
- package/targets/esp32/chip_bindings/touch/ft3168.cpp +340 -0
- package/targets/esp32/chip_bindings/touch/ft3168_controller.h +103 -0
- package/targets/esp32/chip_bindings/touch/ft6336.cpp +310 -0
- package/targets/esp32/chip_bindings/touch/ft6336_controller.h +90 -0
- package/targets/esp32/components/gea_framework/CMakeLists.txt +62 -0
- package/targets/esp32/connectivity/ble_hid.cpp +2916 -0
- package/targets/esp32/connectivity/ble_hid.h +8 -0
- package/targets/esp32/connectivity/diagnostics_transport.cpp +523 -0
- package/targets/esp32/connectivity/diagnostics_transport_offline.cpp +108 -0
- package/targets/esp32/connectivity/wifi.cpp +615 -0
- package/targets/esp32/connectivity/wifi_debug_offline.cpp +37 -0
- package/targets/esp32/connectivity/wifi_task_stack.h +119 -0
- package/targets/esp32/display.cpp +6010 -0
- package/targets/esp32/display_headless.cpp +468 -0
- package/targets/esp32/gea/platform_random.h +11 -0
- package/targets/esp32/gea_framework.cmake +382 -0
- package/targets/esp32/gpio.cpp +229 -0
- package/targets/esp32/host_sources.cmake +35 -0
- package/targets/esp32/imu_absent.cpp +36 -0
- package/targets/esp32/ldfragments/gea_ui_state_external.lf +35 -0
- package/targets/esp32/memory_config.h +64 -0
- package/targets/esp32/power_absent.cpp +22 -0
- package/targets/esp32/sdk-patches/0001-esp_ptr_dma_capable-accept-PSRAM.patch +70 -0
- package/targets/esp32/sdk-patches/0002-gdma-access_ext_mem-spi_master.patch +59 -0
- package/targets/esp32/sdk-patches/README.md +127 -0
- package/targets/esp32/services/app_runner.cpp +248 -0
- package/targets/esp32/services/app_state.cpp +56 -0
- package/targets/esp32/services/audio_runtime_stub.cpp +86 -0
- package/targets/esp32/services/battery_service.cpp +31 -0
- package/targets/esp32/services/device_control.cpp +1896 -0
- package/targets/esp32/services/device_control.h +31 -0
- package/targets/esp32/services/frame_scheduler.cpp +1571 -0
- package/targets/esp32/services/heap.cpp +129 -0
- package/targets/esp32/services/memory.cpp +103 -0
- package/targets/esp32/services/ota.cpp +840 -0
- package/targets/esp32/services/ota_image.cpp +162 -0
- package/targets/esp32/services/ota_image.h +16 -0
- package/targets/esp32/services/storage_service.cpp +159 -0
- package/targets/esp32/touch_absent.cpp +44 -0
- package/targets/esp32-m5stack-m5paper/CMakeLists.txt +10 -0
- package/targets/esp32-m5stack-m5paper/README.md +55 -0
- package/targets/esp32-m5stack-m5paper/dependencies.lock +76 -0
- package/targets/esp32-m5stack-m5paper/main/CMakeLists.txt +46 -0
- package/targets/esp32-m5stack-m5paper/main/Kconfig.projbuild +10 -0
- package/targets/esp32-m5stack-m5paper/main/app_main.cpp +114 -0
- package/targets/esp32-m5stack-m5paper/main/audio_stub.cpp +27 -0
- package/targets/esp32-m5stack-m5paper/main/buttons.cpp +111 -0
- package/targets/esp32-m5stack-m5paper/main/display.cpp +1074 -0
- package/targets/esp32-m5stack-m5paper/main/i2c.cpp +36 -0
- package/targets/esp32-m5stack-m5paper/main/idf_component.yml +7 -0
- package/targets/esp32-m5stack-m5paper/main/imu_stub.cpp +20 -0
- package/targets/esp32-m5stack-m5paper/main/include/board.h +100 -0
- package/targets/esp32-m5stack-m5paper/main/include/buttons.h +8 -0
- package/targets/esp32-m5stack-m5paper/main/launcher_button.cpp +82 -0
- package/targets/esp32-m5stack-m5paper/main/m5paper_psram.lf +20 -0
- package/targets/esp32-m5stack-m5paper/main/power.cpp +73 -0
- package/targets/esp32-m5stack-m5paper/main/sdcard_mount.cpp +82 -0
- package/targets/esp32-m5stack-m5paper/main/touch.cpp +279 -0
- package/targets/esp32-m5stack-m5paper/partitions.csv +9 -0
- package/targets/esp32-m5stack-m5paper/sdkconfig.defaults +84 -0
- package/targets/esp32-p4-m5stack-tab5/CMakeLists.txt +10 -0
- package/targets/esp32-p4-m5stack-tab5/dependencies.lock +276 -0
- package/targets/esp32-p4-m5stack-tab5/main/CMakeLists.txt +586 -0
- package/targets/esp32-p4-m5stack-tab5/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-m5stack-tab5/main/app_main.cpp +177 -0
- package/targets/esp32-p4-m5stack-tab5/main/camera.cpp +2025 -0
- package/targets/esp32-p4-m5stack-tab5/main/display.cpp +4033 -0
- package/targets/esp32-p4-m5stack-tab5/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-m5stack-tab5/main/i2c.cpp +39 -0
- package/targets/esp32-p4-m5stack-tab5/main/idf_component.yml +21 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/board.h +130 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/tab5_drivers.h +68 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-m5stack-tab5/main/launcher_button.cpp +188 -0
- package/targets/esp32-p4-m5stack-tab5/main/power.cpp +22 -0
- package/targets/esp32-p4-m5stack-tab5/main/sdcard_mount.cpp +125 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_audio.cpp +345 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_drivers.cpp +871 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_imu.cpp +246 -0
- package/targets/esp32-p4-m5stack-tab5/main/touch.cpp +206 -0
- package/targets/esp32-p4-m5stack-tab5/partitions.csv +12 -0
- package/targets/esp32-p4-m5stack-tab5/sdkconfig.defaults +128 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/CMakeLists.txt +19 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/0001-esp_video-csi-raw-passthrough-p4-rev-lt-v3.patch +28 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/README.md +45 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/apply.sh +37 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/dependencies.lock +196 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/CMakeLists.txt +562 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/app_main.cpp +166 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/camera.cpp +2105 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/display.cpp +1730 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/i2c.cpp +39 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/idf_component.yml +11 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/board.h +87 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/panel_native.h +59 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/launcher_button.cpp +191 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/power.cpp +15 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/touch.cpp +306 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/partitions.csv +13 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/README.md +22 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/espressif__esp_video-csi-bypass.patch +28 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/sdkconfig.defaults +109 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/README-camera-capture.md +84 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/capture-camera.py +369 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/CMakeLists.txt +10 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/dependencies.lock +258 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/CMakeLists.txt +577 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/app_main.cpp +177 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/camera.cpp +1935 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/display.cpp +2832 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/i2c.cpp +39 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/idf_component.yml +23 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/board.h +68 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/launcher_button.cpp +191 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/power.cpp +15 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/sdcard_mount.cpp +125 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/touch.cpp +332 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/partitions.csv +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/sdkconfig.defaults +122 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/tools/README-camera-capture.md +84 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/tools/capture-camera.py +369 -0
- package/targets/esp32-s3-devkit-n16r8.json +31 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/CMakeLists.txt +10 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/dependencies.lock +40 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/CMakeLists.txt +549 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/app_main.cpp +187 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/display_rgb.cpp +1338 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/i2c.cpp +39 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/idf_component.yml +5 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/board.h +142 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/pcf8574.h +16 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/rotary_encoder.h +7 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/pcf8574.cpp +86 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/platform_stubs.cpp +47 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/rotary_encoder.cpp +135 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/touch.cpp +250 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/partitions.csv +8 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/sdkconfig.defaults +116 -0
- package/targets/esp32-s3-epaper-1.54/CMakeLists.txt +10 -0
- package/targets/esp32-s3-epaper-1.54/dependencies.lock +76 -0
- package/targets/esp32-s3-epaper-1.54/main/CMakeLists.txt +691 -0
- package/targets/esp32-s3-epaper-1.54/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-epaper-1.54/main/app_main.cpp +181 -0
- package/targets/esp32-s3-epaper-1.54/main/buttons.cpp +144 -0
- package/targets/esp32-s3-epaper-1.54/main/display.cpp +1281 -0
- package/targets/esp32-s3-epaper-1.54/main/fatfs_ffconf.h +377 -0
- package/targets/esp32-s3-epaper-1.54/main/i2c.cpp +39 -0
- package/targets/esp32-s3-epaper-1.54/main/idf_component.yml +7 -0
- package/targets/esp32-s3-epaper-1.54/main/imu_stub.cpp +21 -0
- package/targets/esp32-s3-epaper-1.54/main/include/board.h +119 -0
- package/targets/esp32-s3-epaper-1.54/main/include/buttons.h +9 -0
- package/targets/esp32-s3-epaper-1.54/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-epaper-1.54/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-epaper-1.54/main/power.cpp +15 -0
- package/targets/esp32-s3-epaper-1.54/main/sdcard_mount.cpp +89 -0
- package/targets/esp32-s3-epaper-1.54/main/touch.cpp +299 -0
- package/targets/esp32-s3-epaper-1.54/partitions.csv +8 -0
- package/targets/esp32-s3-epaper-1.54/sdkconfig.defaults +217 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/CMakeLists.txt +10 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/README.md +29 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/dependencies.lock +116 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/CMakeLists.txt +90 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/idf_component.yml +7 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/include/board.h +61 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/touch.cpp +299 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/partitions.csv +7 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/sdkconfig.defaults +50 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/CMakeLists.txt +12 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/CMakeLists.txt +17 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.c +269 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.h +142 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.c +1114 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.h +410 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/gea_epd.c +989 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.c +489 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.h +104 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.c +136 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.h +78 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/utilities.h +49 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/dependencies.lock +35 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/CMakeLists.txt +30 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/Kconfig.projbuild +10 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/app_main.cpp +95 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/audio_stub.cpp +27 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/buttons.cpp +40 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/display.cpp +627 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/i2c.cpp +36 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/idf_component.yml +4 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/imu_stub.cpp +20 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/board.h +85 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/buttons.h +8 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/launcher_button.cpp +82 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/power.cpp +36 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/sdcard_mount.cpp +90 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/touch.cpp +293 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/partitions.csv +9 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/sdkconfig.defaults +217 -0
- package/targets/esp32-s3-m5stack-papers3/CMakeLists.txt +13 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/CMakeLists.txt +5 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/include/papers3_epd.h +74 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/papers3_epd.c +671 -0
- package/targets/esp32-s3-m5stack-papers3/dependencies.lock +76 -0
- package/targets/esp32-s3-m5stack-papers3/main/CMakeLists.txt +64 -0
- package/targets/esp32-s3-m5stack-papers3/main/Kconfig.projbuild +10 -0
- package/targets/esp32-s3-m5stack-papers3/main/app_main.cpp +96 -0
- package/targets/esp32-s3-m5stack-papers3/main/audio_stub.cpp +27 -0
- package/targets/esp32-s3-m5stack-papers3/main/buttons.cpp +49 -0
- package/targets/esp32-s3-m5stack-papers3/main/display.cpp +706 -0
- package/targets/esp32-s3-m5stack-papers3/main/i2c.cpp +36 -0
- package/targets/esp32-s3-m5stack-papers3/main/idf_component.yml +14 -0
- package/targets/esp32-s3-m5stack-papers3/main/imu.cpp +351 -0
- package/targets/esp32-s3-m5stack-papers3/main/include/board.h +101 -0
- package/targets/esp32-s3-m5stack-papers3/main/include/buttons.h +8 -0
- package/targets/esp32-s3-m5stack-papers3/main/launcher_button.cpp +96 -0
- package/targets/esp32-s3-m5stack-papers3/main/power.cpp +102 -0
- package/targets/esp32-s3-m5stack-papers3/main/sdcard_mount.cpp +88 -0
- package/targets/esp32-s3-m5stack-papers3/main/touch.cpp +287 -0
- package/targets/esp32-s3-m5stack-papers3/partitions.csv +9 -0
- package/targets/esp32-s3-m5stack-papers3/sdkconfig.defaults +232 -0
- package/targets/esp32-s3-m5stack-sticks3/CMakeLists.txt +10 -0
- package/targets/esp32-s3-m5stack-sticks3/dependencies.lock +51 -0
- package/targets/esp32-s3-m5stack-sticks3/main/CMakeLists.txt +51 -0
- package/targets/esp32-s3-m5stack-sticks3/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-m5stack-sticks3/main/app_main.cpp +130 -0
- package/targets/esp32-s3-m5stack-sticks3/main/buttons.cpp +101 -0
- package/targets/esp32-s3-m5stack-sticks3/main/display.cpp +1391 -0
- package/targets/esp32-s3-m5stack-sticks3/main/i2c.cpp +39 -0
- package/targets/esp32-s3-m5stack-sticks3/main/idf_component.yml +8 -0
- package/targets/esp32-s3-m5stack-sticks3/main/imu_stub.cpp +9 -0
- package/targets/esp32-s3-m5stack-sticks3/main/include/board.h +89 -0
- package/targets/esp32-s3-m5stack-sticks3/main/include/buttons.h +9 -0
- package/targets/esp32-s3-m5stack-sticks3/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-m5stack-sticks3/main/power.cpp +15 -0
- package/targets/esp32-s3-m5stack-sticks3/main/sdcard_mount.cpp +8 -0
- package/targets/esp32-s3-m5stack-sticks3/main/touch.cpp +65 -0
- package/targets/esp32-s3-m5stack-sticks3/partitions.csv +8 -0
- package/targets/esp32-s3-m5stack-sticks3/sdkconfig.defaults +130 -0
- package/targets/esp32-s3-touch-amoled-1.75/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-1.75/dependencies.lock +130 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/CMakeLists.txt +589 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/app_main.cpp +153 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/idf_component.yml +9 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/include/board.h +110 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/touch.cpp +45 -0
- package/targets/esp32-s3-touch-amoled-1.75/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-1.75/sdkconfig.defaults +179 -0
- package/targets/esp32-s3-touch-amoled-1.8/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-1.8/dependencies.lock +105 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +768 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/app_main.cpp +172 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/idf_component.yml +8 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/include/board.h +83 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/touch.cpp +41 -0
- package/targets/esp32-s3-touch-amoled-1.8/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-1.8/sdkconfig.defaults +179 -0
- package/targets/esp32-s3-touch-amoled-2.06/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +64 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +1121 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/app_main.cpp +333 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +27 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/include/board.h +114 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/launcher_button.cpp +199 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/sdcard_mount.cpp +105 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/touch.cpp +49 -0
- package/targets/esp32-s3-touch-amoled-2.06/partitions.csv +14 -0
- package/targets/esp32-s3-touch-amoled-2.06/sdkconfig.defaults +273 -0
- package/targets/esp32-s3-touch-amoled-2.41/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/CMakeLists.txt +71 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/idf_component.yml +27 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/include/board.h +108 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/panel_reset.cpp +82 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/touch.cpp +49 -0
- package/targets/esp32-s3-touch-amoled-2.41/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-2.41/sdkconfig.defaults +273 -0
- package/targets/rp2350-tufty-2350/CMakeLists.txt +348 -0
- package/targets/rp2350-tufty-2350/README.md +53 -0
- package/targets/rp2350-tufty-2350/boards/pimoroni_tufty2350.h +87 -0
- package/targets/rp2350-tufty-2350/main/bringup.cpp +187 -0
- package/targets/rp2350-tufty-2350/main/include/board.h +124 -0
- package/targets/rp2350-tufty-2350/main/rp2350_panel.cpp +428 -0
- package/targets/rp2350-tufty-2350/main/rp2350_panel.h +46 -0
- package/targets/rp2350-tufty-2350/main/st7789_parallel.pio +7 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/CMakeLists.txt +345 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/README.md +153 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/boards/waveshare_rp2350_touch_amoled_2_41.h +59 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/app.cpp +984 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/bringup.cpp +222 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/include/board.h +138 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.cpp +2553 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.h +18 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_host_fetch_stub.cpp +64 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.cpp +677 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.h +48 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.c +354 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.h +56 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.c +1284 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.h +95 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_block_functions.h +123 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_common.h +127 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-bench.py +162 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-parity.py +198 -0
- package/targets.json +154 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Accelerometer/gyroscope for a board with no IMU.
|
|
2
|
+
//
|
|
3
|
+
// Same shape as touch_absent.cpp: host/imu.cpp is part of every board's host
|
|
4
|
+
// facade set, so the symbols have to exist even where the hardware does not.
|
|
5
|
+
// A board at rest on a desk is what zero acceleration and zero tilt describe,
|
|
6
|
+
// so tilt-driven apps behave as if the board is simply being held still rather
|
|
7
|
+
// than reading uninitialized values.
|
|
8
|
+
//
|
|
9
|
+
// Compiled in place of an IMU binding when a composed board selects no
|
|
10
|
+
// `chips.imu`.
|
|
11
|
+
|
|
12
|
+
#include "imu.h"
|
|
13
|
+
|
|
14
|
+
namespace gea::platform::sensors {
|
|
15
|
+
|
|
16
|
+
void Accelerometer::init() {}
|
|
17
|
+
void Accelerometer::close() {}
|
|
18
|
+
void Accelerometer::calibrateBias() {}
|
|
19
|
+
|
|
20
|
+
int Accelerometer::tiltX() { return 0; }
|
|
21
|
+
int Accelerometer::tiltY() { return 0; }
|
|
22
|
+
|
|
23
|
+
double Accelerometer::accelerationX() { return 0.0; }
|
|
24
|
+
double Accelerometer::accelerationY() { return 0.0; }
|
|
25
|
+
// Gravity on a board lying flat. Zero on all three axes is free fall, which is
|
|
26
|
+
// a reading no stationary board ever produces.
|
|
27
|
+
double Accelerometer::accelerationZ() { return 1.0; }
|
|
28
|
+
|
|
29
|
+
double Accelerometer::gyroscopeX() { return 0.0; }
|
|
30
|
+
double Accelerometer::gyroscopeY() { return 0.0; }
|
|
31
|
+
double Accelerometer::gyroscopeZ() { return 0.0; }
|
|
32
|
+
|
|
33
|
+
// The web simulator's tilt injection. There is no cached sample to write into.
|
|
34
|
+
void Accelerometer::setWebTilt(int, int) {}
|
|
35
|
+
|
|
36
|
+
} // namespace gea::platform::sensors
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Enabled by GEA_EMBEDDED_UI_STATE_EXTERNAL=1 in an app's gea.defines (see
|
|
2
|
+
# gea_framework.cmake). Moves the engine's zero-initialized state and caches
|
|
3
|
+
# out of internal RAM into external RAM: what the UI task alone touches, and
|
|
4
|
+
# nothing that is DMA'd or read with the flash cache disabled.
|
|
5
|
+
#
|
|
6
|
+
# The nonzero sentinels in some of these objects would make them .data, which
|
|
7
|
+
# has to be internal (startup copies it before external RAM is mapped). The
|
|
8
|
+
# same define switches the engine to dynamic initialization
|
|
9
|
+
# (GEA_EMBEDDED_UI_STATE_DYNAMIC_INIT), so they are .bss and this sweep sees
|
|
10
|
+
# them.
|
|
11
|
+
#
|
|
12
|
+
# IDF only ships [scheme:extram_bss] inside esp_wifi's fragments; a build
|
|
13
|
+
# without Wi-Fi has no such scheme, and ldgen silently drops an entry that names
|
|
14
|
+
# an unknown one, so the scheme is defined here under its own name.
|
|
15
|
+
[scheme:gea_ui_state_external]
|
|
16
|
+
entries:
|
|
17
|
+
bss -> extern_ram
|
|
18
|
+
common -> extern_ram
|
|
19
|
+
|
|
20
|
+
# The shared framework component: the engine's caches and task-only tables.
|
|
21
|
+
[mapping:gea_ui_state_external_framework]
|
|
22
|
+
archive: libgea_framework.a
|
|
23
|
+
entries:
|
|
24
|
+
* (gea_ui_state_external)
|
|
25
|
+
|
|
26
|
+
# Target sources a board compiles into its own main component: the display
|
|
27
|
+
# backend, the framework runtime and the tree renderer. The frame scheduler is
|
|
28
|
+
# not listed: its static task control block must stay in internal SRAM.
|
|
29
|
+
# Object names carry no extension.
|
|
30
|
+
[mapping:gea_ui_state_external_main]
|
|
31
|
+
archive: libmain.a
|
|
32
|
+
entries:
|
|
33
|
+
runtime (gea_ui_state_external)
|
|
34
|
+
display (gea_ui_state_external)
|
|
35
|
+
tree_render (gea_ui_state_external)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#if __has_include("gea_embedded_app_config.h")
|
|
4
|
+
#include "gea_embedded_app_config.h"
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
// Per-frame perf instrumentation flags + the GEA_EMBEDDED_PERF master switch.
|
|
8
|
+
// Included after the app config above so a per-app override of GEA_EMBEDDED_PERF
|
|
9
|
+
// (or any individual sub-flag) is respected; this header owns the defaults and
|
|
10
|
+
// the master override that forces every sub-flag off when the master is off.
|
|
11
|
+
#include "gea_perf_config.h"
|
|
12
|
+
|
|
13
|
+
#ifndef GEA_EMBEDDED_GEA_MAIN_TASK_STACK_BYTES
|
|
14
|
+
#define GEA_EMBEDDED_GEA_MAIN_TASK_STACK_BYTES 24576
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#ifndef GEA_EMBEDDED_GEA_INIT_TASK_STACK_BYTES
|
|
18
|
+
// 16 KiB was tight for any geatsc-emitted app init that builds large
|
|
19
|
+
// `std::vector<gea_cpp_value>` initializer-list literals on the stack
|
|
20
|
+
// (e.g. button-tetris's 28×8 shape table at program.cpp:4102 materialises
|
|
21
|
+
// ~30 KiB of stack temps). Until the emitter rewrites those literals as
|
|
22
|
+
// static-const data, give the init task more headroom — this stack only
|
|
23
|
+
// lives for the duration of `__gea_top_level()` and is freed afterwards.
|
|
24
|
+
#define GEA_EMBEDDED_GEA_INIT_TASK_STACK_BYTES 65536
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#ifndef GEA_EMBEDDED_APP_FRAME_TASK_STACK_WORDS
|
|
28
|
+
#define GEA_EMBEDDED_APP_FRAME_TASK_STACK_WORDS 3072
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#ifndef GEA_EMBEDDED_APP_FRAME_TASK_PRIORITY
|
|
32
|
+
#define GEA_EMBEDDED_APP_FRAME_TASK_PRIORITY 5
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
// GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG / _PERF_LITE and
|
|
36
|
+
// GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG (and the GEA_EMBEDDED_PERF master that
|
|
37
|
+
// governs them) are defined in gea_perf_config.h, included above.
|
|
38
|
+
|
|
39
|
+
#ifndef GEA_EMBEDDED_DISPLAY_FLUSH_CHUNK_MAX
|
|
40
|
+
#define GEA_EMBEDDED_DISPLAY_FLUSH_CHUNK_MAX 80
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#ifndef GEA_EMBEDDED_DISPLAY_FLUSH_QUEUE_DEPTH
|
|
44
|
+
#define GEA_EMBEDDED_DISPLAY_FLUSH_QUEUE_DEPTH 2
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#ifndef GEA_EMBEDDED_DISPLAY_FLUSH_BUFFER_MAX_BYTES
|
|
48
|
+
#define GEA_EMBEDDED_DISPLAY_FLUSH_BUFFER_MAX_BYTES (136 * 1024)
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
// Optional pre-reserved contiguous flush pool. 0 = disabled (legacy behavior:
|
|
52
|
+
// per-slot buffers malloc'd lazily on setFlushConfig, which can fall back to a
|
|
53
|
+
// slow 1-deep pipeline once the heap is fragmented). When > 0, a single
|
|
54
|
+
// contiguous DMA-internal block of this many bytes is reserved early at display
|
|
55
|
+
// init (heap still unfragmented) and the flush slots are carved from it — so a
|
|
56
|
+
// deep pipeline (e.g. 48 rows x 2) is guaranteed regardless of later
|
|
57
|
+
// fragmentation. Must be >= chunkRows*kWidth*2 rounded up to 64, times depth.
|
|
58
|
+
#ifndef GEA_EMBEDDED_DISPLAY_FLUSH_POOL_BYTES
|
|
59
|
+
#define GEA_EMBEDDED_DISPLAY_FLUSH_POOL_BYTES 0
|
|
60
|
+
#endif
|
|
61
|
+
|
|
62
|
+
#ifndef GEA_EMBEDDED_DISPLAY_PRESENT_RECT_LIMIT
|
|
63
|
+
#define GEA_EMBEDDED_DISPLAY_PRESENT_RECT_LIMIT 24
|
|
64
|
+
#endif
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Power for a board with no PMIC.
|
|
2
|
+
//
|
|
3
|
+
// Same shape as touch_absent.cpp: the framework references Power
|
|
4
|
+
// unconditionally (Runtime::boot, BatteryService, the device-control task), so
|
|
5
|
+
// a board without the chip still has to provide the symbols.
|
|
6
|
+
//
|
|
7
|
+
// Compiled in place of a PMIC binding when a composed board selects no
|
|
8
|
+
// `chips.power` — the usual case for a module powered straight from USB.
|
|
9
|
+
|
|
10
|
+
#include "power.h"
|
|
11
|
+
|
|
12
|
+
namespace gea::platform::power {
|
|
13
|
+
|
|
14
|
+
// Nothing to bring up, and nothing that can fail.
|
|
15
|
+
bool Power::init() { return true; }
|
|
16
|
+
|
|
17
|
+
// -1 means "this board cannot measure a battery", which is what a USB-powered
|
|
18
|
+
// module is. Reporting 100 would read as a full battery and send the UI and any
|
|
19
|
+
// low-power policy down a path built on a measurement that was never taken.
|
|
20
|
+
int Power::batteryPercent() { return -1; }
|
|
21
|
+
|
|
22
|
+
} // namespace gea::platform::power
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
From 08750f6cf0737f96ff1ada21a82d1e7d2fa0c109 Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Armagan Amcalar <armagan@amcalar.com>
|
|
3
|
+
Date: Tue, 12 May 2026 12:05:47 +0200
|
|
4
|
+
Subject: [PATCH] gea: make esp_ptr_dma_capable accept PSRAM DMA regions
|
|
5
|
+
MIME-Version: 1.0
|
|
6
|
+
Content-Type: text/plain; charset=UTF-8
|
|
7
|
+
Content-Transfer-Encoding: 8bit
|
|
8
|
+
|
|
9
|
+
The base check only recognised internal SRAM, which made spi_master allocate
|
|
10
|
+
an internal bounce buffer when transmitting from a PSRAM framebuffer — that
|
|
11
|
+
alloc fails on a fragmented internal heap. With this change, spi_master sees
|
|
12
|
+
the PSRAM pointer as DMA-capable and queues the DMA directly. The caller is
|
|
13
|
+
responsible for esp_cache_msync(C2M) before DMA to flush CPU writes.
|
|
14
|
+
---
|
|
15
|
+
.../esp_hw_support/include/esp_memory_utils.h | 27 +++++++++++++------
|
|
16
|
+
1 file changed, 19 insertions(+), 8 deletions(-)
|
|
17
|
+
|
|
18
|
+
diff --git a/components/esp_hw_support/include/esp_memory_utils.h b/components/esp_hw_support/include/esp_memory_utils.h
|
|
19
|
+
index 0379c76a..26a11595 100644
|
|
20
|
+
--- a/components/esp_hw_support/include/esp_memory_utils.h
|
|
21
|
+
+++ b/components/esp_hw_support/include/esp_memory_utils.h
|
|
22
|
+
@@ -214,26 +214,37 @@ inline static bool esp_ptr_in_tcm(const void *p) {
|
|
23
|
+
/** Add app-specific functions below **/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
- * @brief Check if the pointer is dma capable
|
|
27
|
+
+ * @brief Check if the pointer is in external ram dma capable region
|
|
28
|
+
*
|
|
29
|
+
* @param p pointer
|
|
30
|
+
*
|
|
31
|
+
* @return true: capable; false: not capable
|
|
32
|
+
*/
|
|
33
|
+
-__attribute__((always_inline))
|
|
34
|
+
-inline static bool esp_ptr_dma_capable(const void *p)
|
|
35
|
+
-{
|
|
36
|
+
- return (intptr_t)p >= SOC_DMA_LOW && (intptr_t)p < SOC_DMA_HIGH;
|
|
37
|
+
-}
|
|
38
|
+
+bool esp_ptr_dma_ext_capable(const void *p);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
- * @brief Check if the pointer is in external ram dma capable region
|
|
42
|
+
+ * @brief Check if the pointer is dma capable
|
|
43
|
+
*
|
|
44
|
+
* @param p pointer
|
|
45
|
+
*
|
|
46
|
+
* @return true: capable; false: not capable
|
|
47
|
+
+ *
|
|
48
|
+
+ * gea-psram-spi-dma: also accept PSRAM regions that are DMA-capable on this
|
|
49
|
+
+ * SoC (e.g. ESP32-S3 octal PSRAM). The base `esp_ptr_dma_capable` check only
|
|
50
|
+
+ * recognised internal SRAM, which forced `spi_master` to allocate an internal
|
|
51
|
+
+ * bounce buffer when transmitting from a PSRAM-allocated framebuffer — and
|
|
52
|
+
+ * that bounce alloc fails on a fragmented internal heap. With this change,
|
|
53
|
+
+ * `spi_master` accepts the PSRAM pointer and DMAs directly. The caller is
|
|
54
|
+
+ * responsible for `esp_cache_msync()` before DMA to flush CPU writes. The
|
|
55
|
+
+ * forward declaration of esp_ptr_dma_ext_capable was moved above this inline
|
|
56
|
+
+ * so the call below has a visible prototype in C TUs.
|
|
57
|
+
*/
|
|
58
|
+
-bool esp_ptr_dma_ext_capable(const void *p);
|
|
59
|
+
+__attribute__((always_inline))
|
|
60
|
+
+inline static bool esp_ptr_dma_capable(const void *p)
|
|
61
|
+
+{
|
|
62
|
+
+ if ((intptr_t)p >= SOC_DMA_LOW && (intptr_t)p < SOC_DMA_HIGH) return true;
|
|
63
|
+
+ return esp_ptr_dma_ext_capable(p);
|
|
64
|
+
+}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @brief Check if the pointer is word aligned
|
|
68
|
+
--
|
|
69
|
+
2.50.1 (Apple Git-155)
|
|
70
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
From 86323c34145e73ceeb539b6bc173acf2d18516e1 Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Armagan Amcalar <armagan@amcalar.com>
|
|
3
|
+
Date: Tue, 12 May 2026 12:25:43 +0200
|
|
4
|
+
Subject: [PATCH] gea: enable GDMA access_ext_mem for SPI master
|
|
5
|
+
MIME-Version: 1.0
|
|
6
|
+
Content-Type: text/plain; charset=UTF-8
|
|
7
|
+
Content-Transfer-Encoding: 8bit
|
|
8
|
+
|
|
9
|
+
Companion to the esp_ptr_dma_capable PSRAM widening. With the previous
|
|
10
|
+
patch in place, spi_master accepts PSRAM source pointers — but the GDMA
|
|
11
|
+
channel it allocates has access_ext_mem=false (with an ESP-IDF TODO to
|
|
12
|
+
add PSRAM support). GDMA queues descriptors referencing PSRAM but reads
|
|
13
|
+
garbage from the bus, producing bands of solid colour on the LCD. Flip
|
|
14
|
+
to true so GDMA actually fetches from PSRAM. The caller must still
|
|
15
|
+
esp_cache_msync(C2M) before queueing the DMA.
|
|
16
|
+
---
|
|
17
|
+
.../esp_driver_spi/src/gpspi/spi_common.c | 25 ++++++++++++++++---
|
|
18
|
+
1 file changed, 22 insertions(+), 3 deletions(-)
|
|
19
|
+
|
|
20
|
+
diff --git a/components/esp_driver_spi/src/gpspi/spi_common.c b/components/esp_driver_spi/src/gpspi/spi_common.c
|
|
21
|
+
index ce22e7cd..f1659216 100644
|
|
22
|
+
--- a/components/esp_driver_spi/src/gpspi/spi_common.c
|
|
23
|
+
+++ b/components/esp_driver_spi/src/gpspi/spi_common.c
|
|
24
|
+
@@ -254,10 +254,29 @@ static esp_err_t alloc_dma_chan(spi_host_device_t host_id, spi_dma_chan_t dma_ch
|
|
25
|
+
gdma_connect(dma_ctx->rx_dma_chan, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_SPI, 3));
|
|
26
|
+
}
|
|
27
|
+
#endif
|
|
28
|
+
- // TODO: add support to allow SPI transfer PSRAM buffer
|
|
29
|
+
+ // gea-psram-spi-dma: allow GDMA to access external memory (PSRAM)
|
|
30
|
+
+ // so spi_master can transmit pixel buffers that live in PSRAM
|
|
31
|
+
+ // without the auto-bounce-buffer copy. The companion change in
|
|
32
|
+
+ // esp_memory_utils.h widens esp_ptr_dma_capable() to accept PSRAM
|
|
33
|
+
+ // pointers; this enables the GDMA hardware path that fetches them.
|
|
34
|
+
+ // Without this flag GDMA happily queues descriptors pointing at
|
|
35
|
+
+ // PSRAM addresses but reads garbage from the bus (visible as
|
|
36
|
+
+ // bands of solid colour on the LCD). The caller is still
|
|
37
|
+
+ // responsible for esp_cache_msync(C2M) before queueing.
|
|
38
|
+
+ //
|
|
39
|
+
+ // Burst size 64 (not 16): the ESP32-S3 GDMA register comment
|
|
40
|
+
+ // for out_ext_mem_bk_size marks values 2/3 as "reserved", but
|
|
41
|
+
+ // GDMA_LL_MAX_BURST_SIZE_PSRAM = 64 in the SDK and Espressif's
|
|
42
|
+
+ // RGB-panel driver (esp_lcd_panel_rgb.c) uses 64-byte bursts to
|
|
43
|
+
+ // pull its framebuffer from PSRAM — the doc is wrong, 64 works.
|
|
44
|
+
+ // At 16-byte bursts each PSRAM access pays the ~10-cycle latency
|
|
45
|
+
+ // every 16 bytes; at 64 bytes that overhead is amortised over 4x
|
|
46
|
+
+ // the data, which is the headroom the SPI TX FIFO needs to avoid
|
|
47
|
+
+ // underrunning at 80 MHz QSPI. Without enough headroom the
|
|
48
|
+
+ // underrun shows as horizontal bands of solid colour on the LCD.
|
|
49
|
+
gdma_transfer_config_t trans_cfg = {
|
|
50
|
+
- .max_data_burst_size = 16,
|
|
51
|
+
- .access_ext_mem = false,
|
|
52
|
+
+ .max_data_burst_size = 64,
|
|
53
|
+
+ .access_ext_mem = true,
|
|
54
|
+
};
|
|
55
|
+
ESP_RETURN_ON_ERROR(gdma_config_transfer(dma_ctx->tx_dma_chan, &trans_cfg), SPI_TAG, "config gdma tx transfer failed");
|
|
56
|
+
ESP_RETURN_ON_ERROR(gdma_config_transfer(dma_ctx->rx_dma_chan, &trans_cfg), SPI_TAG, "config gdma rx transfer failed");
|
|
57
|
+
--
|
|
58
|
+
2.50.1 (Apple Git-155)
|
|
59
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# ESP-IDF SDK patches
|
|
2
|
+
|
|
3
|
+
Patches applied to ESP-IDF to unlock features the stock SDK gates off.
|
|
4
|
+
Each patch is a standalone `git format-patch` output — applies cleanly with
|
|
5
|
+
`git am` on top of the SDK commit it targets.
|
|
6
|
+
|
|
7
|
+
## NOT needed on ESP-IDF 6.0+ (the supported version)
|
|
8
|
+
|
|
9
|
+
As of ESP-IDF **6.0**, both patches below are **obsolete — Espressif
|
|
10
|
+
upstreamed PSRAM SPI DMA**, verified against v6.0.1:
|
|
11
|
+
|
|
12
|
+
- `components/esp_driver_spi/src/gpspi/spi_common.c` now ships
|
|
13
|
+
`.access_ext_mem = true` in the GDMA transfer config by default (this was
|
|
14
|
+
the entire point of patch 0002).
|
|
15
|
+
- `components/esp_driver_spi/src/gpspi/spi_master.c` no longer gates TX
|
|
16
|
+
buffers on `esp_ptr_dma_capable()` / no internal bounce-buffer path, so
|
|
17
|
+
patch 0001 (widening `esp_ptr_dma_capable`) has no effect — on 6.0 that
|
|
18
|
+
function is only read for a diagnostic log in the gea display backend.
|
|
19
|
+
|
|
20
|
+
So on 6.0 the PSRAM framebuffer DMAs to the QSPI panel **out of the box, no
|
|
21
|
+
SDK patching**. The gea backend's `esp_cache_msync(..., C2M)` before each
|
|
22
|
+
flush is still required and is present (targets/esp32/display.cpp).
|
|
23
|
+
|
|
24
|
+
One residual tuning difference: 6.0 defaults the SPI GDMA
|
|
25
|
+
`max_data_burst_size` to **32**; the 5.5 patch below used **64** for extra
|
|
26
|
+
headroom against SPI-TX-FIFO underrun at 80 MHz QSPI (underrun shows as
|
|
27
|
+
horizontal solid-colour bands). If you ever see banding under heavy flush on
|
|
28
|
+
6.0, bump that one line in `spi_common.c` to 64 — but 32 is the tested 6.0
|
|
29
|
+
default and renders cleanly here.
|
|
30
|
+
|
|
31
|
+
The patches remain below for building on **ESP-IDF ≤ 5.5.x** only.
|
|
32
|
+
|
|
33
|
+
## How to apply (ESP-IDF ≤ 5.5.x only)
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
cd "$IDF_PATH"
|
|
37
|
+
git checkout -b gea-psram-spi-dma v5.5.1 # or whatever you were on
|
|
38
|
+
git am /path/to/targets/targets/esp32/sdk-patches/*.patch
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## How to roll back
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
cd "$IDF_PATH"
|
|
45
|
+
git checkout v5.5.1 # back to the unpatched commit
|
|
46
|
+
git branch -D gea-psram-spi-dma # optional: delete the patch branch
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The patched branch (`gea-psram-spi-dma`) keeps your edits available — checkout
|
|
50
|
+
the unpatched ref to disable, checkout the patched branch to re-enable.
|
|
51
|
+
|
|
52
|
+
## Current patches
|
|
53
|
+
|
|
54
|
+
Both patches must be applied together — they are companion changes. The
|
|
55
|
+
first lets `spi_master`'s argument validation accept PSRAM; the second
|
|
56
|
+
configures the GDMA channel `spi_master` uses to actually fetch from PSRAM.
|
|
57
|
+
Either one alone leaves the LCD pipeline broken.
|
|
58
|
+
|
|
59
|
+
### `0001-esp_ptr_dma_capable-accept-PSRAM.patch`
|
|
60
|
+
|
|
61
|
+
**Target:** ESP-IDF v5.5.1 (commit `fcae3288`).
|
|
62
|
+
**File:** `components/esp_hw_support/include/esp_memory_utils.h`.
|
|
63
|
+
|
|
64
|
+
**What it does:** widens `esp_ptr_dma_capable()` so it returns true for PSRAM
|
|
65
|
+
buffers on SoCs that support PSRAM DMA (ESP32-S3 octal PSRAM). The base
|
|
66
|
+
inline check only recognised internal SRAM (`SOC_DMA_LOW..SOC_DMA_HIGH`).
|
|
67
|
+
|
|
68
|
+
**Why we need it:** `esp_lcd_panel_io_spi` → `spi_master.c` calls this check
|
|
69
|
+
on every transmit buffer. When the LCD framebuffer lives in PSRAM (which it
|
|
70
|
+
must — it's 411 KB, doesn't fit in internal RAM), the check fails and
|
|
71
|
+
`spi_master` allocates an internal bounce buffer the same size as the chunk
|
|
72
|
+
(64+ KB) and `memcpy`s into it. Two problems:
|
|
73
|
+
|
|
74
|
+
1. The internal heap is fragmented after WiFi/BT/staging allocations — the
|
|
75
|
+
largest contiguous block is ~32 KB, so the bounce alloc fails outright
|
|
76
|
+
with `ESP_ERR_NO_MEM` and the LCD draw is dropped.
|
|
77
|
+
2. Even when it succeeds, the bounce-copy negates the perf reason for
|
|
78
|
+
wanting direct DMA in the first place.
|
|
79
|
+
|
|
80
|
+
With the patch the SPI master accepts the PSRAM pointer as-is. The caller
|
|
81
|
+
must call `esp_cache_msync(addr, size, ESP_CACHE_MSYNC_FLAG_DIR_C2M)` before
|
|
82
|
+
queuing the transaction to flush CPU writes to PSRAM (otherwise DMA reads
|
|
83
|
+
stale cache contents). The Gea display backend does this in
|
|
84
|
+
`flushFramebufferRect()`.
|
|
85
|
+
|
|
86
|
+
### `0002-gdma-access_ext_mem-spi_master.patch`
|
|
87
|
+
|
|
88
|
+
**Target:** ESP-IDF v5.5.1 (commit `fcae3288`).
|
|
89
|
+
**File:** `components/esp_driver_spi/src/gpspi/spi_common.c`.
|
|
90
|
+
|
|
91
|
+
**What it does:** two related changes to the GDMA channel `spi_master`
|
|
92
|
+
allocates:
|
|
93
|
+
|
|
94
|
+
1. Flips `gdma_transfer_config_t.access_ext_mem` from `false` to `true`.
|
|
95
|
+
2. Bumps `max_data_burst_size` from `16` to `64` bytes — matching what
|
|
96
|
+
`esp_lcd_panel_rgb` uses by default for its PSRAM framebuffer reads.
|
|
97
|
+
|
|
98
|
+
Companion to patch 0001.
|
|
99
|
+
|
|
100
|
+
**Why we need it:** even after patch 0001 lets PSRAM pointers through
|
|
101
|
+
`spi_master`'s validation, the underlying GDMA channel `spi_master` allocates
|
|
102
|
+
for itself is explicitly configured to **not access external memory**:
|
|
103
|
+
|
|
104
|
+
```c
|
|
105
|
+
// TODO: add support to allow SPI transfer PSRAM buffer
|
|
106
|
+
gdma_transfer_config_t trans_cfg = {
|
|
107
|
+
.max_data_burst_size = 16,
|
|
108
|
+
.access_ext_mem = false,
|
|
109
|
+
};
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
ESP-IDF themselves left a `TODO` to add PSRAM support. Without the flag,
|
|
113
|
+
GDMA happily queues descriptors that reference PSRAM addresses but reads
|
|
114
|
+
garbage from the bus when it actually tries to fetch — you see horizontal
|
|
115
|
+
bands of solid colour on the LCD instead of the framebuffer contents.
|
|
116
|
+
Setting the flag to `true` enables the GDMA hardware path that resolves
|
|
117
|
+
PSRAM virtual addresses through the cache controller.
|
|
118
|
+
|
|
119
|
+
**Risk:** marginal performance cost for SPI transfers from internal RAM,
|
|
120
|
+
since the GDMA channel is now configured to support both. The cost is in
|
|
121
|
+
descriptor setup, not transfer rate. No correctness impact for non-PSRAM
|
|
122
|
+
sources.
|
|
123
|
+
|
|
124
|
+
**Upstream:** the TODO suggests Espressif will eventually do this themselves;
|
|
125
|
+
when they do, this patch becomes redundant. Until then, it's a local
|
|
126
|
+
override. Keep applied as long as you are building with ESP-IDF ≤ 5.5.x
|
|
127
|
+
and using PSRAM framebuffers.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
#include "services/app_runner.h"
|
|
2
|
+
|
|
3
|
+
#include <cstddef>
|
|
4
|
+
#include <cstdio>
|
|
5
|
+
|
|
6
|
+
#include "app.h"
|
|
7
|
+
#include "events.h"
|
|
8
|
+
#include "memory_config.h"
|
|
9
|
+
#include "services/app_state.h"
|
|
10
|
+
#include "services/diagnostics.h"
|
|
11
|
+
|
|
12
|
+
#include "esp_heap_caps.h"
|
|
13
|
+
#include "esp_log.h"
|
|
14
|
+
#include "esp_rom_sys.h"
|
|
15
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG && CONFIG_HEAP_TRACING_STANDALONE
|
|
16
|
+
#include "esp_attr.h"
|
|
17
|
+
#include "esp_heap_trace.h"
|
|
18
|
+
#include "esp_memory_utils.h"
|
|
19
|
+
#endif
|
|
20
|
+
#include "freertos/FreeRTOS.h"
|
|
21
|
+
#include "freertos/idf_additions.h"
|
|
22
|
+
#include "freertos/semphr.h"
|
|
23
|
+
#include "freertos/task.h"
|
|
24
|
+
|
|
25
|
+
namespace gea::framework::services {
|
|
26
|
+
|
|
27
|
+
namespace {
|
|
28
|
+
|
|
29
|
+
constexpr const char *kTag = "gea_esp32_app";
|
|
30
|
+
|
|
31
|
+
constexpr int kGeaAppInitTaskStack = GEA_EMBEDDED_GEA_INIT_TASK_STACK_BYTES;
|
|
32
|
+
|
|
33
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG && CONFIG_HEAP_TRACING_STANDALONE
|
|
34
|
+
constexpr std::size_t kAppInitHeapTraceRecords = 1024;
|
|
35
|
+
constexpr std::size_t kAppInitHeapTracePrintMinBytes = 128;
|
|
36
|
+
|
|
37
|
+
EXT_RAM_BSS_ATTR heap_trace_record_t appInitHeapTraceRecords[kAppInitHeapTraceRecords];
|
|
38
|
+
bool appInitHeapTraceReady = false;
|
|
39
|
+
|
|
40
|
+
void printHeapTracePcList(const void *const *pcs)
|
|
41
|
+
{
|
|
42
|
+
for (int i = 0; i < CONFIG_HEAP_TRACING_STACK_DEPTH; ++i) {
|
|
43
|
+
if (!pcs[i]) break;
|
|
44
|
+
esp_rom_printf(" pc%d=0x%08x", i, static_cast<unsigned>(reinterpret_cast<std::uintptr_t>(pcs[i])));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
void startAppInitHeapTrace()
|
|
49
|
+
{
|
|
50
|
+
if (!appInitHeapTraceReady) {
|
|
51
|
+
const esp_err_t init = heap_trace_init_standalone(appInitHeapTraceRecords, kAppInitHeapTraceRecords);
|
|
52
|
+
appInitHeapTraceReady = (init == ESP_OK);
|
|
53
|
+
esp_rom_printf("[heap-trace] app_init init=%d records=%u\n",
|
|
54
|
+
static_cast<int>(init),
|
|
55
|
+
static_cast<unsigned>(kAppInitHeapTraceRecords));
|
|
56
|
+
}
|
|
57
|
+
if (!appInitHeapTraceReady) return;
|
|
58
|
+
const esp_err_t start = heap_trace_start(HEAP_TRACE_LEAKS);
|
|
59
|
+
esp_rom_printf("[heap-trace] app_init start=%d\n", static_cast<int>(start));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
void stopAndDumpAppInitHeapTrace()
|
|
63
|
+
{
|
|
64
|
+
if (!appInitHeapTraceReady) return;
|
|
65
|
+
const esp_err_t stop = heap_trace_stop();
|
|
66
|
+
heap_trace_summary_t summary{};
|
|
67
|
+
const esp_err_t summaryErr = heap_trace_summary(&summary);
|
|
68
|
+
esp_rom_printf(
|
|
69
|
+
"[heap-trace] app_init stop=%d summary=%d mode=%d allocs=%u frees=%u count=%u capacity=%u high=%u overflow=%u\n",
|
|
70
|
+
static_cast<int>(stop),
|
|
71
|
+
static_cast<int>(summaryErr),
|
|
72
|
+
static_cast<int>(summary.mode),
|
|
73
|
+
static_cast<unsigned>(summary.total_allocations),
|
|
74
|
+
static_cast<unsigned>(summary.total_frees),
|
|
75
|
+
static_cast<unsigned>(summary.count),
|
|
76
|
+
static_cast<unsigned>(summary.capacity),
|
|
77
|
+
static_cast<unsigned>(summary.high_water_mark),
|
|
78
|
+
static_cast<unsigned>(summary.has_overflowed));
|
|
79
|
+
|
|
80
|
+
std::uint32_t internalLiveBytes = 0;
|
|
81
|
+
std::uint32_t internalLiveBlocks = 0;
|
|
82
|
+
std::uint32_t printedBlocks = 0;
|
|
83
|
+
const size_t count = heap_trace_get_count();
|
|
84
|
+
for (size_t i = 0; i < count; ++i) {
|
|
85
|
+
heap_trace_record_t record{};
|
|
86
|
+
if (heap_trace_get(i, &record) != ESP_OK || !record.address || record.freed) continue;
|
|
87
|
+
if (!esp_ptr_internal(record.address)) continue;
|
|
88
|
+
internalLiveBytes += static_cast<std::uint32_t>(record.size);
|
|
89
|
+
internalLiveBlocks += 1;
|
|
90
|
+
if (record.size < kAppInitHeapTracePrintMinBytes) continue;
|
|
91
|
+
printedBlocks += 1;
|
|
92
|
+
esp_rom_printf("[heap-live] scope=app_init ptr=0x%08x size=%u",
|
|
93
|
+
static_cast<unsigned>(reinterpret_cast<std::uintptr_t>(record.address)),
|
|
94
|
+
static_cast<unsigned>(record.size));
|
|
95
|
+
printHeapTracePcList(record.alloced_by);
|
|
96
|
+
esp_rom_printf("\n");
|
|
97
|
+
}
|
|
98
|
+
esp_rom_printf("[heap-trace] app_init internal_live_blocks=%u internal_live_bytes=%u printed=%u min_print=%u\n",
|
|
99
|
+
static_cast<unsigned>(internalLiveBlocks),
|
|
100
|
+
static_cast<unsigned>(internalLiveBytes),
|
|
101
|
+
static_cast<unsigned>(printedBlocks),
|
|
102
|
+
static_cast<unsigned>(kAppInitHeapTracePrintMinBytes));
|
|
103
|
+
}
|
|
104
|
+
#endif
|
|
105
|
+
|
|
106
|
+
#if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
|
|
107
|
+
void logCurrentTaskStack(const char *stage, int stackBytes)
|
|
108
|
+
{
|
|
109
|
+
TaskHandle_t currentTask = xTaskGetCurrentTaskHandle();
|
|
110
|
+
ESP_LOGI(kTag,
|
|
111
|
+
"stack probe [%s] task=%s stack_arg=%d hwm=%u",
|
|
112
|
+
stage ? stage : "?",
|
|
113
|
+
currentTask ? pcTaskGetName(currentTask) : "?",
|
|
114
|
+
stackBytes,
|
|
115
|
+
static_cast<unsigned>(uxTaskGetStackHighWaterMark(currentTask)));
|
|
116
|
+
}
|
|
117
|
+
#endif
|
|
118
|
+
|
|
119
|
+
struct InitTaskArgs {
|
|
120
|
+
int width = 0;
|
|
121
|
+
int height = 0;
|
|
122
|
+
SemaphoreHandle_t done = nullptr;
|
|
123
|
+
bool ok = false;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
class GeaInitTask {
|
|
127
|
+
public:
|
|
128
|
+
static void run(void *arg)
|
|
129
|
+
{
|
|
130
|
+
auto *args = static_cast<InitTaskArgs *>(arg);
|
|
131
|
+
#if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
|
|
132
|
+
logCurrentTaskStack("gea_init:start", kGeaAppInitTaskStack);
|
|
133
|
+
#endif
|
|
134
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
135
|
+
HeapProbe::log("gea_init:start");
|
|
136
|
+
#endif
|
|
137
|
+
AppState::lock();
|
|
138
|
+
bool ok = true;
|
|
139
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG && CONFIG_HEAP_TRACING_STANDALONE
|
|
140
|
+
startAppInitHeapTrace();
|
|
141
|
+
#endif
|
|
142
|
+
gea::framework::app::Application::init(args->width, args->height);
|
|
143
|
+
AppState::afterAppInit();
|
|
144
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG && CONFIG_HEAP_TRACING_STANDALONE
|
|
145
|
+
stopAndDumpAppInitHeapTrace();
|
|
146
|
+
#endif
|
|
147
|
+
AppState::unlock();
|
|
148
|
+
#if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
|
|
149
|
+
logCurrentTaskStack("gea_init:after_app_init", kGeaAppInitTaskStack);
|
|
150
|
+
#endif
|
|
151
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
152
|
+
HeapProbe::log("gea_init:after_app_init");
|
|
153
|
+
#endif
|
|
154
|
+
args->ok = ok;
|
|
155
|
+
xSemaphoreGive(args->done);
|
|
156
|
+
#if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
|
|
157
|
+
logCurrentTaskStack("gea_init:before_delete", kGeaAppInitTaskStack);
|
|
158
|
+
#endif
|
|
159
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
160
|
+
HeapProbe::log("gea_init:before_delete");
|
|
161
|
+
#endif
|
|
162
|
+
vTaskDeleteWithCaps(nullptr);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
bool runGeaInitTask(int width, int height)
|
|
167
|
+
{
|
|
168
|
+
SemaphoreHandle_t done = xSemaphoreCreateBinary();
|
|
169
|
+
if (!done) {
|
|
170
|
+
ESP_LOGE(kTag, "Failed to create gea init semaphore");
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
InitTaskArgs args{};
|
|
175
|
+
args.width = width;
|
|
176
|
+
args.height = height;
|
|
177
|
+
args.done = done;
|
|
178
|
+
|
|
179
|
+
TaskHandle_t task = nullptr;
|
|
180
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
181
|
+
HeapProbe::log("app_runner:before_gea_init_task");
|
|
182
|
+
#endif
|
|
183
|
+
BaseType_t created = pdFAIL;
|
|
184
|
+
#if CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
|
|
185
|
+
// Try SPIRAM stack first. Previously gated on `!defined(GEA_EMBEDDED_APP_USES_BLE)`
|
|
186
|
+
// — the assumption being that BT controller interrupts couldn't tolerate
|
|
187
|
+
// stacks in PSRAM. In practice gea_init is a one-shot bootstrap task that
|
|
188
|
+
// runs `__gea_top_level()` and then exits, so any BLE event handler that
|
|
189
|
+
// preempted it would do so against a brief, idle stack — there's no
|
|
190
|
+
// long-lived BLE-vs-PSRAM-cache contention. Removing the gate is
|
|
191
|
+
// necessary for BLE applications that import `BLE` directly. The
|
|
192
|
+
// analyzer correctly flags the active build as `USES_BLE`; the old
|
|
193
|
+
// gate then forced gea_init into internal DRAM, and the ~64 KB stack
|
|
194
|
+
// didn't fit in the post-init internal heap (largest contiguous ~31 KB
|
|
195
|
+
// after WiFi/LWIP/diag/OTA init).
|
|
196
|
+
//
|
|
197
|
+
// Also dropped `MALLOC_CAP_8BIT` from the cap mask — under octal-PSRAM +
|
|
198
|
+
// reserved-WiFi-pool, the `8BIT` cap excludes the large contiguous SPIRAM
|
|
199
|
+
// chunks even though SPIRAM is genuinely byte-accessible. Stack memory is
|
|
200
|
+
// only touched by FreeRTOS context save/restore (word-aligned) and user
|
|
201
|
+
// code (via cache, which doesn't care about cap flags), so dropping the
|
|
202
|
+
// 8BIT requirement here is safe.
|
|
203
|
+
created = xTaskCreateWithCaps(
|
|
204
|
+
&GeaInitTask::run,
|
|
205
|
+
"gea_init",
|
|
206
|
+
kGeaAppInitTaskStack,
|
|
207
|
+
&args,
|
|
208
|
+
5,
|
|
209
|
+
&task,
|
|
210
|
+
MALLOC_CAP_SPIRAM);
|
|
211
|
+
ESP_LOGI("app_runner", "gea_init SPIRAM create: %s", created == pdPASS ? "ok" : "FAIL");
|
|
212
|
+
#endif
|
|
213
|
+
if (created != pdPASS) {
|
|
214
|
+
created = xTaskCreateWithCaps(
|
|
215
|
+
&GeaInitTask::run,
|
|
216
|
+
"gea_init",
|
|
217
|
+
kGeaAppInitTaskStack,
|
|
218
|
+
&args,
|
|
219
|
+
5,
|
|
220
|
+
&task,
|
|
221
|
+
MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
|
222
|
+
ESP_LOGI("app_runner", "gea_init INTERNAL create: %s", created == pdPASS ? "ok" : "FAIL");
|
|
223
|
+
}
|
|
224
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
225
|
+
HeapProbe::log(created == pdPASS ? "app_runner:after_gea_init_task" : "app_runner:after_gea_init_task_failed");
|
|
226
|
+
#endif
|
|
227
|
+
if (created != pdPASS) {
|
|
228
|
+
ESP_LOGE(kTag, "Failed to start gea init task");
|
|
229
|
+
vSemaphoreDelete(done);
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
xSemaphoreTake(done, portMAX_DELAY);
|
|
234
|
+
#if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
|
|
235
|
+
HeapProbe::log("app_runner:after_gea_init_done");
|
|
236
|
+
#endif
|
|
237
|
+
vSemaphoreDelete(done);
|
|
238
|
+
return args.ok;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
} // namespace
|
|
242
|
+
|
|
243
|
+
bool AppRunner::initApplication(int width, int height)
|
|
244
|
+
{
|
|
245
|
+
return runGeaInitTask(width, height);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
} // namespace gea::framework::services
|