@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.
Files changed (348) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +83 -0
  3. package/package.json +50 -0
  4. package/targets/cmake/geatsc-generated-archive-build.mjs +614 -0
  5. package/targets/cmake/geatsc_generated_archive.cmake +116 -0
  6. package/targets/cmake/geatsc_generated_archive_build.cmake +50 -0
  7. package/targets/esp32/app_project.cmake +33 -0
  8. package/targets/esp32/apps/app_manager.cpp +188 -0
  9. package/targets/esp32/apps/app_manager.h +10 -0
  10. package/targets/esp32/chip_bindings/README.md +58 -0
  11. package/targets/esp32/chip_bindings/audio/es8311.cpp +556 -0
  12. package/targets/esp32/chip_bindings/displays/co5300.cpp +510 -0
  13. package/targets/esp32/chip_bindings/displays/co5300.h +47 -0
  14. package/targets/esp32/chip_bindings/displays/co5300_async_stream.inc +79 -0
  15. package/targets/esp32/chip_bindings/displays/qspi_panel.h +65 -0
  16. package/targets/esp32/chip_bindings/displays/sh8601.cpp +583 -0
  17. package/targets/esp32/chip_bindings/displays/sh8601.h +36 -0
  18. package/targets/esp32/chip_bindings/gps/lc76g.cpp +296 -0
  19. package/targets/esp32/chip_bindings/gps/lc76g.h +7 -0
  20. package/targets/esp32/chip_bindings/imu/bmi270.cpp +299 -0
  21. package/targets/esp32/chip_bindings/imu/bmi270_config.inl +439 -0
  22. package/targets/esp32/chip_bindings/imu/qmi8658.cpp +213 -0
  23. package/targets/esp32/chip_bindings/power/axp2101.cpp +185 -0
  24. package/targets/esp32/chip_bindings/touch/cst9217.cpp +229 -0
  25. package/targets/esp32/chip_bindings/touch/cst9217_controller.h +78 -0
  26. package/targets/esp32/chip_bindings/touch/ft3168.cpp +340 -0
  27. package/targets/esp32/chip_bindings/touch/ft3168_controller.h +103 -0
  28. package/targets/esp32/chip_bindings/touch/ft6336.cpp +310 -0
  29. package/targets/esp32/chip_bindings/touch/ft6336_controller.h +90 -0
  30. package/targets/esp32/components/gea_framework/CMakeLists.txt +62 -0
  31. package/targets/esp32/connectivity/ble_hid.cpp +2916 -0
  32. package/targets/esp32/connectivity/ble_hid.h +8 -0
  33. package/targets/esp32/connectivity/diagnostics_transport.cpp +523 -0
  34. package/targets/esp32/connectivity/diagnostics_transport_offline.cpp +108 -0
  35. package/targets/esp32/connectivity/wifi.cpp +615 -0
  36. package/targets/esp32/connectivity/wifi_debug_offline.cpp +37 -0
  37. package/targets/esp32/connectivity/wifi_task_stack.h +119 -0
  38. package/targets/esp32/display.cpp +6010 -0
  39. package/targets/esp32/display_headless.cpp +468 -0
  40. package/targets/esp32/gea/platform_random.h +11 -0
  41. package/targets/esp32/gea_framework.cmake +382 -0
  42. package/targets/esp32/gpio.cpp +229 -0
  43. package/targets/esp32/host_sources.cmake +35 -0
  44. package/targets/esp32/imu_absent.cpp +36 -0
  45. package/targets/esp32/ldfragments/gea_ui_state_external.lf +35 -0
  46. package/targets/esp32/memory_config.h +64 -0
  47. package/targets/esp32/power_absent.cpp +22 -0
  48. package/targets/esp32/sdk-patches/0001-esp_ptr_dma_capable-accept-PSRAM.patch +70 -0
  49. package/targets/esp32/sdk-patches/0002-gdma-access_ext_mem-spi_master.patch +59 -0
  50. package/targets/esp32/sdk-patches/README.md +127 -0
  51. package/targets/esp32/services/app_runner.cpp +248 -0
  52. package/targets/esp32/services/app_state.cpp +56 -0
  53. package/targets/esp32/services/audio_runtime_stub.cpp +86 -0
  54. package/targets/esp32/services/battery_service.cpp +31 -0
  55. package/targets/esp32/services/device_control.cpp +1896 -0
  56. package/targets/esp32/services/device_control.h +31 -0
  57. package/targets/esp32/services/frame_scheduler.cpp +1571 -0
  58. package/targets/esp32/services/heap.cpp +129 -0
  59. package/targets/esp32/services/memory.cpp +103 -0
  60. package/targets/esp32/services/ota.cpp +840 -0
  61. package/targets/esp32/services/ota_image.cpp +162 -0
  62. package/targets/esp32/services/ota_image.h +16 -0
  63. package/targets/esp32/services/storage_service.cpp +159 -0
  64. package/targets/esp32/touch_absent.cpp +44 -0
  65. package/targets/esp32-m5stack-m5paper/CMakeLists.txt +10 -0
  66. package/targets/esp32-m5stack-m5paper/README.md +55 -0
  67. package/targets/esp32-m5stack-m5paper/dependencies.lock +76 -0
  68. package/targets/esp32-m5stack-m5paper/main/CMakeLists.txt +46 -0
  69. package/targets/esp32-m5stack-m5paper/main/Kconfig.projbuild +10 -0
  70. package/targets/esp32-m5stack-m5paper/main/app_main.cpp +114 -0
  71. package/targets/esp32-m5stack-m5paper/main/audio_stub.cpp +27 -0
  72. package/targets/esp32-m5stack-m5paper/main/buttons.cpp +111 -0
  73. package/targets/esp32-m5stack-m5paper/main/display.cpp +1074 -0
  74. package/targets/esp32-m5stack-m5paper/main/i2c.cpp +36 -0
  75. package/targets/esp32-m5stack-m5paper/main/idf_component.yml +7 -0
  76. package/targets/esp32-m5stack-m5paper/main/imu_stub.cpp +20 -0
  77. package/targets/esp32-m5stack-m5paper/main/include/board.h +100 -0
  78. package/targets/esp32-m5stack-m5paper/main/include/buttons.h +8 -0
  79. package/targets/esp32-m5stack-m5paper/main/launcher_button.cpp +82 -0
  80. package/targets/esp32-m5stack-m5paper/main/m5paper_psram.lf +20 -0
  81. package/targets/esp32-m5stack-m5paper/main/power.cpp +73 -0
  82. package/targets/esp32-m5stack-m5paper/main/sdcard_mount.cpp +82 -0
  83. package/targets/esp32-m5stack-m5paper/main/touch.cpp +279 -0
  84. package/targets/esp32-m5stack-m5paper/partitions.csv +9 -0
  85. package/targets/esp32-m5stack-m5paper/sdkconfig.defaults +84 -0
  86. package/targets/esp32-p4-m5stack-tab5/CMakeLists.txt +10 -0
  87. package/targets/esp32-p4-m5stack-tab5/dependencies.lock +276 -0
  88. package/targets/esp32-p4-m5stack-tab5/main/CMakeLists.txt +586 -0
  89. package/targets/esp32-p4-m5stack-tab5/main/Kconfig.projbuild +12 -0
  90. package/targets/esp32-p4-m5stack-tab5/main/app_main.cpp +177 -0
  91. package/targets/esp32-p4-m5stack-tab5/main/camera.cpp +2025 -0
  92. package/targets/esp32-p4-m5stack-tab5/main/display.cpp +4033 -0
  93. package/targets/esp32-p4-m5stack-tab5/main/fatfs_ffconf.h +383 -0
  94. package/targets/esp32-p4-m5stack-tab5/main/i2c.cpp +39 -0
  95. package/targets/esp32-p4-m5stack-tab5/main/idf_component.yml +21 -0
  96. package/targets/esp32-p4-m5stack-tab5/main/include/board.h +130 -0
  97. package/targets/esp32-p4-m5stack-tab5/main/include/tab5_drivers.h +68 -0
  98. package/targets/esp32-p4-m5stack-tab5/main/include/wifi_config.h.example +5 -0
  99. package/targets/esp32-p4-m5stack-tab5/main/launcher_button.cpp +188 -0
  100. package/targets/esp32-p4-m5stack-tab5/main/power.cpp +22 -0
  101. package/targets/esp32-p4-m5stack-tab5/main/sdcard_mount.cpp +125 -0
  102. package/targets/esp32-p4-m5stack-tab5/main/tab5_audio.cpp +345 -0
  103. package/targets/esp32-p4-m5stack-tab5/main/tab5_drivers.cpp +871 -0
  104. package/targets/esp32-p4-m5stack-tab5/main/tab5_imu.cpp +246 -0
  105. package/targets/esp32-p4-m5stack-tab5/main/touch.cpp +206 -0
  106. package/targets/esp32-p4-m5stack-tab5/partitions.csv +12 -0
  107. package/targets/esp32-p4-m5stack-tab5/sdkconfig.defaults +128 -0
  108. package/targets/esp32-p4-waveshare-touch-lcd-3.5/CMakeLists.txt +19 -0
  109. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/0001-esp_video-csi-raw-passthrough-p4-rev-lt-v3.patch +28 -0
  110. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/README.md +45 -0
  111. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/apply.sh +37 -0
  112. package/targets/esp32-p4-waveshare-touch-lcd-3.5/dependencies.lock +196 -0
  113. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/CMakeLists.txt +562 -0
  114. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/Kconfig.projbuild +12 -0
  115. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/app_main.cpp +166 -0
  116. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/camera.cpp +2105 -0
  117. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/display.cpp +1730 -0
  118. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/fatfs_ffconf.h +383 -0
  119. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/i2c.cpp +39 -0
  120. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/idf_component.yml +11 -0
  121. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/board.h +87 -0
  122. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/panel_native.h +59 -0
  123. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/wifi_config.h.example +5 -0
  124. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/launcher_button.cpp +191 -0
  125. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/power.cpp +15 -0
  126. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/touch.cpp +306 -0
  127. package/targets/esp32-p4-waveshare-touch-lcd-3.5/partitions.csv +13 -0
  128. package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/README.md +22 -0
  129. package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/espressif__esp_video-csi-bypass.patch +28 -0
  130. package/targets/esp32-p4-waveshare-touch-lcd-3.5/sdkconfig.defaults +109 -0
  131. package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/README-camera-capture.md +84 -0
  132. package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/capture-camera.py +369 -0
  133. package/targets/esp32-p4-waveshare-touch-lcd-7/CMakeLists.txt +10 -0
  134. package/targets/esp32-p4-waveshare-touch-lcd-7/dependencies.lock +258 -0
  135. package/targets/esp32-p4-waveshare-touch-lcd-7/main/CMakeLists.txt +577 -0
  136. package/targets/esp32-p4-waveshare-touch-lcd-7/main/Kconfig.projbuild +12 -0
  137. package/targets/esp32-p4-waveshare-touch-lcd-7/main/app_main.cpp +177 -0
  138. package/targets/esp32-p4-waveshare-touch-lcd-7/main/camera.cpp +1935 -0
  139. package/targets/esp32-p4-waveshare-touch-lcd-7/main/display.cpp +2832 -0
  140. package/targets/esp32-p4-waveshare-touch-lcd-7/main/fatfs_ffconf.h +383 -0
  141. package/targets/esp32-p4-waveshare-touch-lcd-7/main/i2c.cpp +39 -0
  142. package/targets/esp32-p4-waveshare-touch-lcd-7/main/idf_component.yml +23 -0
  143. package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/board.h +68 -0
  144. package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/wifi_config.h.example +5 -0
  145. package/targets/esp32-p4-waveshare-touch-lcd-7/main/launcher_button.cpp +191 -0
  146. package/targets/esp32-p4-waveshare-touch-lcd-7/main/power.cpp +15 -0
  147. package/targets/esp32-p4-waveshare-touch-lcd-7/main/sdcard_mount.cpp +125 -0
  148. package/targets/esp32-p4-waveshare-touch-lcd-7/main/touch.cpp +332 -0
  149. package/targets/esp32-p4-waveshare-touch-lcd-7/partitions.csv +12 -0
  150. package/targets/esp32-p4-waveshare-touch-lcd-7/sdkconfig.defaults +122 -0
  151. package/targets/esp32-p4-waveshare-touch-lcd-7/tools/README-camera-capture.md +84 -0
  152. package/targets/esp32-p4-waveshare-touch-lcd-7/tools/capture-camera.py +369 -0
  153. package/targets/esp32-s3-devkit-n16r8.json +31 -0
  154. package/targets/esp32-s3-elecrow-rotary-2.1/CMakeLists.txt +10 -0
  155. package/targets/esp32-s3-elecrow-rotary-2.1/dependencies.lock +40 -0
  156. package/targets/esp32-s3-elecrow-rotary-2.1/main/CMakeLists.txt +549 -0
  157. package/targets/esp32-s3-elecrow-rotary-2.1/main/Kconfig.projbuild +12 -0
  158. package/targets/esp32-s3-elecrow-rotary-2.1/main/app_main.cpp +187 -0
  159. package/targets/esp32-s3-elecrow-rotary-2.1/main/display_rgb.cpp +1338 -0
  160. package/targets/esp32-s3-elecrow-rotary-2.1/main/i2c.cpp +39 -0
  161. package/targets/esp32-s3-elecrow-rotary-2.1/main/idf_component.yml +5 -0
  162. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/board.h +142 -0
  163. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/pcf8574.h +16 -0
  164. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/rotary_encoder.h +7 -0
  165. package/targets/esp32-s3-elecrow-rotary-2.1/main/launcher_button.cpp +191 -0
  166. package/targets/esp32-s3-elecrow-rotary-2.1/main/pcf8574.cpp +86 -0
  167. package/targets/esp32-s3-elecrow-rotary-2.1/main/platform_stubs.cpp +47 -0
  168. package/targets/esp32-s3-elecrow-rotary-2.1/main/rotary_encoder.cpp +135 -0
  169. package/targets/esp32-s3-elecrow-rotary-2.1/main/touch.cpp +250 -0
  170. package/targets/esp32-s3-elecrow-rotary-2.1/partitions.csv +8 -0
  171. package/targets/esp32-s3-elecrow-rotary-2.1/sdkconfig.defaults +116 -0
  172. package/targets/esp32-s3-epaper-1.54/CMakeLists.txt +10 -0
  173. package/targets/esp32-s3-epaper-1.54/dependencies.lock +76 -0
  174. package/targets/esp32-s3-epaper-1.54/main/CMakeLists.txt +691 -0
  175. package/targets/esp32-s3-epaper-1.54/main/Kconfig.projbuild +12 -0
  176. package/targets/esp32-s3-epaper-1.54/main/app_main.cpp +181 -0
  177. package/targets/esp32-s3-epaper-1.54/main/buttons.cpp +144 -0
  178. package/targets/esp32-s3-epaper-1.54/main/display.cpp +1281 -0
  179. package/targets/esp32-s3-epaper-1.54/main/fatfs_ffconf.h +377 -0
  180. package/targets/esp32-s3-epaper-1.54/main/i2c.cpp +39 -0
  181. package/targets/esp32-s3-epaper-1.54/main/idf_component.yml +7 -0
  182. package/targets/esp32-s3-epaper-1.54/main/imu_stub.cpp +21 -0
  183. package/targets/esp32-s3-epaper-1.54/main/include/board.h +119 -0
  184. package/targets/esp32-s3-epaper-1.54/main/include/buttons.h +9 -0
  185. package/targets/esp32-s3-epaper-1.54/main/include/wifi_config.h.example +5 -0
  186. package/targets/esp32-s3-epaper-1.54/main/launcher_button.cpp +191 -0
  187. package/targets/esp32-s3-epaper-1.54/main/power.cpp +15 -0
  188. package/targets/esp32-s3-epaper-1.54/main/sdcard_mount.cpp +89 -0
  189. package/targets/esp32-s3-epaper-1.54/main/touch.cpp +299 -0
  190. package/targets/esp32-s3-epaper-1.54/partitions.csv +8 -0
  191. package/targets/esp32-s3-epaper-1.54/sdkconfig.defaults +217 -0
  192. package/targets/esp32-s3-lilygo-t-display-s3-long/CMakeLists.txt +10 -0
  193. package/targets/esp32-s3-lilygo-t-display-s3-long/README.md +29 -0
  194. package/targets/esp32-s3-lilygo-t-display-s3-long/dependencies.lock +116 -0
  195. package/targets/esp32-s3-lilygo-t-display-s3-long/main/CMakeLists.txt +90 -0
  196. package/targets/esp32-s3-lilygo-t-display-s3-long/main/idf_component.yml +7 -0
  197. package/targets/esp32-s3-lilygo-t-display-s3-long/main/include/board.h +61 -0
  198. package/targets/esp32-s3-lilygo-t-display-s3-long/main/touch.cpp +299 -0
  199. package/targets/esp32-s3-lilygo-t-display-s3-long/partitions.csv +7 -0
  200. package/targets/esp32-s3-lilygo-t-display-s3-long/sdkconfig.defaults +50 -0
  201. package/targets/esp32-s3-lilygo-t5-epaper-4.7/CMakeLists.txt +12 -0
  202. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/CMakeLists.txt +17 -0
  203. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.c +269 -0
  204. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.h +142 -0
  205. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.c +1114 -0
  206. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.h +410 -0
  207. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/gea_epd.c +989 -0
  208. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.c +489 -0
  209. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.h +104 -0
  210. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.c +136 -0
  211. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.h +78 -0
  212. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/utilities.h +49 -0
  213. package/targets/esp32-s3-lilygo-t5-epaper-4.7/dependencies.lock +35 -0
  214. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/CMakeLists.txt +30 -0
  215. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/Kconfig.projbuild +10 -0
  216. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/app_main.cpp +95 -0
  217. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/audio_stub.cpp +27 -0
  218. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/buttons.cpp +40 -0
  219. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/display.cpp +627 -0
  220. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/i2c.cpp +36 -0
  221. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/idf_component.yml +4 -0
  222. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/imu_stub.cpp +20 -0
  223. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/board.h +85 -0
  224. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/buttons.h +8 -0
  225. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/launcher_button.cpp +82 -0
  226. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/power.cpp +36 -0
  227. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/sdcard_mount.cpp +90 -0
  228. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/touch.cpp +293 -0
  229. package/targets/esp32-s3-lilygo-t5-epaper-4.7/partitions.csv +9 -0
  230. package/targets/esp32-s3-lilygo-t5-epaper-4.7/sdkconfig.defaults +217 -0
  231. package/targets/esp32-s3-m5stack-papers3/CMakeLists.txt +13 -0
  232. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/CMakeLists.txt +5 -0
  233. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/include/papers3_epd.h +74 -0
  234. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/papers3_epd.c +671 -0
  235. package/targets/esp32-s3-m5stack-papers3/dependencies.lock +76 -0
  236. package/targets/esp32-s3-m5stack-papers3/main/CMakeLists.txt +64 -0
  237. package/targets/esp32-s3-m5stack-papers3/main/Kconfig.projbuild +10 -0
  238. package/targets/esp32-s3-m5stack-papers3/main/app_main.cpp +96 -0
  239. package/targets/esp32-s3-m5stack-papers3/main/audio_stub.cpp +27 -0
  240. package/targets/esp32-s3-m5stack-papers3/main/buttons.cpp +49 -0
  241. package/targets/esp32-s3-m5stack-papers3/main/display.cpp +706 -0
  242. package/targets/esp32-s3-m5stack-papers3/main/i2c.cpp +36 -0
  243. package/targets/esp32-s3-m5stack-papers3/main/idf_component.yml +14 -0
  244. package/targets/esp32-s3-m5stack-papers3/main/imu.cpp +351 -0
  245. package/targets/esp32-s3-m5stack-papers3/main/include/board.h +101 -0
  246. package/targets/esp32-s3-m5stack-papers3/main/include/buttons.h +8 -0
  247. package/targets/esp32-s3-m5stack-papers3/main/launcher_button.cpp +96 -0
  248. package/targets/esp32-s3-m5stack-papers3/main/power.cpp +102 -0
  249. package/targets/esp32-s3-m5stack-papers3/main/sdcard_mount.cpp +88 -0
  250. package/targets/esp32-s3-m5stack-papers3/main/touch.cpp +287 -0
  251. package/targets/esp32-s3-m5stack-papers3/partitions.csv +9 -0
  252. package/targets/esp32-s3-m5stack-papers3/sdkconfig.defaults +232 -0
  253. package/targets/esp32-s3-m5stack-sticks3/CMakeLists.txt +10 -0
  254. package/targets/esp32-s3-m5stack-sticks3/dependencies.lock +51 -0
  255. package/targets/esp32-s3-m5stack-sticks3/main/CMakeLists.txt +51 -0
  256. package/targets/esp32-s3-m5stack-sticks3/main/Kconfig.projbuild +12 -0
  257. package/targets/esp32-s3-m5stack-sticks3/main/app_main.cpp +130 -0
  258. package/targets/esp32-s3-m5stack-sticks3/main/buttons.cpp +101 -0
  259. package/targets/esp32-s3-m5stack-sticks3/main/display.cpp +1391 -0
  260. package/targets/esp32-s3-m5stack-sticks3/main/i2c.cpp +39 -0
  261. package/targets/esp32-s3-m5stack-sticks3/main/idf_component.yml +8 -0
  262. package/targets/esp32-s3-m5stack-sticks3/main/imu_stub.cpp +9 -0
  263. package/targets/esp32-s3-m5stack-sticks3/main/include/board.h +89 -0
  264. package/targets/esp32-s3-m5stack-sticks3/main/include/buttons.h +9 -0
  265. package/targets/esp32-s3-m5stack-sticks3/main/launcher_button.cpp +191 -0
  266. package/targets/esp32-s3-m5stack-sticks3/main/power.cpp +15 -0
  267. package/targets/esp32-s3-m5stack-sticks3/main/sdcard_mount.cpp +8 -0
  268. package/targets/esp32-s3-m5stack-sticks3/main/touch.cpp +65 -0
  269. package/targets/esp32-s3-m5stack-sticks3/partitions.csv +8 -0
  270. package/targets/esp32-s3-m5stack-sticks3/sdkconfig.defaults +130 -0
  271. package/targets/esp32-s3-touch-amoled-1.75/CMakeLists.txt +10 -0
  272. package/targets/esp32-s3-touch-amoled-1.75/dependencies.lock +130 -0
  273. package/targets/esp32-s3-touch-amoled-1.75/main/CMakeLists.txt +589 -0
  274. package/targets/esp32-s3-touch-amoled-1.75/main/Kconfig.projbuild +12 -0
  275. package/targets/esp32-s3-touch-amoled-1.75/main/app_main.cpp +153 -0
  276. package/targets/esp32-s3-touch-amoled-1.75/main/i2c.cpp +39 -0
  277. package/targets/esp32-s3-touch-amoled-1.75/main/idf_component.yml +9 -0
  278. package/targets/esp32-s3-touch-amoled-1.75/main/include/board.h +110 -0
  279. package/targets/esp32-s3-touch-amoled-1.75/main/include/wifi_config.h.example +5 -0
  280. package/targets/esp32-s3-touch-amoled-1.75/main/launcher_button.cpp +191 -0
  281. package/targets/esp32-s3-touch-amoled-1.75/main/touch.cpp +45 -0
  282. package/targets/esp32-s3-touch-amoled-1.75/partitions.csv +8 -0
  283. package/targets/esp32-s3-touch-amoled-1.75/sdkconfig.defaults +179 -0
  284. package/targets/esp32-s3-touch-amoled-1.8/CMakeLists.txt +10 -0
  285. package/targets/esp32-s3-touch-amoled-1.8/dependencies.lock +105 -0
  286. package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +768 -0
  287. package/targets/esp32-s3-touch-amoled-1.8/main/Kconfig.projbuild +12 -0
  288. package/targets/esp32-s3-touch-amoled-1.8/main/app_main.cpp +172 -0
  289. package/targets/esp32-s3-touch-amoled-1.8/main/i2c.cpp +39 -0
  290. package/targets/esp32-s3-touch-amoled-1.8/main/idf_component.yml +8 -0
  291. package/targets/esp32-s3-touch-amoled-1.8/main/include/board.h +83 -0
  292. package/targets/esp32-s3-touch-amoled-1.8/main/include/wifi_config.h.example +5 -0
  293. package/targets/esp32-s3-touch-amoled-1.8/main/launcher_button.cpp +191 -0
  294. package/targets/esp32-s3-touch-amoled-1.8/main/touch.cpp +41 -0
  295. package/targets/esp32-s3-touch-amoled-1.8/partitions.csv +8 -0
  296. package/targets/esp32-s3-touch-amoled-1.8/sdkconfig.defaults +179 -0
  297. package/targets/esp32-s3-touch-amoled-2.06/CMakeLists.txt +10 -0
  298. package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +64 -0
  299. package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +1121 -0
  300. package/targets/esp32-s3-touch-amoled-2.06/main/Kconfig.projbuild +12 -0
  301. package/targets/esp32-s3-touch-amoled-2.06/main/app_main.cpp +333 -0
  302. package/targets/esp32-s3-touch-amoled-2.06/main/i2c.cpp +39 -0
  303. package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +27 -0
  304. package/targets/esp32-s3-touch-amoled-2.06/main/include/board.h +114 -0
  305. package/targets/esp32-s3-touch-amoled-2.06/main/include/wifi_config.h.example +5 -0
  306. package/targets/esp32-s3-touch-amoled-2.06/main/launcher_button.cpp +199 -0
  307. package/targets/esp32-s3-touch-amoled-2.06/main/sdcard_mount.cpp +105 -0
  308. package/targets/esp32-s3-touch-amoled-2.06/main/touch.cpp +49 -0
  309. package/targets/esp32-s3-touch-amoled-2.06/partitions.csv +14 -0
  310. package/targets/esp32-s3-touch-amoled-2.06/sdkconfig.defaults +273 -0
  311. package/targets/esp32-s3-touch-amoled-2.41/CMakeLists.txt +10 -0
  312. package/targets/esp32-s3-touch-amoled-2.41/main/CMakeLists.txt +71 -0
  313. package/targets/esp32-s3-touch-amoled-2.41/main/Kconfig.projbuild +12 -0
  314. package/targets/esp32-s3-touch-amoled-2.41/main/idf_component.yml +27 -0
  315. package/targets/esp32-s3-touch-amoled-2.41/main/include/board.h +108 -0
  316. package/targets/esp32-s3-touch-amoled-2.41/main/include/wifi_config.h.example +5 -0
  317. package/targets/esp32-s3-touch-amoled-2.41/main/panel_reset.cpp +82 -0
  318. package/targets/esp32-s3-touch-amoled-2.41/main/touch.cpp +49 -0
  319. package/targets/esp32-s3-touch-amoled-2.41/partitions.csv +8 -0
  320. package/targets/esp32-s3-touch-amoled-2.41/sdkconfig.defaults +273 -0
  321. package/targets/rp2350-tufty-2350/CMakeLists.txt +348 -0
  322. package/targets/rp2350-tufty-2350/README.md +53 -0
  323. package/targets/rp2350-tufty-2350/boards/pimoroni_tufty2350.h +87 -0
  324. package/targets/rp2350-tufty-2350/main/bringup.cpp +187 -0
  325. package/targets/rp2350-tufty-2350/main/include/board.h +124 -0
  326. package/targets/rp2350-tufty-2350/main/rp2350_panel.cpp +428 -0
  327. package/targets/rp2350-tufty-2350/main/rp2350_panel.h +46 -0
  328. package/targets/rp2350-tufty-2350/main/st7789_parallel.pio +7 -0
  329. package/targets/rp2350-waveshare-touch-amoled-2.41/CMakeLists.txt +345 -0
  330. package/targets/rp2350-waveshare-touch-amoled-2.41/README.md +153 -0
  331. package/targets/rp2350-waveshare-touch-amoled-2.41/boards/waveshare_rp2350_touch_amoled_2_41.h +59 -0
  332. package/targets/rp2350-waveshare-touch-amoled-2.41/main/app.cpp +984 -0
  333. package/targets/rp2350-waveshare-touch-amoled-2.41/main/bringup.cpp +222 -0
  334. package/targets/rp2350-waveshare-touch-amoled-2.41/main/include/board.h +138 -0
  335. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.cpp +2553 -0
  336. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.h +18 -0
  337. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_host_fetch_stub.cpp +64 -0
  338. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.cpp +677 -0
  339. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.h +48 -0
  340. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.c +354 -0
  341. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.h +56 -0
  342. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.c +1284 -0
  343. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.h +95 -0
  344. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_block_functions.h +123 -0
  345. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_common.h +127 -0
  346. package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-bench.py +162 -0
  347. package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-parity.py +198 -0
  348. package/targets.json +154 -0
