@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,691 @@
|
|
|
1
|
+
# This component definition is shared by the two ESP32 e-paper targets. A
|
|
2
|
+
# board that includes this file sets GEA_EMBEDDED_TARGET_MAIN_DIR and the
|
|
3
|
+
# target-specific knobs below before including it.
|
|
4
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_MAIN_DIR)
|
|
5
|
+
set(GEA_EMBEDDED_TARGET_MAIN_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
|
6
|
+
endif()
|
|
7
|
+
|
|
8
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_CPP_BOARD)
|
|
9
|
+
set(GEA_EMBEDDED_TARGET_CPP_BOARD "esp32-s3-epaper-1.54")
|
|
10
|
+
endif()
|
|
11
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_DISPLAY_WIDTH)
|
|
12
|
+
set(GEA_EMBEDDED_TARGET_DISPLAY_WIDTH 200)
|
|
13
|
+
endif()
|
|
14
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_DISPLAY_HEIGHT)
|
|
15
|
+
set(GEA_EMBEDDED_TARGET_DISPLAY_HEIGHT 200)
|
|
16
|
+
endif()
|
|
17
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_WIDTH)
|
|
18
|
+
set(GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_WIDTH ${GEA_EMBEDDED_TARGET_DISPLAY_WIDTH})
|
|
19
|
+
endif()
|
|
20
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_HEIGHT)
|
|
21
|
+
set(GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_HEIGHT ${GEA_EMBEDDED_TARGET_DISPLAY_HEIGHT})
|
|
22
|
+
endif()
|
|
23
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_CSS_DEVICE_PIXEL_RATIO)
|
|
24
|
+
set(GEA_EMBEDDED_TARGET_CSS_DEVICE_PIXEL_RATIO "1.0")
|
|
25
|
+
endif()
|
|
26
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_AUDIO_SOURCE)
|
|
27
|
+
set(GEA_EMBEDDED_TARGET_AUDIO_SOURCE "${CMAKE_CURRENT_LIST_DIR}/../../esp32/chip_bindings/audio/es8311.cpp")
|
|
28
|
+
endif()
|
|
29
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_EXTRA_SOURCES)
|
|
30
|
+
set(GEA_EMBEDDED_TARGET_EXTRA_SOURCES "")
|
|
31
|
+
endif()
|
|
32
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_DISPLAY_MONOCHROME)
|
|
33
|
+
set(GEA_EMBEDDED_TARGET_DISPLAY_MONOCHROME 1)
|
|
34
|
+
endif()
|
|
35
|
+
# Accelerometer/gyroscope implementation. Boards with no IMU keep the default
|
|
36
|
+
# no-op file; a board that actually has one (PaperS3's BMI270) points this at
|
|
37
|
+
# its real driver instead of shipping a file named "stub" that is not one.
|
|
38
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_IMU_SOURCE)
|
|
39
|
+
set(GEA_EMBEDDED_TARGET_IMU_SOURCE "imu_stub.cpp")
|
|
40
|
+
endif()
|
|
41
|
+
# 1 = framebuffer stores panel-endian (byteswapped) RGB565 like the amoled
|
|
42
|
+
# targets, so SPI flushes skip the per-pixel swap. Epaper family packs to
|
|
43
|
+
# 1-bit itself and keeps native little-endian.
|
|
44
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_PIXEL_PANEL_ENDIAN)
|
|
45
|
+
set(GEA_EMBEDDED_TARGET_PIXEL_PANEL_ENDIAN 0)
|
|
46
|
+
endif()
|
|
47
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_EXTRA_REQUIRES)
|
|
48
|
+
set(GEA_EMBEDDED_TARGET_EXTRA_REQUIRES "")
|
|
49
|
+
endif()
|
|
50
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_COMPILE_DEFINITIONS)
|
|
51
|
+
set(GEA_EMBEDDED_TARGET_COMPILE_DEFINITIONS "")
|
|
52
|
+
endif()
|
|
53
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_LDFRAGMENTS)
|
|
54
|
+
set(GEA_EMBEDDED_TARGET_LDFRAGMENTS "")
|
|
55
|
+
endif()
|
|
56
|
+
|
|
57
|
+
set(GEA_EMBEDDED_ROOT "${GEA_EMBEDDED_TARGET_MAIN_DIR}/../../..")
|
|
58
|
+
cmake_path(ABSOLUTE_PATH GEA_EMBEDDED_ROOT NORMALIZE)
|
|
59
|
+
|
|
60
|
+
# geastack split: resolve the gea framework via npm + the shared manifest.
|
|
61
|
+
# Exports GEA_CORE/GEA_COMPILER/GEA_PLUGIN/GEA_CHIPS/GEA_HOST,
|
|
62
|
+
# GEA_APP_ENTRY_SRC, and GEA_FW_CXX_SOURCES/GEA_FW_C_SOURCES/GEA_FW_INCLUDE_DIRS.
|
|
63
|
+
include("${GEA_EMBEDDED_ROOT}/targets/esp32/gea_framework.cmake")
|
|
64
|
+
include("${GEA_EMBEDDED_ROOT}/targets/cmake/geatsc_generated_archive.cmake")
|
|
65
|
+
if(NOT DEFINED GEA_EMBEDDED_TARGET_AUDIO_RUNTIME_SOURCE)
|
|
66
|
+
set(GEA_EMBEDDED_TARGET_AUDIO_RUNTIME_SOURCE "${GEA_HOST}/audio_runtime.cpp")
|
|
67
|
+
endif()
|
|
68
|
+
|
|
69
|
+
# GEA_EMBEDDED_APP must be set explicitly in the real configure pass — no
|
|
70
|
+
# default. The build script `scripts/board` passes
|
|
71
|
+
# `-DGEA_EMBEDDED_APP=<id>` for every command, so this is invisible in
|
|
72
|
+
# normal use. Without an explicit value the previous default `tic-tac-toe`
|
|
73
|
+
# silently picked an arbitrary app whose features didn't match the user's
|
|
74
|
+
# actual selection, producing a REQUIRES list mismatched against the real
|
|
75
|
+
# pass.
|
|
76
|
+
#
|
|
77
|
+
# Script-mode (`cmake -P`, used by IDF's component_get_requirements.cmake)
|
|
78
|
+
# is a special case: it runs before the user's -D args reach the cache, so
|
|
79
|
+
# a hard error there would break component-requirement extraction
|
|
80
|
+
# entirely. We fall through to `tilt-breakout` in that pass because it is a
|
|
81
|
+
# gea app with a broad native binding surface.
|
|
82
|
+
set(GEA_EMBEDDED_APP "" CACHE STRING "Example app to build (must match a package.json gea.id) — required, no default")
|
|
83
|
+
if(CMAKE_SCRIPT_MODE_FILE AND "${GEA_EMBEDDED_APP}" STREQUAL "")
|
|
84
|
+
set(GEA_EMBEDDED_APP "tilt-breakout")
|
|
85
|
+
elseif(NOT CMAKE_SCRIPT_MODE_FILE AND "${GEA_EMBEDDED_APP}" STREQUAL "")
|
|
86
|
+
message(FATAL_ERROR "GEA_EMBEDDED_APP is required. Pass -DGEA_EMBEDDED_APP=<id> or use scripts/board which sets it for you (see package.json gea.id values for valid ids).")
|
|
87
|
+
endif()
|
|
88
|
+
set(GEA_EMBEDDED_HTTPS_SUPPORT "auto" CACHE STRING "Enable HTTPS fetch support: auto, on, or off")
|
|
89
|
+
set(GEA_EMBEDDED_CPP_BOARD "${GEA_EMBEDDED_TARGET_CPP_BOARD}" CACHE STRING "Board profile passed to geatsc for C++ target selection" FORCE)
|
|
90
|
+
# DPR 1.0 (logical px == physical 200x200): pixel fonts (Cozette) only render
|
|
91
|
+
# crisp, uniform stems when baked at an integer multiple of their native size,
|
|
92
|
+
# which requires baked-size == CSS-size. A non-integer DPR (1.5) would force
|
|
93
|
+
# fractional baked sizes and reintroduce uneven 1px/2px stems on this 1-bit panel.
|
|
94
|
+
set(GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO "${GEA_EMBEDDED_TARGET_CSS_DEVICE_PIXEL_RATIO}" CACHE STRING "Logical CSS px to physical pixel scale for this board" FORCE)
|
|
95
|
+
|
|
96
|
+
# Write a file only when its content would change. Preserves mtime when content matches,
|
|
97
|
+
# so downstream make/ninja rules don't see spurious changes on every reconfigure.
|
|
98
|
+
function(_gea_write_if_different FILE_PATH CONTENT)
|
|
99
|
+
set(_should_write 1)
|
|
100
|
+
if(EXISTS "${FILE_PATH}")
|
|
101
|
+
file(READ "${FILE_PATH}" _existing)
|
|
102
|
+
if("${_existing}" STREQUAL "${CONTENT}")
|
|
103
|
+
set(_should_write 0)
|
|
104
|
+
endif()
|
|
105
|
+
endif()
|
|
106
|
+
if(_should_write)
|
|
107
|
+
file(WRITE "${FILE_PATH}" "${CONTENT}")
|
|
108
|
+
endif()
|
|
109
|
+
endfunction()
|
|
110
|
+
|
|
111
|
+
# Enumerate files under DIR matching one of the source extensions / config filenames, pruning
|
|
112
|
+
# node_modules / dist / .vite at directory boundaries. CMake's file(GLOB_RECURSE) walks every file
|
|
113
|
+
# in the tree before filtering — for example dirs that's ~1000 stat calls per node_modules. find(1)
|
|
114
|
+
# prunes at the directory level, so configure stays under a second instead of half a minute.
|
|
115
|
+
function(_gea_find_sources OUT_VAR DIR)
|
|
116
|
+
get_filename_component(_gea_find_dir "${DIR}" REALPATH)
|
|
117
|
+
set(_gea_optional_prunes "")
|
|
118
|
+
if(ARGC GREATER 2 AND "${ARGV2}" STREQUAL "PRUNE_VENDOR")
|
|
119
|
+
list(APPEND _gea_optional_prunes -o -name vendor)
|
|
120
|
+
endif()
|
|
121
|
+
execute_process(
|
|
122
|
+
COMMAND find -L "${_gea_find_dir}"
|
|
123
|
+
-type d \( -name node_modules -o -name dist -o -name .vite -o -name build -o -name .build -o -name .scratch -o -name .test-tmp -o -name generated-output ${_gea_optional_prunes} \) -prune
|
|
124
|
+
-o -type f \(
|
|
125
|
+
-name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js"
|
|
126
|
+
-o -name "*.css" -o -name "*.html"
|
|
127
|
+
-o -name "package.json" -o -name "tsconfig.json" -o -name "vite.config.ts"
|
|
128
|
+
\) -print
|
|
129
|
+
OUTPUT_VARIABLE _output
|
|
130
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
131
|
+
)
|
|
132
|
+
if(_output STREQUAL "")
|
|
133
|
+
set(${OUT_VAR} "" PARENT_SCOPE)
|
|
134
|
+
else()
|
|
135
|
+
string(REPLACE "\n" ";" _list "${_output}")
|
|
136
|
+
set(${OUT_VAR} "${_list}" PARENT_SCOPE)
|
|
137
|
+
endif()
|
|
138
|
+
endfunction()
|
|
139
|
+
|
|
140
|
+
function(_gea_collect_app_sources OUT_VAR APP_DIR)
|
|
141
|
+
_gea_find_sources(_src "${APP_DIR}")
|
|
142
|
+
set(${OUT_VAR} "${_src}" PARENT_SCOPE)
|
|
143
|
+
endfunction()
|
|
144
|
+
|
|
145
|
+
# App image assets (PNG/JPG/GIF). generate-gea-embedded-assets.mjs embeds these as
|
|
146
|
+
# .rodata referenced by `<img src>`, so they MUST be on the geatsc_build DEPENDS
|
|
147
|
+
# list: otherwise resizing/replacing an image never re-runs codegen and the stale
|
|
148
|
+
# bytes ship (and an oversized PNG silently fails to decode on-device). Scoped to
|
|
149
|
+
# the app dir (not the framework) so configure stays fast.
|
|
150
|
+
function(_gea_collect_app_assets OUT_VAR APP_DIR)
|
|
151
|
+
execute_process(
|
|
152
|
+
COMMAND find -L "${APP_DIR}"
|
|
153
|
+
-type d \( -name node_modules -o -name dist -o -name .vite -o -name build \) -prune
|
|
154
|
+
-o -type f \(
|
|
155
|
+
-name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.gif"
|
|
156
|
+
\) -print
|
|
157
|
+
OUTPUT_VARIABLE _output
|
|
158
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
159
|
+
)
|
|
160
|
+
if(_output STREQUAL "")
|
|
161
|
+
set(${OUT_VAR} "" PARENT_SCOPE)
|
|
162
|
+
else()
|
|
163
|
+
string(REPLACE "\n" ";" _list "${_output}")
|
|
164
|
+
set(${OUT_VAR} "${_list}" PARENT_SCOPE)
|
|
165
|
+
endif()
|
|
166
|
+
endfunction()
|
|
167
|
+
|
|
168
|
+
# Source files that affect Gea compiler -> geatsc output. Keep this scoped to
|
|
169
|
+
# the embedded framework, upstream Gea compiler, and @geatsc/plugin-gea.
|
|
170
|
+
_gea_find_sources(_GEA_COMPILER_DEP_SRCS "${GEA_CORE}/..")
|
|
171
|
+
_gea_find_sources(_GEA_UPSTREAM_GEA_SRCS "${GEA_COMPILER}" PRUNE_VENDOR)
|
|
172
|
+
_gea_find_sources(_GEATSC_GEA_PLUGIN_SRCS "${GEA_PLUGIN}")
|
|
173
|
+
if(CMAKE_SCRIPT_MODE_FILE)
|
|
174
|
+
file(GLOB_RECURSE _GEATSC_GEA_PLUGIN_DIST_SRCS
|
|
175
|
+
"${GEA_PLUGIN}/dist/*.js"
|
|
176
|
+
"${GEA_PLUGIN}/dist/*.json"
|
|
177
|
+
)
|
|
178
|
+
else()
|
|
179
|
+
file(GLOB_RECURSE _GEATSC_GEA_PLUGIN_DIST_SRCS CONFIGURE_DEPENDS
|
|
180
|
+
"${GEA_PLUGIN}/dist/*.js"
|
|
181
|
+
"${GEA_PLUGIN}/dist/*.json"
|
|
182
|
+
)
|
|
183
|
+
endif()
|
|
184
|
+
list(APPEND _GEA_COMPILER_DEP_SRCS
|
|
185
|
+
"${GEA_CORE}/scripts/build-gea-vite-geatsc.mjs"
|
|
186
|
+
"${GEA_CORE}/scripts/gea-embedded-compat-transform.mjs"
|
|
187
|
+
"${GEA_CORE}/scripts/generate-gea-embedded-fonts.mjs"
|
|
188
|
+
${_GEA_UPSTREAM_GEA_SRCS}
|
|
189
|
+
${_GEATSC_GEA_PLUGIN_SRCS}
|
|
190
|
+
${_GEATSC_GEA_PLUGIN_DIST_SRCS}
|
|
191
|
+
)
|
|
192
|
+
list(REMOVE_DUPLICATES _GEA_COMPILER_DEP_SRCS)
|
|
193
|
+
get_property(_GEA_CONFIGURE_DEPS_REGISTERED GLOBAL PROPERTY GEA_CONFIGURE_DEPS_REGISTERED)
|
|
194
|
+
if(NOT CMAKE_SCRIPT_MODE_FILE AND _GEA_COMPILER_DEP_SRCS AND NOT _GEA_CONFIGURE_DEPS_REGISTERED)
|
|
195
|
+
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${_GEA_COMPILER_DEP_SRCS})
|
|
196
|
+
set_property(GLOBAL PROPERTY GEA_CONFIGURE_DEPS_REGISTERED TRUE)
|
|
197
|
+
endif()
|
|
198
|
+
|
|
199
|
+
# Platform-universal ESP32 host facades (single source of truth).
|
|
200
|
+
include("${GEA_EMBEDDED_ROOT}/targets/esp32/host_sources.cmake")
|
|
201
|
+
|
|
202
|
+
file(GLOB _GEA_FONT_ASSETS
|
|
203
|
+
"${GEA_EMBEDDED_ROOT}/assets/fonts/*.ttf"
|
|
204
|
+
"${GEA_EMBEDDED_ROOT}/assets/fonts/*.otf"
|
|
205
|
+
"${GEA_EMBEDDED_ROOT}/assets/fonts/*.woff"
|
|
206
|
+
"${GEA_EMBEDDED_ROOT}/assets/fonts/*.woff2"
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# App metadata (root;entry;runtime;native sources...) is resolved once by the
|
|
210
|
+
# gea CLI and handed to gea_framework.cmake as GEA_EMBEDDED_APP_META; the
|
|
211
|
+
# GEA_EMBEDDED_APP_DIR/ENTRY/RUNTIME/NATIVE_SOURCE_RELS variables come from there.
|
|
212
|
+
|
|
213
|
+
set(GEA_EMBEDDED_APP_NATIVE_SOURCES "")
|
|
214
|
+
# Expose each app-owned native source's dir (plus the app's `native/` dir) on the
|
|
215
|
+
# include path so the generated program's host-binding includes — e.g.
|
|
216
|
+
# "epub_archive.h" emitted for `gea::host::epub_archive` — resolve. Mirrors the
|
|
217
|
+
# amoled target (esp32-s3-touch-amoled-2.06/main/CMakeLists.txt).
|
|
218
|
+
set(GEA_EMBEDDED_APP_NATIVE_INCLUDE_DIRS "")
|
|
219
|
+
foreach(_GEA_EMBEDDED_APP_NATIVE_SOURCE_REL IN LISTS GEA_EMBEDDED_APP_NATIVE_SOURCE_RELS)
|
|
220
|
+
list(APPEND GEA_EMBEDDED_APP_NATIVE_SOURCES "${GEA_EMBEDDED_APP_DIR}/${_GEA_EMBEDDED_APP_NATIVE_SOURCE_REL}")
|
|
221
|
+
get_filename_component(_GEA_EMBEDDED_APP_NATIVE_SOURCE_DIR "${GEA_EMBEDDED_APP_DIR}/${_GEA_EMBEDDED_APP_NATIVE_SOURCE_REL}" DIRECTORY)
|
|
222
|
+
list(APPEND GEA_EMBEDDED_APP_NATIVE_INCLUDE_DIRS "${_GEA_EMBEDDED_APP_NATIVE_SOURCE_DIR}")
|
|
223
|
+
endforeach()
|
|
224
|
+
if(GEA_EMBEDDED_APP_NATIVE_SOURCES)
|
|
225
|
+
# Apps may keep native sources anywhere (e.g. vendored under src/); only
|
|
226
|
+
# add the conventional native/ dir when it actually exists — ESP-IDF
|
|
227
|
+
# rejects nonexistent include dirs.
|
|
228
|
+
if(IS_DIRECTORY "${GEA_EMBEDDED_APP_DIR}/native")
|
|
229
|
+
list(APPEND GEA_EMBEDDED_APP_NATIVE_INCLUDE_DIRS "${GEA_EMBEDDED_APP_DIR}/native")
|
|
230
|
+
endif()
|
|
231
|
+
list(REMOVE_DUPLICATES GEA_EMBEDDED_APP_NATIVE_INCLUDE_DIRS)
|
|
232
|
+
endif()
|
|
233
|
+
|
|
234
|
+
set(JS_APP_SRC "${GEA_EMBEDDED_APP_DIR}/${GEA_EMBEDDED_APP_ENTRY}")
|
|
235
|
+
|
|
236
|
+
# Each application's generated output gets its own build directory.
|
|
237
|
+
set(GENERATED_APP_DIR "${CMAKE_BINARY_DIR}/apps/${GEA_EMBEDDED_APP}")
|
|
238
|
+
file(MAKE_DIRECTORY "${GENERATED_APP_DIR}")
|
|
239
|
+
set(JS_APP "${GENERATED_APP_DIR}/dist/index.js")
|
|
240
|
+
# geatsc emits one C++ translation unit per source module and records the
|
|
241
|
+
# compile set in geatsc-sources.txt. A generated archive consumes that list at
|
|
242
|
+
# build time so CMake configure does not need to know module filenames up front.
|
|
243
|
+
set(GEATSC_SOURCE_LIST "${GENERATED_APP_DIR}/geatsc-sources.txt")
|
|
244
|
+
set(GEATSC_ARCHIVE "${GENERATED_APP_DIR}/libgea_active_geatsc.a")
|
|
245
|
+
set(GENERATED_FONT_CPP "${GENERATED_APP_DIR}/gea_embedded_font_generated.cpp")
|
|
246
|
+
set(GENERATED_FONT_H "${GENERATED_APP_DIR}/gea_embedded_font_generated.h")
|
|
247
|
+
set(GENERATED_ASSETS_CPP "${GENERATED_APP_DIR}/gea_embedded_assets_generated.cpp")
|
|
248
|
+
set(GENERATED_CONFIG_H "${GENERATED_APP_DIR}/gea_embedded_app_config.h")
|
|
249
|
+
set(GENERATED_INSTALLED_APPS_H "${CMAKE_BINARY_DIR}/gea_embedded_installed_apps_generated.h")
|
|
250
|
+
execute_process(
|
|
251
|
+
COMMAND node
|
|
252
|
+
"${GEA_CORE}/scripts/generate-installed-app-plan.mjs"
|
|
253
|
+
"${GEA_EMBEDDED_TARGET_MAIN_DIR}/../partitions.csv"
|
|
254
|
+
"${GENERATED_INSTALLED_APPS_H}"
|
|
255
|
+
RESULT_VARIABLE GEA_EMBEDDED_INSTALLED_APPS_RESULT
|
|
256
|
+
)
|
|
257
|
+
if(NOT GEA_EMBEDDED_INSTALLED_APPS_RESULT EQUAL 0)
|
|
258
|
+
message(FATAL_ERROR "Failed to generate installed app plan from partitions.csv")
|
|
259
|
+
endif()
|
|
260
|
+
|
|
261
|
+
# The app source owns app-level defaults. On a fresh configure, create only a minimal
|
|
262
|
+
# placeholder; the unified geatsc path can overwrite it with app-derived config
|
|
263
|
+
# later if a native define surface lands here.
|
|
264
|
+
if(NOT EXISTS "${GENERATED_CONFIG_H}")
|
|
265
|
+
# Stub config header kept around because app_main.cpp still includes it.
|
|
266
|
+
_gea_write_if_different("${GENERATED_CONFIG_H}" "#pragma once\n")
|
|
267
|
+
endif()
|
|
268
|
+
if(NOT EXISTS "${GENERATED_FONT_H}")
|
|
269
|
+
_gea_write_if_different("${GENERATED_FONT_H}" [[
|
|
270
|
+
#pragma once
|
|
271
|
+
#define GEA_EMBEDDED_HAS_GENERATED_FONTS 1
|
|
272
|
+
#include "graphics/font.h"
|
|
273
|
+
#define GEA_EMBEDDED_FONT_COUNT 0
|
|
274
|
+
#define GEA_EMBEDDED_FONT_FAMILY_COUNT 0
|
|
275
|
+
]])
|
|
276
|
+
endif()
|
|
277
|
+
if(NOT EXISTS "${GENERATED_FONT_CPP}")
|
|
278
|
+
_gea_write_if_different("${GENERATED_FONT_CPP}" [[
|
|
279
|
+
#include "gea_embedded_font_generated.h"
|
|
280
|
+
namespace gea::framework::graphics::generated {
|
|
281
|
+
void ensureLinked() {}
|
|
282
|
+
const RasterizedFontData *lookupFont(int fontId)
|
|
283
|
+
{
|
|
284
|
+
(void)fontId;
|
|
285
|
+
return nullptr;
|
|
286
|
+
}
|
|
287
|
+
const RasterizedFontData *lookupFontForFamily(int familyId, int sizePx)
|
|
288
|
+
{
|
|
289
|
+
(void)familyId;
|
|
290
|
+
(void)sizePx;
|
|
291
|
+
return nullptr;
|
|
292
|
+
}
|
|
293
|
+
int lookupFontFamily(const char *family)
|
|
294
|
+
{
|
|
295
|
+
(void)family;
|
|
296
|
+
return -1;
|
|
297
|
+
}
|
|
298
|
+
} // namespace gea::framework::graphics::generated
|
|
299
|
+
]])
|
|
300
|
+
endif()
|
|
301
|
+
# Stub asset TU on the SRCS list before geatsc_build overwrites it with the
|
|
302
|
+
# real (or empty) generated registry. Mirrors the font stub above.
|
|
303
|
+
if(NOT EXISTS "${GENERATED_ASSETS_CPP}")
|
|
304
|
+
_gea_write_if_different("${GENERATED_ASSETS_CPP}" [[
|
|
305
|
+
// No embedded assets (stub overwritten by generate-gea-embedded-assets.mjs).
|
|
306
|
+
]])
|
|
307
|
+
endif()
|
|
308
|
+
|
|
309
|
+
# geatsc mode: generated app/user code is compiled from geatsc-sources.txt
|
|
310
|
+
# into a separate archive, then linked with the firmware-side Gea adapter and host bindings.
|
|
311
|
+
# Without app metadata (a configure driven by hand, or IDF's script-mode
|
|
312
|
+
# requirements pass before the CLI's -D values land) JS_APP_SRC is a bare
|
|
313
|
+
# directory; analyzing it would crash node with EISDIR and abort the
|
|
314
|
+
# configure with a misleading "has geatsc been built?" error. The normal
|
|
315
|
+
# pass refuses with the real reason; script mode carries on with an empty
|
|
316
|
+
# binding set, since that pass only extracts component requirements.
|
|
317
|
+
if(NOT EXISTS "${JS_APP_SRC}" OR IS_DIRECTORY "${JS_APP_SRC}")
|
|
318
|
+
if(NOT CMAKE_SCRIPT_MODE_FILE)
|
|
319
|
+
message(FATAL_ERROR "No app entry to build for '${GEA_EMBEDDED_APP}' (JS_APP_SRC='${JS_APP_SRC}'). Run this target through the gea CLI with an app: gea build --board <alias> --app <id>")
|
|
320
|
+
endif()
|
|
321
|
+
set(_GEA_EMBEDDED_ANALYZE_RAW "bindings=\nfeatures=")
|
|
322
|
+
set(_GEA_EMBEDDED_ANALYZE_STATUS 0)
|
|
323
|
+
else()
|
|
324
|
+
execute_process(
|
|
325
|
+
COMMAND node
|
|
326
|
+
"${GEA_COMPILER}/dist/cli.js"
|
|
327
|
+
analyze
|
|
328
|
+
"${JS_APP_SRC}"
|
|
329
|
+
--plugin
|
|
330
|
+
"${GEA_PLUGIN}/dist/index.js"
|
|
331
|
+
OUTPUT_VARIABLE _GEA_EMBEDDED_ANALYZE_RAW
|
|
332
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
333
|
+
RESULT_VARIABLE _GEA_EMBEDDED_ANALYZE_STATUS
|
|
334
|
+
)
|
|
335
|
+
endif()
|
|
336
|
+
if(NOT _GEA_EMBEDDED_ANALYZE_STATUS EQUAL 0)
|
|
337
|
+
message(FATAL_ERROR "geatsc analyze failed for app '${GEA_EMBEDDED_APP}' — has packages/geatsc been built? (run `npm --prefix packages/geatsc run build`)")
|
|
338
|
+
endif()
|
|
339
|
+
# `geatsc analyze` outputs two lines: `bindings=<ids>` and `features=<ids>`.
|
|
340
|
+
string(REGEX MATCH "bindings=([^\n]*)" _ "${_GEA_EMBEDDED_ANALYZE_RAW}")
|
|
341
|
+
set(_GEA_EMBEDDED_HOST_BINDINGS "${CMAKE_MATCH_1}")
|
|
342
|
+
list(REMOVE_DUPLICATES _GEA_EMBEDDED_HOST_BINDINGS)
|
|
343
|
+
if("${_GEA_EMBEDDED_HOST_BINDINGS}" MATCHES "(^|;)screen($|;)")
|
|
344
|
+
message(FATAL_ERROR "The gea screen host binding was removed; generated apps must target the embedded UI/canvas framework")
|
|
345
|
+
endif()
|
|
346
|
+
string(REGEX MATCH "features=([^\n]*)" _ "${_GEA_EMBEDDED_ANALYZE_RAW}")
|
|
347
|
+
set(_GEA_EMBEDDED_HOST_FEATURES "${CMAKE_MATCH_1}")
|
|
348
|
+
|
|
349
|
+
set(APP_GENERATED_SOURCES
|
|
350
|
+
${GEA_EMBEDDED_APP_NATIVE_SOURCES}
|
|
351
|
+
"${GEA_APP_ENTRY_SRC}"
|
|
352
|
+
${GENERATED_FONT_CPP}
|
|
353
|
+
${GENERATED_ASSETS_CPP}
|
|
354
|
+
)
|
|
355
|
+
set(GEATSC_COMPILE_OPTIONS
|
|
356
|
+
-Wno-unused-variable
|
|
357
|
+
-Wno-return-type
|
|
358
|
+
-Os
|
|
359
|
+
${GEA_XTENSA_LITERALS} # -mtext-section-literals on xtensa, empty on riscv (gea_framework.cmake)
|
|
360
|
+
)
|
|
361
|
+
set(GEATSC_COMPILE_DEFINITIONS "")
|
|
362
|
+
if(NOT CMAKE_SCRIPT_MODE_FILE)
|
|
363
|
+
set_source_files_properties(
|
|
364
|
+
"${GEA_HOST}/host/rtc_esp.cpp"
|
|
365
|
+
PROPERTIES COMPILE_OPTIONS "-Wno-unused-variable;-Os"
|
|
366
|
+
)
|
|
367
|
+
endif()
|
|
368
|
+
set(GEA_EMBEDDED_HTTPS_REQUIRES "")
|
|
369
|
+
set(GEA_EMBEDDED_HTTPS_COMPILE_DEFINITIONS "")
|
|
370
|
+
set(GEA_EMBEDDED_BLE_COMPILE_DEFINITIONS "")
|
|
371
|
+
set(GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS "")
|
|
372
|
+
|
|
373
|
+
# The board command passes these after analyzing the active app plus every
|
|
374
|
+
# application. Direct idf.py builds fall back to the same analyzer data
|
|
375
|
+
# collected above, so linkage is capability-driven on both entry paths.
|
|
376
|
+
if(DEFINED ENV{GEA_EMBEDDED_CAPABILITY_NETWORK}
|
|
377
|
+
AND NOT "$ENV{GEA_EMBEDDED_CAPABILITY_NETWORK}" STREQUAL "")
|
|
378
|
+
set(GEA_EMBEDDED_CAPABILITY_NETWORK "$ENV{GEA_EMBEDDED_CAPABILITY_NETWORK}")
|
|
379
|
+
elseif(NOT DEFINED GEA_EMBEDDED_CAPABILITY_NETWORK OR "${GEA_EMBEDDED_CAPABILITY_NETWORK}" STREQUAL "")
|
|
380
|
+
set(GEA_EMBEDDED_CAPABILITY_NETWORK 0)
|
|
381
|
+
if("${_GEA_EMBEDDED_HOST_BINDINGS}" MATCHES "(^|;)(wifi|fetch|http|websocket|rtc)($|;)"
|
|
382
|
+
OR "${_GEA_EMBEDDED_HOST_FEATURES}" MATCHES "(^|;)https($|;)")
|
|
383
|
+
set(GEA_EMBEDDED_CAPABILITY_NETWORK 1)
|
|
384
|
+
endif()
|
|
385
|
+
endif()
|
|
386
|
+
if(DEFINED ENV{GEA_EMBEDDED_CAPABILITY_BLE}
|
|
387
|
+
AND NOT "$ENV{GEA_EMBEDDED_CAPABILITY_BLE}" STREQUAL "")
|
|
388
|
+
set(GEA_EMBEDDED_CAPABILITY_BLE "$ENV{GEA_EMBEDDED_CAPABILITY_BLE}")
|
|
389
|
+
elseif(NOT DEFINED GEA_EMBEDDED_CAPABILITY_BLE OR "${GEA_EMBEDDED_CAPABILITY_BLE}" STREQUAL "")
|
|
390
|
+
set(GEA_EMBEDDED_CAPABILITY_BLE 0)
|
|
391
|
+
if("${_GEA_EMBEDDED_HOST_BINDINGS}" MATCHES "(^|;)ble($|;)")
|
|
392
|
+
set(GEA_EMBEDDED_CAPABILITY_BLE 1)
|
|
393
|
+
endif()
|
|
394
|
+
endif()
|
|
395
|
+
if(DEFINED ENV{GEA_EMBEDDED_CAPABILITY_AUDIO}
|
|
396
|
+
AND NOT "$ENV{GEA_EMBEDDED_CAPABILITY_AUDIO}" STREQUAL "")
|
|
397
|
+
set(GEA_EMBEDDED_CAPABILITY_AUDIO "$ENV{GEA_EMBEDDED_CAPABILITY_AUDIO}")
|
|
398
|
+
elseif(NOT DEFINED GEA_EMBEDDED_CAPABILITY_AUDIO OR "${GEA_EMBEDDED_CAPABILITY_AUDIO}" STREQUAL "")
|
|
399
|
+
set(GEA_EMBEDDED_CAPABILITY_AUDIO 0)
|
|
400
|
+
if("${_GEA_EMBEDDED_HOST_BINDINGS}" MATCHES "(^|;)audio($|;)")
|
|
401
|
+
set(GEA_EMBEDDED_CAPABILITY_AUDIO 1)
|
|
402
|
+
endif()
|
|
403
|
+
endif()
|
|
404
|
+
|
|
405
|
+
set(GEA_EMBEDDED_NETWORK_SOURCES
|
|
406
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/connectivity/diagnostics_transport_offline.cpp")
|
|
407
|
+
set(GEA_EMBEDDED_NETWORK_REQUIRES "")
|
|
408
|
+
set(GEA_EMBEDDED_RTC_SOURCES "")
|
|
409
|
+
if(GEA_EMBEDDED_CAPABILITY_NETWORK)
|
|
410
|
+
set(GEA_EMBEDDED_NETWORK_SOURCES
|
|
411
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/connectivity/diagnostics_transport.cpp"
|
|
412
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/connectivity/wifi.cpp"
|
|
413
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/ota.cpp")
|
|
414
|
+
list(APPEND GEA_EMBEDDED_RTC_SOURCES "${GEA_HOST}/host/rtc_esp.cpp")
|
|
415
|
+
list(APPEND GEA_EMBEDDED_NETWORK_REQUIRES
|
|
416
|
+
lwip esp_wifi esp_http_server esp_http_client esp-tls app_update esp_netif esp_event)
|
|
417
|
+
else()
|
|
418
|
+
list(APPEND GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS
|
|
419
|
+
GEA_EMBEDDED_WIFI_DISABLED=1
|
|
420
|
+
GEA_EMBEDDED_NETWORK_SERVICES_DISABLED=1
|
|
421
|
+
GEA_EMBEDDED_OTA_DISABLED=1)
|
|
422
|
+
endif()
|
|
423
|
+
|
|
424
|
+
set(GEA_EMBEDDED_BLE_SOURCES "")
|
|
425
|
+
set(GEA_EMBEDDED_BLE_REQUIRES "")
|
|
426
|
+
if(GEA_EMBEDDED_CAPABILITY_BLE)
|
|
427
|
+
list(APPEND GEA_EMBEDDED_BLE_SOURCES
|
|
428
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/connectivity/ble_hid.cpp")
|
|
429
|
+
list(APPEND GEA_EMBEDDED_BLE_REQUIRES bt)
|
|
430
|
+
list(APPEND GEA_EMBEDDED_BLE_COMPILE_DEFINITIONS GEA_EMBEDDED_APP_USES_BLE=1)
|
|
431
|
+
else()
|
|
432
|
+
list(APPEND GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS GEA_EMBEDDED_BLE_DISABLED=1)
|
|
433
|
+
endif()
|
|
434
|
+
|
|
435
|
+
set(GEA_EMBEDDED_AUDIO_SOURCES "")
|
|
436
|
+
set(GEA_EMBEDDED_AUDIO_REQUIRES "")
|
|
437
|
+
if(GEA_EMBEDDED_CAPABILITY_AUDIO)
|
|
438
|
+
list(APPEND GEA_EMBEDDED_AUDIO_SOURCES
|
|
439
|
+
"${GEA_EMBEDDED_TARGET_AUDIO_SOURCE}"
|
|
440
|
+
"${GEA_EMBEDDED_TARGET_AUDIO_RUNTIME_SOURCE}")
|
|
441
|
+
list(APPEND GEA_EMBEDDED_AUDIO_REQUIRES esp_driver_i2s esp_codec_dev)
|
|
442
|
+
list(APPEND GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS GEA_EMBEDDED_APP_USES_AUDIO=1)
|
|
443
|
+
else()
|
|
444
|
+
# Framework surfaces (HTMLAudioElement, sound attributes, device control)
|
|
445
|
+
# reference the AudioSystem backend unconditionally; satisfy those symbols
|
|
446
|
+
# with no-op stubs when the app carries no audio capability.
|
|
447
|
+
list(APPEND GEA_EMBEDDED_AUDIO_SOURCES
|
|
448
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/audio_runtime_stub.cpp")
|
|
449
|
+
list(APPEND GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS GEA_EMBEDDED_AUDIO_UNUSED=1)
|
|
450
|
+
endif()
|
|
451
|
+
|
|
452
|
+
message(STATUS "Gea app capabilities: network=${GEA_EMBEDDED_CAPABILITY_NETWORK} ble=${GEA_EMBEDDED_CAPABILITY_BLE} audio=${GEA_EMBEDDED_CAPABILITY_AUDIO}")
|
|
453
|
+
|
|
454
|
+
# `_GEA_EMBEDDED_HOST_FEATURES` is populated by `geatsc analyze` for the
|
|
455
|
+
# application.
|
|
456
|
+
#
|
|
457
|
+
# The user-facing `GEA_EMBEDDED_HTTPS_SUPPORT` cache option lets the build
|
|
458
|
+
# override auto-detection: `on` forces HTTPS linkage even when no
|
|
459
|
+
# `https://` URL appears in source, `off` skips it even when one does.
|
|
460
|
+
# `auto` (default) trusts analyze's verdict.
|
|
461
|
+
string(TOLOWER "${GEA_EMBEDDED_HTTPS_SUPPORT}" _GEA_EMBEDDED_HTTPS_SUPPORT_MODE)
|
|
462
|
+
set(_GEA_EMBEDDED_ENABLE_HTTPS 0)
|
|
463
|
+
if(_GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "auto")
|
|
464
|
+
if("${_GEA_EMBEDDED_HOST_FEATURES}" MATCHES "(^|;)https($|;)")
|
|
465
|
+
set(_GEA_EMBEDDED_ENABLE_HTTPS 1)
|
|
466
|
+
endif()
|
|
467
|
+
elseif(_GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "on"
|
|
468
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "true"
|
|
469
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "yes"
|
|
470
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "1")
|
|
471
|
+
set(_GEA_EMBEDDED_ENABLE_HTTPS 1)
|
|
472
|
+
elseif(_GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "off"
|
|
473
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "false"
|
|
474
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "no"
|
|
475
|
+
OR _GEA_EMBEDDED_HTTPS_SUPPORT_MODE STREQUAL "0")
|
|
476
|
+
set(_GEA_EMBEDDED_ENABLE_HTTPS 0)
|
|
477
|
+
else()
|
|
478
|
+
message(FATAL_ERROR "GEA_EMBEDDED_HTTPS_SUPPORT must be auto, on, or off")
|
|
479
|
+
endif()
|
|
480
|
+
|
|
481
|
+
if(_GEA_EMBEDDED_ENABLE_HTTPS)
|
|
482
|
+
list(APPEND GEA_EMBEDDED_HTTPS_COMPILE_DEFINITIONS GEA_EMBEDDED_ENABLE_HTTPS=1)
|
|
483
|
+
# `mbedtls` lands in REQUIRES iff the active app actually needs HTTPS.
|
|
484
|
+
# The historical reason for unconditionally listing it (script-mode
|
|
485
|
+
# discrepancy with `GEA_EMBEDDED_APP=tic-tac-toe`) is gone now that
|
|
486
|
+
# script-mode falls through to a feature-rich gea placeholder. The
|
|
487
|
+
# condition here is the actual signal: an app with no https:// in source
|
|
488
|
+
# genuinely doesn't need mbedtls, and `--gc-sections` would strip it
|
|
489
|
+
# anyway.
|
|
490
|
+
list(APPEND GEA_EMBEDDED_HTTPS_REQUIRES mbedtls)
|
|
491
|
+
endif()
|
|
492
|
+
|
|
493
|
+
idf_component_register(
|
|
494
|
+
SRCS
|
|
495
|
+
"app_main.cpp"
|
|
496
|
+
"buttons.cpp"
|
|
497
|
+
"display.cpp"
|
|
498
|
+
"i2c.cpp"
|
|
499
|
+
"${GEA_EMBEDDED_TARGET_IMU_SOURCE}"
|
|
500
|
+
"launcher_button.cpp"
|
|
501
|
+
"power.cpp"
|
|
502
|
+
"sdcard_mount.cpp"
|
|
503
|
+
"touch.cpp"
|
|
504
|
+
${GEA_EMBEDDED_AUDIO_SOURCES}
|
|
505
|
+
${GEA_EMBEDDED_TARGET_EXTRA_SOURCES}
|
|
506
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/apps/app_manager.cpp"
|
|
507
|
+
${GEA_EMBEDDED_NETWORK_SOURCES}
|
|
508
|
+
# @geastack framework C/C++ sources — single source of truth: @geastack/core/gea_sources.sh
|
|
509
|
+
# (resolved via node_modules, shared with the web build).
|
|
510
|
+
${GEA_FW_APP_SENSITIVE_SOURCES}
|
|
511
|
+
# esp32-specific host shims (generic host + services come from the manifest):
|
|
512
|
+
${GEA_EMBEDDED_RTC_SOURCES}
|
|
513
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/app_runner.cpp"
|
|
514
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/app_state.cpp"
|
|
515
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/battery_service.cpp"
|
|
516
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/device_control.cpp"
|
|
517
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/frame_scheduler.cpp"
|
|
518
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/memory.cpp"
|
|
519
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/storage_service.cpp"
|
|
520
|
+
${GEA_EMBEDDED_BLE_SOURCES}
|
|
521
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32/services/heap.cpp"
|
|
522
|
+
${APP_GENERATED_SOURCES}
|
|
523
|
+
INCLUDE_DIRS
|
|
524
|
+
"${GEA_EMBEDDED_TARGET_MAIN_DIR}/include"
|
|
525
|
+
"${GEA_EMBEDDED_ROOT}/targets/esp32"
|
|
526
|
+
${GEA_FW_INCLUDE_DIRS}
|
|
527
|
+
"${GEA_CHIPS}"
|
|
528
|
+
${GEA_EMBEDDED_APP_NATIVE_INCLUDE_DIRS}
|
|
529
|
+
${GENERATED_APP_DIR}
|
|
530
|
+
${CMAKE_BINARY_DIR}
|
|
531
|
+
REQUIRES
|
|
532
|
+
gea_framework
|
|
533
|
+
esp_system
|
|
534
|
+
# app_manager reads the running image descriptor independently of OTA.
|
|
535
|
+
esp_app_format
|
|
536
|
+
esp_timer
|
|
537
|
+
freertos
|
|
538
|
+
${GEA_EMBEDDED_NETWORK_REQUIRES}
|
|
539
|
+
${GEA_EMBEDDED_HTTPS_REQUIRES}
|
|
540
|
+
esp_mm
|
|
541
|
+
nvs_flash
|
|
542
|
+
esp_lcd
|
|
543
|
+
driver
|
|
544
|
+
esp_driver_i2c
|
|
545
|
+
esp_driver_usb_serial_jtag
|
|
546
|
+
esp_driver_sdmmc
|
|
547
|
+
sdmmc
|
|
548
|
+
fatfs
|
|
549
|
+
${GEA_EMBEDDED_AUDIO_REQUIRES}
|
|
550
|
+
${GEA_EMBEDDED_TARGET_EXTRA_REQUIRES}
|
|
551
|
+
${GEA_EMBEDDED_BLE_REQUIRES}
|
|
552
|
+
LDFRAGMENTS
|
|
553
|
+
${GEA_EMBEDDED_TARGET_LDFRAGMENTS}
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
if(TARGET idf::fatfs)
|
|
557
|
+
idf_component_get_property(_GEA_FATFS_LIB fatfs COMPONENT_LIB)
|
|
558
|
+
target_compile_options(${_GEA_FATFS_LIB} PRIVATE
|
|
559
|
+
"SHELL:-include ${CMAKE_CURRENT_LIST_DIR}/fatfs_ffconf.h")
|
|
560
|
+
endif()
|
|
561
|
+
|
|
562
|
+
set(GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG_VALUE 0)
|
|
563
|
+
if(DEFINED ENV{GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG})
|
|
564
|
+
set(GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG_VALUE "$ENV{GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG}")
|
|
565
|
+
endif()
|
|
566
|
+
|
|
567
|
+
target_compile_definitions(${COMPONENT_LIB} PRIVATE
|
|
568
|
+
GEA_EMBEDDED_DISPLAY_WIDTH=${GEA_EMBEDDED_TARGET_DISPLAY_WIDTH}
|
|
569
|
+
GEA_EMBEDDED_DISPLAY_HEIGHT=${GEA_EMBEDDED_TARGET_DISPLAY_HEIGHT}
|
|
570
|
+
GEA_EMBEDDED_DISPLAY_NATIVE_WIDTH=${GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_WIDTH}
|
|
571
|
+
GEA_EMBEDDED_DISPLAY_NATIVE_HEIGHT=${GEA_EMBEDDED_TARGET_DISPLAY_NATIVE_HEIGHT}
|
|
572
|
+
GEA_EMBEDDED_FLUSH_ANCHOR_LEFT_PARTIAL_RECTS=0
|
|
573
|
+
GEA_EMBEDDED_PIXEL_PANEL_ENDIAN=${GEA_EMBEDDED_TARGET_PIXEL_PANEL_ENDIAN}
|
|
574
|
+
# 1-bit panels (epaper family default): stylesheets can theme via
|
|
575
|
+
# `@media (monochrome)`. Color boards reusing this definition set 0.
|
|
576
|
+
GEA_EMBEDDED_DISPLAY_MONOCHROME=${GEA_EMBEDDED_TARGET_DISPLAY_MONOCHROME}
|
|
577
|
+
# Board id as a C string for app native sources (e.g. the diagnostics
|
|
578
|
+
# deviceInfo facade keys its capability catalog off deviceId()). Without this
|
|
579
|
+
# the facade's #ifndef fallback returns "unknown" and every subsystem shows
|
|
580
|
+
# up absent/N/A.
|
|
581
|
+
GEA_EMBEDDED_CPP_BOARD=\"${GEA_EMBEDDED_CPP_BOARD}\"
|
|
582
|
+
GEA_CPP_ENABLE_REGEX=0
|
|
583
|
+
GEA_CPP_USE_TO_CHARS_DOUBLE=0
|
|
584
|
+
GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG=${GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG_VALUE}
|
|
585
|
+
GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO=${GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO}
|
|
586
|
+
GEA_EMBEDDED_HAS_GENERATED_FONTS=1
|
|
587
|
+
GEA_EMBEDDED_APP_FRAME_TASK_CORE=0
|
|
588
|
+
GEA_EMBEDDED_FRAME_SCHEDULER_DROP_CATCHUP_FRAMES=0
|
|
589
|
+
GEA_EMBEDDED_APP_FRAME_TASK_PRIORITY=23
|
|
590
|
+
${GEA_EMBEDDED_TARGET_COMPILE_DEFINITIONS}
|
|
591
|
+
${GEA_EMBEDDED_CAPABILITY_COMPILE_DEFINITIONS}
|
|
592
|
+
${GEA_EMBEDDED_BLE_COMPILE_DEFINITIONS}
|
|
593
|
+
${GEA_EMBEDDED_HTTPS_COMPILE_DEFINITIONS}
|
|
594
|
+
)
|
|
595
|
+
|
|
596
|
+
# Production lockdown: gated by CONFIG_GEA_EMBEDDED_PRODUCTION_LOCKDOWN (sdkconfig.defaults).
|
|
597
|
+
# When enabled, adds defines that compile out perf/heap logs and disable diagnostics server.
|
|
598
|
+
if(CONFIG_GEA_EMBEDDED_PRODUCTION_LOCKDOWN)
|
|
599
|
+
target_compile_definitions(${COMPONENT_LIB} PRIVATE
|
|
600
|
+
GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG=0
|
|
601
|
+
GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG=0
|
|
602
|
+
GEA_FRAME_PERF_LOG=0
|
|
603
|
+
GEA_EMBEDDED_DIAGNOSTICS_DISABLED=1
|
|
604
|
+
)
|
|
605
|
+
endif()
|
|
606
|
+
|
|
607
|
+
target_compile_options(${COMPONENT_LIB} PRIVATE
|
|
608
|
+
${GEA_XTENSA_LITERALS} # -mtext-section-literals on xtensa, empty on riscv (gea_framework.cmake)
|
|
609
|
+
-Wno-unused-parameter
|
|
610
|
+
-Wno-sign-compare
|
|
611
|
+
-Wno-missing-field-initializers
|
|
612
|
+
-Wno-implicit-fallthrough
|
|
613
|
+
$<$<COMPILE_LANGUAGE:C>:-Wno-old-style-declaration>
|
|
614
|
+
-Wno-misleading-indentation
|
|
615
|
+
-Wno-type-limits
|
|
616
|
+
-Wno-maybe-uninitialized
|
|
617
|
+
-Wno-calloc-transposed-args
|
|
618
|
+
-Wno-unused-function
|
|
619
|
+
-Wno-clobbered
|
|
620
|
+
)
|
|
621
|
+
|
|
622
|
+
# --- App compilation: vite-plugin-gea -> geatsc ---
|
|
623
|
+
|
|
624
|
+
_gea_collect_app_sources(_ACTIVE_APP_SRCS "${GEA_EMBEDDED_APP_DIR}")
|
|
625
|
+
_gea_collect_app_assets(_ACTIVE_APP_ASSETS "${GEA_EMBEDDED_APP_DIR}")
|
|
626
|
+
# The Gea compiler emits JS and IR, then geatsc emits C++. We use a stamp file as
|
|
627
|
+
# the canonical OUTPUT because geatsc now writes a source manifest plus multiple
|
|
628
|
+
# translation units. The generated archive consumes geatsc-sources.txt after this
|
|
629
|
+
# command has completed.
|
|
630
|
+
set(_GEATSC_BIN "${GEA_COMPILER}/dist/cli.js")
|
|
631
|
+
set(_GEATSC_BUILD_STAMP "${GENERATED_APP_DIR}/geatsc_build.stamp")
|
|
632
|
+
set(_GEA_VITE_GEATSC_SCRIPT "${GEA_CORE}/scripts/build-gea-vite-geatsc.mjs")
|
|
633
|
+
file(GLOB_RECURSE _GEATSC_DIST_SRCS CONFIGURE_DEPENDS
|
|
634
|
+
"${GEA_COMPILER}/dist/*.js"
|
|
635
|
+
"${GEA_COMPILER}/dist/targets/cpp/runtime/*.cpp"
|
|
636
|
+
"${GEA_PLUGIN}/dist/*.js"
|
|
637
|
+
)
|
|
638
|
+
add_custom_command(
|
|
639
|
+
OUTPUT ${_GEATSC_BUILD_STAMP}
|
|
640
|
+
COMMAND node ${_GEA_VITE_GEATSC_SCRIPT}
|
|
641
|
+
--app-dir ${GEA_EMBEDDED_APP_DIR}
|
|
642
|
+
--entry ${GEA_EMBEDDED_APP_ENTRY}
|
|
643
|
+
--cpp-board "${GEA_EMBEDDED_CPP_BOARD}"
|
|
644
|
+
--out-dir ${GENERATED_APP_DIR}
|
|
645
|
+
--geatsc-bin ${_GEATSC_BIN}
|
|
646
|
+
--geatsc-gea-plugin "${GEA_PLUGIN}/dist/index.js"
|
|
647
|
+
--font-device-pixel-ratio ${GEA_EMBEDDED_CSS_DEVICE_PIXEL_RATIO}
|
|
648
|
+
--pixel-panel-endian ${GEA_EMBEDDED_TARGET_PIXEL_PANEL_ENDIAN}
|
|
649
|
+
--gea-ir-backend
|
|
650
|
+
# gea.compilerPlugins: an app's own geatsc plugins, e.g. the one that
|
|
651
|
+
# declares its native host-function boundary. Empty for most apps.
|
|
652
|
+
${GEA_EMBEDDED_APP_GEATSC_PLUGIN_ARGS}
|
|
653
|
+
COMMAND ${CMAKE_COMMAND} -E touch ${_GEATSC_BUILD_STAMP}
|
|
654
|
+
DEPENDS
|
|
655
|
+
${GEA_EMBEDDED_APP_GEATSC_PLUGINS}
|
|
656
|
+
${_ACTIVE_APP_SRCS}
|
|
657
|
+
${_ACTIVE_APP_ASSETS}
|
|
658
|
+
${_GEATSC_BIN}
|
|
659
|
+
${_GEATSC_DIST_SRCS}
|
|
660
|
+
${_GEA_COMPILER_DEP_SRCS}
|
|
661
|
+
${_GEA_FONT_ASSETS}
|
|
662
|
+
BYPRODUCTS
|
|
663
|
+
"${GEATSC_SOURCE_LIST}"
|
|
664
|
+
"${GENERATED_APP_DIR}/entry.cpp"
|
|
665
|
+
"${GENERATED_APP_DIR}/generated_support.hpp"
|
|
666
|
+
"${GENERATED_APP_DIR}/runtime.cpp"
|
|
667
|
+
"${GENERATED_APP_DIR}/runtime_pch.h"
|
|
668
|
+
${GENERATED_CONFIG_H}
|
|
669
|
+
${GENERATED_FONT_CPP}
|
|
670
|
+
${GENERATED_FONT_H}
|
|
671
|
+
${GENERATED_ASSETS_CPP}
|
|
672
|
+
"${GENERATED_APP_DIR}/gea-vite-bundle.js"
|
|
673
|
+
COMMENT "Compiling ${GEA_EMBEDDED_APP}: TSX -> JS via vite-plugin-gea -> C++ via geatsc"
|
|
674
|
+
VERBATIM
|
|
675
|
+
)
|
|
676
|
+
# The generated archive already depends on the stamp. Keeping this helper
|
|
677
|
+
# target out of ALL prevents Make from launching two copies of Vite/geatsc
|
|
678
|
+
# against the same output directory when both branches are scheduled in
|
|
679
|
+
# parallel.
|
|
680
|
+
add_custom_target(geatsc_build DEPENDS ${_GEATSC_BUILD_STAMP})
|
|
681
|
+
gea_geatsc_add_generated_archive(
|
|
682
|
+
TARGET ${COMPONENT_LIB}
|
|
683
|
+
NAME geatsc_active_archive
|
|
684
|
+
SOURCE_LIST "${GEATSC_SOURCE_LIST}"
|
|
685
|
+
OUTPUT "${GEATSC_ARCHIVE}"
|
|
686
|
+
DEPENDS ${_GEATSC_BUILD_STAMP}
|
|
687
|
+
COMPILE_OPTIONS ${GEATSC_COMPILE_OPTIONS}
|
|
688
|
+
COMPILE_DEFINITIONS ${GEATSC_COMPILE_DEFINITIONS}
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
gea_framework_inherit_build_settings()
|