@@ -0,0 +1,12 @@
1
+ menu "Gea Embedded"
2
+
3
+ config GEA_EMBEDDED_PRODUCTION_LOCKDOWN
4
+ bool "Production lockdown"
5
+ default n
6
+ help
7
+ Compile out Gea frame/perf logs, heap diagnostics, and the
8
+ diagnostics server for production firmware. Local development builds
9
+ should leave this disabled so serial monitor and VS Code launch
10
+ tasks show fps and diagnostic logs.
11
+
12
+ endmenu
@@ -0,0 +1,333 @@
1
+ #include "gea_embedded_app_config.h"
2
+ #include "sdkconfig.h"
3
+
4
+ #if !defined(GEA_EMBEDDED_DIRECT_CANVAS_CONTEXT) || !GEA_EMBEDDED_DIRECT_CANVAS_CONTEXT
5
+ #define GEA_EMBEDDED_FULL_BOOT_SERVICES 1
6
+ #else
7
+ #define GEA_EMBEDDED_FULL_BOOT_SERVICES 0
8
+ #endif
9
+
10
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
11
+ #include "apps/app_manager.h"
12
+ #if CONFIG_BT_ENABLED && defined(GEA_EMBEDDED_APP_USES_BLE)
13
+ #include "connectivity/ble_hid.h"
14
+ #endif
15
+ #endif
16
+ #include "display.h"
17
+ #if GEA_EMBEDDED_DISPLAY_SOFTWARE_LANDSCAPE_PRIMARY
18
+ #include "host/display_orientation.h"
19
+ #endif
20
+
21
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
22
+ // Forward-declare here instead of through a header — there's already a
23
+ // `wifi.h` in `lib/gea-embedded/include/` defining WifiAdapter/WifiDriver,
24
+ // and adding a second `wifi.h` under `targets/esp32/connectivity/` shadows
25
+ // it in the include search path, breaking the WifiStation TU which needs
26
+ // the base class.
27
+ namespace gea::targets::esp32::wifi {
28
+ void registerDriver();
29
+ }
30
+ #endif
31
+ #include "memory_config.h"
32
+ #include "runtime.h"
33
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
34
+ #include "services/device_control.h"
35
+ #endif
36
+
37
+ #if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
38
+ #include <cstdlib>
39
+
40
+ #include "esp_heap_caps.h"
41
+ #endif
42
+ #include "esp_log.h"
43
+ #include "freertos/FreeRTOS.h"
44
+ #include "freertos/task.h"
45
+
46
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
47
+ namespace gea::platform::storage {
48
+ // Defined in sdcard_mount.cpp; registers the microSD mount provider so the
49
+ // persistent tile/file cache works. Called explicitly from app_main both to run
50
+ // it and to force the TU to link (it has no other external references and would
51
+ // otherwise be dropped by -Wl,--gc-sections, like launcherPlatform/wifi above).
52
+ void installSdCardFileCache();
53
+ } // namespace gea::platform::storage
54
+ #endif
55
+
56
+ namespace {
57
+
58
+ constexpr const char *kTag = "gea_embedded";
59
+
60
+ void runRuntime();
61
+
62
+ #if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
63
+ void logHeapProbe(const char *stage)
64
+ {
65
+ ESP_LOGI(kTag,
66
+ "heap probe [%s] internal_free=%u internal_largest=%u internal_min=%u psram_free=%u",
67
+ stage ? stage : "?",
68
+ static_cast<unsigned>(heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)),
69
+ static_cast<unsigned>(heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)),
70
+ static_cast<unsigned>(heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)),
71
+ static_cast<unsigned>(heap_caps_get_free_size(MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT)));
72
+ }
73
+ #endif
74
+
75
+ constexpr int kAppMainTaskStack = CONFIG_ESP_MAIN_TASK_STACK_SIZE;
76
+ // The runtime/render loop runs here. Under TE-sync it must not be preempted mid-flush by
77
+ // other core-0 tasks (esp_timer @22, the frame ticker @23, touch polling, …) — a preemption
78
+ // that lands near the TE deadline makes the frame miss its VBlank and drop, capping the
79
+ // steady locked rate ~2 fps below the panel TE. It blocks on the TE between frames, so it
80
+ // yields the core to those tasks in the gap; raising it above them only protects the active
81
+ // frame. 24 = top of the FreeRTOS band (configMAX_PRIORITIES-1), above the @23 frame ticker.
82
+ // An app whose own realtime tasks must outrank the render loop (audio DSP, a USB
83
+ // isochronous host) sets gea.defines.GEA_EMBEDDED_RUNTIME_TASK_PRIORITY to place
84
+ // this below them; the default is what this board needs on its own.
85
+ #ifndef GEA_EMBEDDED_RUNTIME_TASK_PRIORITY
86
+ #define GEA_EMBEDDED_RUNTIME_TASK_PRIORITY 24
87
+ #endif
88
+ constexpr UBaseType_t kRuntimeTaskPriority = GEA_EMBEDDED_RUNTIME_TASK_PRIORITY;
89
+
90
+ // Where the runtime/render loop's stack lives.
91
+ //
92
+ // By default it is main_task's own stack: app_main does the whole bring-up and
93
+ // then calls runRuntime() without returning, so CONFIG_ESP_MAIN_TASK_STACK_SIZE
94
+ // has to cover the deepest TSX frame and pointer-down re-render, and those bytes
95
+ // are internal DRAM for the life of the device. That is the right default -- one
96
+ // task, one stack, nothing to configure.
97
+ //
98
+ // It is the wrong default for an app whose own data must live in internal DRAM:
99
+ // this board's pedalboard app needs 213,472 bytes of it for its neural-amp
100
+ // arenas out of ~240 KiB, and a 20 KiB render stack it cannot move is the
101
+ // difference between the model loading and not. Setting
102
+ // GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES to a non-zero value runs the loop on its
103
+ // own task instead, and app_main then RETURNS -- which deletes main_task and
104
+ // hands its stack back to the heap, so the app's own bring-up (the
105
+ // gea_app_native_boot hook, where that app allocates its arenas) is the only
106
+ // thing main_task's stack still has to cover.
107
+ // GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL=1 additionally places that stack in
108
+ // PSRAM, which takes it off the internal budget entirely. The constraint that
109
+ // comes with it: a task on an external stack must never perform a flash
110
+ // operation, because a flash write disables the cache and ESP-IDF asserts
111
+ // esp_task_stack_is_sane_cache_disabled() for exactly that case. Rendering does
112
+ // not (embedded assets and fonts are cache-mapped reads), but an app that writes
113
+ // NVS, SPIFFS or an OTA slot from inside an event handler must keep that work on
114
+ // a task of its own. Needs CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM, which this
115
+ // board's defaults already set.
116
+ #ifndef GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
117
+ #define GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES 0
118
+ #endif
119
+ #ifndef GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL
120
+ #define GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL 0
121
+ #endif
122
+ constexpr int kRuntimeTaskStackBytes = GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES;
123
+
124
+ #if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
125
+ void logCurrentTaskStack(const char *stage, int stackBytes)
126
+ {
127
+ TaskHandle_t currentTask = xTaskGetCurrentTaskHandle();
128
+ ESP_LOGI(kTag,
129
+ "stack probe [%s] task=%s core=%d stack_arg=%d hwm=%u",
130
+ stage ? stage : "?",
131
+ currentTask ? pcTaskGetName(currentTask) : "?",
132
+ static_cast<int>(xPortGetCoreID()),
133
+ stackBytes,
134
+ static_cast<unsigned>(uxTaskGetStackHighWaterMark(currentTask)));
135
+ }
136
+ #endif
137
+
138
+ gea::framework::RuntimeOptions runtimeOptions()
139
+ {
140
+ gea::framework::RuntimeOptions options{};
141
+ #if GEA_EMBEDDED_DISPLAY_SOFTWARE_LANDSCAPE_PRIMARY
142
+ // The panel is natively portrait and the CO5300 has no usable XY-swap
143
+ // register, so landscape is the software path in targets/esp32/display.cpp:
144
+ // the Canvas writes logical landscape pixels straight into native-order
145
+ // framebuffer rows. It only engages when the orientation state agrees --
146
+ // TouchRuntime::transformTouchToLogical reads the same state to rotate
147
+ // controller coordinates, so without this the display would rotate and the
148
+ // touch input would not. An app asks for it from its manifest's
149
+ // `gea.defines`, which reach the whole native build:
150
+ // SOFTWARE_LANDSCAPE_PRIMARY=1 and ROTATE_LANDSCAPE=1 (the rotated Canvas
151
+ // bind is compiled out without the second), plus all four dimensions --
152
+ // this board declares none, so display.h otherwise defaults them to portrait
153
+ // 410x502: DISPLAY_WIDTH=502, DISPLAY_HEIGHT=410, DISPLAY_NATIVE_WIDTH=410,
154
+ // DISPLAY_NATIVE_HEIGHT=502. The static_asserts in display.cpp check that
155
+ // pair against the native panel.
156
+ using OrientationState = gea::framework::display::detail::DisplayOrientationState;
157
+ OrientationState::setSupportedOrientations("landscape-primary");
158
+ options.width = OrientationState::width();
159
+ options.height = OrientationState::height();
160
+ #else
161
+ options.width = gea::platform::display::kWidth;
162
+ options.height = gea::platform::display::kHeight;
163
+ #endif
164
+ return options;
165
+ }
166
+
167
+ void runRuntime()
168
+ {
169
+ gea::framework::Runtime::run(runtimeOptions());
170
+ }
171
+
172
+ #if GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
173
+ void runtimeTask(void *)
174
+ {
175
+ ESP_LOGI(kTag, "Gea runtime task started stack=%d %s hwm=%u", kRuntimeTaskStackBytes,
176
+ GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL ? "external" : "internal",
177
+ static_cast<unsigned>(uxTaskGetStackHighWaterMark(nullptr)));
178
+ runRuntime();
179
+ ESP_LOGE(kTag, "Runtime returned unexpectedly; parking runtime task");
180
+ while (true) {
181
+ vTaskDelay(pdMS_TO_TICKS(1000));
182
+ }
183
+ }
184
+ #endif
185
+
186
+ } // namespace
187
+
188
+ extern "C" void app_main(void)
189
+ {
190
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
191
+ // Force the targets/esp32/apps/app_manager.cpp TU to be linked in. That
192
+ // TU's only side effect is a file-scope `PlatformRegistration` whose
193
+ // constructor calls AppManager::setPlatform(...). With -Wl,--gc-sections
194
+ // and the main component built as a static archive, nothing else
195
+ // references launcherPlatform(), so the linker drops the entire object
196
+ // file — the static ctor never runs, AppManager::platform_ stays null,
197
+ // and AppManager::startLauncherButtonTask() / returnRunningAppToLauncher
198
+ // / ... all become silent no-ops. Result: the BOOT button task is never
199
+ // created and no `launcher_button` log lines are ever emitted.
200
+ (void)gea::platform::esp32::apps::launcherPlatform();
201
+
202
+ // Same static-archive trap as `launcherPlatform()` above. Three different
203
+ // `wifi.cpp` files all archive as `wifi.cpp.obj` in `libmain.a`; symbol-
204
+ // driven archive linking pulls in `lib/gea-embedded/wifi.cpp` (WifiAdapter
205
+ // + NullWifiDriver) and `lib/gea-embedded/host/wifi.cpp` (WifiBackend
206
+ // shim) because external code references them, but the ESP32 driver's
207
+ // only side effect was an anonymous-namespace static-init global with no
208
+ // external references — so the obj was dropped, leaving NullWifiDriver
209
+ // (whose enabled()/setEnabled() are silent no-ops) as the active driver.
210
+ // `wifi().init()` returned false in <1ms at boot ("WiFi failed; OTA not
211
+ // available") and the Settings panel WiFi toggle did nothing.
212
+ //
213
+ // Note: wifi.cpp itself wraps `wifi_init_config_t.osi_funcs` to bump the
214
+ // closed-source wifi blob's hardcoded 3584-byte task stack to 8192,
215
+ // avoiding a stack overflow during WPA2 auth on this firmware.
216
+ //
217
+ // GEA_EMBEDDED_WIFI_DISABLED skips driver registration entirely, leaving the
218
+ // no-op NullWifiDriver active (no esp_wifi_init/start, no WiFi DMA/ISR bus
219
+ // traffic). Used to isolate whether WiFi PSRAM/cache-bus contention is what
220
+ // starves the direct-PSRAM SPI flush FIFO.
221
+ #ifndef GEA_EMBEDDED_WIFI_DISABLED
222
+ gea::targets::esp32::wifi::registerDriver();
223
+ #endif
224
+
225
+ // Same static-archive trap as `launcherPlatform()` and `wifi::registerDriver()`
226
+ // above. Reference the HID driver explicitly so its TU is pulled in and
227
+ // `HidServer` replaces the board-independent `NullBleDriver`. Originally
228
+ // gated on `GEA_EMBEDDED_APP_USES_BLE`, but `geatsc analyze` only detects
229
+ // BLE usage when the import literal is `from 'gea-embedded'` — the
230
+ // internal `runtime-surface` re-export chain that `gea-embedded`'s
231
+ // Settings panel uses (`import { BLE, ... } from '../../runtime-surface'`)
232
+ // gets a false negative, the macro never lands, the driver never
233
+ // registers, and the BLUETOOTH toggle is a silent no-op (NullBleDriver's
234
+ // `setEnabled` ignores its argument; `enabled()` always returns false).
235
+ // We can't just define the analyzer macro unconditionally either — it also gates
236
+ // `gea_init`'s SPIRAM-vs-DRAM placement in `app_runner.cpp`, and forcing
237
+ // DRAM there fails (64 KB stack > 32 KB largest contiguous block at
238
+ // init time). The board build's independently resolved BLE capability controls
239
+ // whether this driver is linked and registered; the analyzer macro stays narrow.
240
+ #if CONFIG_BT_ENABLED && defined(GEA_EMBEDDED_APP_USES_BLE)
241
+ gea::targets::esp32::ble::registerHidDriver();
242
+ #ifdef GEA_EMBEDDED_BLE_OTA
243
+ gea::targets::esp32::ble::startOtaServer();
244
+ #endif
245
+ #endif
246
+
247
+ // Register the microSD mount provider so the persistent file cache (maps OSM
248
+ // tiles, recordings, GEADEV PUSH) actually works. Lazy: the card isn't touched
249
+ // until the first file op. Without this, ensureMounted() is always false and
250
+ // every tile re-downloads.
251
+ gea::platform::storage::installSdCardFileCache();
252
+ #endif
253
+
254
+ #if !GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
255
+ vTaskPrioritySet(nullptr, kRuntimeTaskPriority);
256
+ #endif
257
+ #if GEA_EMBEDDED_FRAME_SCHEDULER_PERF_LOG
258
+ logCurrentTaskStack("main_task:before_runtime", kAppMainTaskStack);
259
+ #endif
260
+ #if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
261
+ logHeapProbe("app_main:before_device_control_task");
262
+ #endif
263
+ #if GEA_EMBEDDED_FULL_BOOT_SERVICES
264
+ gea::platform::esp32::services::startDeviceControlTask();
265
+ #endif
266
+ #if GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG
267
+ logHeapProbe("app_main:before_runtime");
268
+ #endif
269
+ #if GEA_EMBEDDED_RUNTIME_TASK_STACK_BYTES
270
+ // Run the WHOLE bring-up HERE, on main_task, before the loop moves to a task
271
+ // whose stack may be external. Not just the app's native boot hook: the
272
+ // framework's own bring-up reads and writes flash too -- StorageService::init
273
+ // mounts SPIFFS, the localStorage restore and the radios go through NVS -- and
274
+ // a flash operation from an external stack aborts in
275
+ // esp_task_stack_is_sane_cache_disabled. Hoisting only the app hook left
276
+ // exactly that crash: the SPIFFS mount inside Runtime::run asserted on the
277
+ // PSRAM-stacked loop task, on every boot, about nine seconds in. Bring-up on
278
+ // main_task is also what makes the arrangement worth anything -- the app
279
+ // claims its internal RAM while main_task's stack is the only one committed,
280
+ // and returning below hands that stack back. Runtime::run() on the loop task
281
+ // finds this already done and goes straight to receiving events.
282
+ // A failed bring-up is NOT fatal here. On a board whose app owns hardware of
283
+ // its own -- an audio engine, a USB host -- that hardware is already running
284
+ // by now, and aborting because the display could not get its DMA staging
285
+ // would take a working instrument down with the screen. Log it, skip the loop
286
+ // task, and let app_main return: the app's own tasks keep running, and its
287
+ // maintenance path stays reachable.
288
+ if (!gea::framework::Runtime::boot(runtimeOptions())) {
289
+ ESP_LOGE(kTag, "Gea bring-up failed; the UI will not start (the app's own tasks keep running)");
290
+ return;
291
+ }
292
+
293
+ #if GEA_EMBEDDED_NO_DISPLAY
294
+ // The runtime task exists to run the frame loop, and a board with no panel
295
+ // and no canvas has no frames: boot() above never created an event queue, so
296
+ // the loop would have nothing to wait on and would spin a core flat out,
297
+ // starving every lower-priority task behind it. boot() is the whole of the
298
+ // bring-up here, so there is no second task to create, and its stack is
299
+ // never allocated.
300
+ ESP_LOGI(kTag, "Bootstrap complete; no display on this board, so no Gea runtime loop");
301
+ #else
302
+ // Same core main_task ran on: the priority comment above is about not being
303
+ // preempted by the other core-0 tasks between TE deadlines, which only holds
304
+ // if the loop stays there.
305
+ TaskHandle_t runtime = nullptr;
306
+ const BaseType_t created = xTaskCreatePinnedToCoreWithCaps(
307
+ &runtimeTask,
308
+ "gea_runtime",
309
+ kRuntimeTaskStackBytes,
310
+ nullptr,
311
+ kRuntimeTaskPriority,
312
+ &runtime,
313
+ xPortGetCoreID(),
314
+ GEA_EMBEDDED_RUNTIME_TASK_STACK_EXTERNAL ? (MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT)
315
+ : (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT));
316
+ if (created != pdPASS) {
317
+ ESP_LOGE(kTag, "Failed to allocate %d-byte Gea runtime stack", kRuntimeTaskStackBytes);
318
+ std::abort();
319
+ }
320
+ // Returning deletes main_task and returns its stack to the heap. Nothing
321
+ // below this point runs, which is the point: the app's bring-up is the only
322
+ // thing CONFIG_ESP_MAIN_TASK_STACK_SIZE now has to cover.
323
+ ESP_LOGI(kTag, "Bootstrap complete; Gea runtime task=%p stack=%d", runtime, kRuntimeTaskStackBytes);
324
+ #endif
325
+ #else
326
+ runRuntime();
327
+
328
+ ESP_LOGE(kTag, "Runtime returned unexpectedly; parking main task");
329
+ while (true) {
330
+ vTaskDelay(pdMS_TO_TICKS(1000));
331
+ }
332
+ #endif
333
+ }
@@ -0,0 +1,39 @@
1
+ #include "i2c.h"
2
+
3
+ #include "board.h"
4
+
5
+ #include "driver/gpio.h"
6
+ #include "driver/i2c_master.h"
7
+ #include "esp_err.h"
8
+ #include "esp_log.h"
9
+
10
+ namespace {
11
+
12
+ constexpr gpio_num_t kSdaPin = gea::platform::board::i2c.sda;
13
+ constexpr gpio_num_t kSclPin = gea::platform::board::i2c.scl;
14
+ constexpr const char *TAG = "i2c";
15
+
16
+ i2c_master_bus_handle_t primary_bus = nullptr;
17
+
18
+ } // namespace
19
+
20
+ gea::platform::i2c::Bus gea::platform::i2c::Bus::primary() {
21
+ if (primary_bus) return Bus(primary_bus);
22
+
23
+ i2c_master_bus_config_t bus_cfg = {};
24
+ bus_cfg.i2c_port = -1;
25
+ bus_cfg.sda_io_num = kSdaPin;
26
+ bus_cfg.scl_io_num = kSclPin;
27
+ bus_cfg.clk_source = I2C_CLK_SRC_DEFAULT;
28
+ bus_cfg.flags.enable_internal_pullup = true;
29
+
30
+ const esp_err_t err = i2c_new_master_bus(&bus_cfg, &primary_bus);
31
+ if (err != ESP_OK) {
32
+ ESP_LOGE(TAG, "I2C bus init failed: %s", esp_err_to_name(err));
33
+ primary_bus = nullptr;
34
+ return Bus(nullptr);
35
+ }
36
+
37
+ ESP_LOGI(TAG, "I2C bus ready (SDA=%d, SCL=%d)", static_cast<int>(kSdaPin), static_cast<int>(kSclPin));
38
+ return Bus(primary_bus);
39
+ }
@@ -0,0 +1,27 @@
1
+ # A managed dependency is a requirement of `main` the moment it is listed here,
2
+ # so gating only the REQUIRES leaves the component downloaded, configured and
3
+ # built. The `if:` rules keep each registry component tied to the capability
4
+ # whose source actually uses it. GEA_EMBEDDED_CAPABILITY_* comes from the gea
5
+ # CLI's app analysis; app_project.cmake defaults each to 1 before project() so a
6
+ # direct `idf.py` build keeps everything (and so the component manager never
7
+ # sees an unset variable, which it treats as an error).
8
+ dependencies:
9
+ espressif/esp_lcd_co5300: '^2.0.3'
10
+ esp_lcd_panel_io_additions: '^1'
11
+ # chip_bindings/audio/es8311.cpp
12
+ espressif/esp_codec_dev:
13
+ version: '^1.4.0'
14
+ rules:
15
+ - if: '$GEA_EMBEDDED_CAPABILITY_AUDIO == 1'
16
+ # host/websocket.cpp
17
+ espressif/esp_websocket_client:
18
+ version: '^1.4'
19
+ rules:
20
+ - if: '$GEA_EMBEDDED_CAPABILITY_NETWORK == 1'
21
+ # host/rtc_esp.cpp -- the WebRTC peer, and libsrtp behind it
22
+ espressif/esp_peer:
23
+ version: '^1.4'
24
+ rules:
25
+ - if: '$GEA_EMBEDDED_CAPABILITY_NETWORK == 1'
26
+ idf:
27
+ version: '>=5.3'
@@ -0,0 +1,114 @@
1
+ #pragma once
2
+
3
+ #include "driver/gpio.h"
4
+ #include "driver/spi_master.h"
5
+
6
+ namespace gea::platform::board {
7
+
8
+ struct I2cBusConfig {
9
+ gpio_num_t sda;
10
+ gpio_num_t scl;
11
+ };
12
+
13
+ struct Co5300DisplayConfig {
14
+ spi_host_device_t spiHost;
15
+ gpio_num_t cs;
16
+ gpio_num_t pclk;
17
+ gpio_num_t data0;
18
+ gpio_num_t data1;
19
+ gpio_num_t data2;
20
+ gpio_num_t data3;
21
+ gpio_num_t reset;
22
+ // Tearing-Effect line out of the CO5300 (TEON/0x35 is enabled in the panel
23
+ // init). The runtime waits for its VBlank edge before flushing, so the QSPI
24
+ // write into GRAM never overlaps the panel's scanout (vsync). GPIO_NUM_NC
25
+ // disables the wait on boards that don't route TE.
26
+ gpio_num_t te;
27
+ };
28
+
29
+ struct Ft3168TouchConfig {
30
+ gpio_num_t reset;
31
+ gpio_num_t interrupt;
32
+ };
33
+
34
+ struct Es8311AudioConfig {
35
+ // ESP-IDF 6.0 removed the legacy I2S driver and its i2s_port_t enum; the new
36
+ // channel API's i2s_chan_config_t.id is a plain int (I2S_NUM_AUTO/_0 are now
37
+ // int macros). Keep this an int so I2S_NUM_AUTO assigns cleanly.
38
+ int i2sPort;
39
+ gpio_num_t mclk;
40
+ gpio_num_t bclk;
41
+ gpio_num_t ws;
42
+ gpio_num_t dout;
43
+ gpio_num_t din;
44
+ gpio_num_t powerAmplifier;
45
+ };
46
+
47
+ struct SdMmcConfig {
48
+ gpio_num_t clk;
49
+ gpio_num_t cmd;
50
+ gpio_num_t data0;
51
+ };
52
+
53
+ struct LauncherButtonConfig {
54
+ gpio_num_t pin;
55
+ int activeLevel;
56
+ };
57
+
58
+ class Esp32S3TouchAmoled206 {
59
+ public:
60
+ static constexpr I2cBusConfig i2c{
61
+ .sda = GPIO_NUM_15,
62
+ .scl = GPIO_NUM_14,
63
+ };
64
+
65
+ static constexpr Co5300DisplayConfig display{
66
+ .spiHost = SPI2_HOST,
67
+ .cs = GPIO_NUM_12,
68
+ .pclk = GPIO_NUM_11,
69
+ .data0 = GPIO_NUM_4,
70
+ .data1 = GPIO_NUM_5,
71
+ .data2 = GPIO_NUM_6,
72
+ .data3 = GPIO_NUM_7,
73
+ .reset = GPIO_NUM_8,
74
+ .te = GPIO_NUM_13,
75
+ };
76
+
77
+ static constexpr Ft3168TouchConfig touch{
78
+ .reset = GPIO_NUM_9,
79
+ .interrupt = GPIO_NUM_38,
80
+ };
81
+
82
+ static constexpr Es8311AudioConfig audio{
83
+ // I2S_NUM_AUTO ("any free controller"), spelled as its value so the
84
+ // board description does not have to include driver/i2s_types.h --
85
+ // which would make every soundless app carry esp_driver_i2s to
86
+ // describe pins it never drives. es8311.cpp, the only consumer,
87
+ // static_asserts the two agree where that header is in scope.
88
+ .i2sPort = -1,
89
+ .mclk = GPIO_NUM_16,
90
+ .bclk = GPIO_NUM_41,
91
+ .ws = GPIO_NUM_45,
92
+ .dout = GPIO_NUM_40,
93
+ .din = GPIO_NUM_42,
94
+ .powerAmplifier = GPIO_NUM_46,
95
+ };
96
+ };
97
+
98
+ using Board = Esp32S3TouchAmoled206;
99
+
100
+ inline constexpr auto i2c = Board::i2c;
101
+ inline constexpr auto display = Board::display;
102
+ inline constexpr auto touch = Board::touch;
103
+ inline constexpr auto audio = Board::audio;
104
+ inline constexpr SdMmcConfig storage{
105
+ .clk = GPIO_NUM_2,
106
+ .cmd = GPIO_NUM_1,
107
+ .data0 = GPIO_NUM_3,
108
+ };
109
+ inline constexpr LauncherButtonConfig launcherButton{
110
+ .pin = GPIO_NUM_0,
111
+ .activeLevel = 0,
112
+ };
113
+
114
+ } // namespace gea::platform::board
@@ -0,0 +1,5 @@
1
+ // Copy this file to wifi_config.h and fill in your credentials.
2
+ // wifi_config.h is gitignored — never commit real credentials.
3
+
4
+ #define GEA_EMBEDDED_WIFI_SSID "YOUR_SSID_HERE"
5
+ #define GEA_EMBEDDED_WIFI_PASSWORD "YOUR_PASSWORD_HERE"