@geastack/targets 0.1.99 → 0.1.101

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 (48) hide show
  1. package/build-config.json +10 -2
  2. package/package.json +7 -7
  3. package/targets/cmake/geatsc-generated-archive-build.mjs +32 -1
  4. package/targets/esp32/app_project.cmake +2 -2
  5. package/targets/esp32/chip_bindings/audio/echo_cancellation.cpp +392 -28
  6. package/targets/esp32/chip_bindings/audio/echo_cancellation.h +18 -2
  7. package/targets/esp32/chip_bindings/audio/es8311.cpp +117 -13
  8. package/targets/esp32/chip_bindings/displays/co5300.cpp +68 -28
  9. package/targets/esp32/components/gea_framework/CMakeLists.txt +17 -1
  10. package/targets/esp32/components/gea_framework/idf_component.yml +4 -0
  11. package/targets/esp32/components/gea_vpx/CMakeLists.txt +1 -1
  12. package/targets/esp32/connectivity/wifi.cpp +800 -543
  13. package/targets/esp32/display.cpp +121 -26
  14. package/targets/esp32/gea_framework.cmake +22 -28
  15. package/targets/esp32/host_sources.cmake +1 -0
  16. package/targets/esp32/services/comparison_benchmark.h +137 -0
  17. package/targets/esp32/services/comparison_gesture.h +133 -0
  18. package/targets/esp32/services/comparison_input_trace.h +64 -0
  19. package/targets/esp32/services/comparison_upload_capture.h +125 -0
  20. package/targets/esp32/services/debugger.h +634 -0
  21. package/targets/esp32/services/device_control.cpp +965 -20
  22. package/targets/esp32/services/frame_scheduler.cpp +128 -4
  23. package/targets/esp32/services/heap.cpp +125 -0
  24. package/targets/esp32/services/opus_benchmark.h +1 -1
  25. package/targets/esp32/services/storage_service.cpp +119 -104
  26. package/targets/esp32-p4-m5stack-tab5/dependencies.lock +27 -16
  27. package/targets/esp32-s3-m5stack-stopwatch/README.md +14 -9
  28. package/targets/esp32-s3-m5stack-stopwatch/dependencies.lock +54 -1
  29. package/targets/esp32-s3-m5stack-stopwatch/main/CMakeLists.txt +10 -7
  30. package/targets/esp32-s3-m5stack-stopwatch/main/buttons.cpp +80 -0
  31. package/targets/esp32-s3-m5stack-stopwatch/main/idf_component.yml +18 -0
  32. package/targets/esp32-s3-m5stack-stopwatch/main/include/board.h +38 -17
  33. package/targets/esp32-s3-m5stack-stopwatch/main/panel_reset.cpp +132 -129
  34. package/targets/esp32-s3-m5stack-stopwatch/main/power.cpp +253 -0
  35. package/targets/esp32-s3-m5stack-stopwatch/main/touch.cpp +158 -88
  36. package/targets/esp32-s3-m5stack-stopwatch/sdkconfig.defaults +13 -0
  37. package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +30 -3
  38. package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +10 -148
  39. package/targets/esp32-s31-espressif-mosaico/README.md +34 -0
  40. package/targets/esp32-s31-espressif-mosaico/dependencies.lock +49 -1
  41. package/targets/esp32-s31-espressif-mosaico/main/CMakeLists.txt +23 -5
  42. package/targets/esp32-s31-espressif-mosaico/main/board_power.cpp +117 -0
  43. package/targets/esp32-s31-espressif-mosaico/main/camera.cpp +326 -0
  44. package/targets/esp32-s31-espressif-mosaico/main/idf_component.yml +11 -0
  45. package/targets/esp32-s31-espressif-mosaico/main/include/board.h +23 -0
  46. package/targets/esp32-s31-espressif-mosaico/main/nand_mount.cpp +172 -0
  47. package/targets/esp32-s31-espressif-mosaico/partitions.csv +7 -3
  48. package/targets/esp32-s31-espressif-mosaico/sdkconfig.defaults +24 -0
package/build-config.json CHANGED
@@ -15,7 +15,8 @@
15
15
  "renderer.subtreeRevealChecks",
16
16
  "renderer.recordInlinePositions",
17
17
  "diagnostics.performanceCounters",
18
- "diagnostics.frameTiming"
18
+ "diagnostics.frameTiming",
19
+ "renderer.bandedUi"
19
20
  ],
20
21
  "defaults": {
21
22
  "ui": {
@@ -29,6 +30,9 @@
29
30
  "storeRelowering": true,
30
31
  "moduleGraph": "auto",
31
32
  "allowAny": false
33
+ },
34
+ "renderer": {
35
+ "bandedUi": false
32
36
  }
33
37
  }
34
38
  },
@@ -41,7 +45,8 @@
41
45
  "compiler.translationUnits",
42
46
  "compiler.storeRelowering",
43
47
  "compiler.moduleGraph",
44
- "compiler.allowAny"
48
+ "compiler.allowAny",
49
+ "renderer.bandedUi"
45
50
  ],
46
51
  "defaults": {
47
52
  "ui": {
@@ -55,6 +60,9 @@
55
60
  "storeRelowering": true,
56
61
  "moduleGraph": "auto",
57
62
  "allowAny": false
63
+ },
64
+ "renderer": {
65
+ "bandedUi": false
58
66
  }
59
67
  }
60
68
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/targets",
3
- "version": "0.1.99",
3
+ "version": "0.1.101",
4
4
  "description": "Native embedded build targets (ESP32-IDF, RP2350) for geastack apps: board sources, target catalog, and CMake glue driven by the gea CLI.",
5
5
  "license": "GPL-3.0-only",
6
6
  "repository": {
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@geastack/chips": "^0.1.6",
40
- "@geastack/compiler": "^1.0.25",
41
- "@geastack/core": "^0.1.39",
42
- "@geastack/elements": "^0.1.5",
43
- "@geastack/engine": "^0.1.15",
40
+ "@geastack/compiler": "^1.0.29",
41
+ "@geastack/core": "^0.1.40",
42
+ "@geastack/elements": "^0.1.6",
43
+ "@geastack/engine": "^0.1.16",
44
44
  "@geastack/geaos": "^0.1.3",
45
- "@geastack/geatsc-plugin-gea": "^0.1.21",
46
- "@geastack/host": "^0.1.14"
45
+ "@geastack/geatsc-plugin-gea": "^0.1.22",
46
+ "@geastack/host": "^0.1.15"
47
47
  },
48
48
  "scripts": {
49
49
  "test": "for f in $(git ls-files | grep -E '(^|/)(test[-_][^/]*|[^/]*\\.test)\\.mjs$'); do echo \"==> $f\"; node \"$f\" || exit 1; done"
@@ -244,6 +244,28 @@ function runCommand(command, args) {
244
244
  })
245
245
  }
246
246
 
247
+ // GEA_GEATSC_OPTIMIZE_SIZE_EXCEPT=<regex>: compile every generated unit whose
248
+ // path does NOT match the regex with -Os (the board's flags are -O2). An app
249
+ // whose image outgrows its flash slot keeps its hot units (the matches) fast
250
+ // and trades speed for size everywhere else.
251
+ //
252
+ // GEA_GEATSC_OPTIMIZE_SPEED=<regex>: the converse for a board built -Os: the
253
+ // generated units whose path matches are compiled -O2, so a size-bound image
254
+ // pays the larger code only for its hot units.
255
+ function sizeOptimizedFlags(sourcePath) {
256
+ const speed = process.env.GEA_GEATSC_OPTIMIZE_SPEED
257
+ // -O2's deeper inlining makes GCC's flow-based bounds warnings misfire on
258
+ // the runtime's header-prefixed allocations (subscript -2 of a payload).
259
+ if (speed && new RegExp(speed).test(sourcePath)) return ['-O2', ...(process.env.GEA_GEATSC_OPTIMIZE_SPEED_FLAGS ?? '').split(/\s+/).filter(Boolean), '-Wno-array-bounds', '-Wno-stringop-overflow', '-Wno-stringop-overread']
260
+ // GEA_GEATSC_OPTIMIZE_LEVEL=<flag>: every other generated unit at this level
261
+ // instead of the board's (e.g. -Oz where -Os does not fit the app slot).
262
+ const level = process.env.GEA_GEATSC_OPTIMIZE_LEVEL
263
+ if (level) return [level]
264
+ const except = process.env.GEA_GEATSC_OPTIMIZE_SIZE_EXCEPT
265
+ if (!except) return []
266
+ return new RegExp(except).test(sourcePath) ? [] : ['-Os']
267
+ }
268
+
247
269
  async function compileObject(record, options, compileSignature) {
248
270
  const suffix = `${process.pid}.${Math.random().toString(16).slice(2)}.tmp`
249
271
  const temporaryObject = `${record.objectPath}.${suffix}`
@@ -253,6 +275,7 @@ async function compileObject(record, options, compileSignature) {
253
275
  const compilerArgs = [
254
276
  `@${options.flagsFile}`,
255
277
  ...options.generatedCompileFlags,
278
+ ...sizeOptimizedFlags(record.sourcePath),
256
279
  '-MMD',
257
280
  '-MP',
258
281
  '-MF',
@@ -491,6 +514,11 @@ export async function buildGeneratedArchive(rawOptions) {
491
514
  generatedCompileFlags: [
492
515
  ...GENERATED_WARNING_TOLERANCE_FLAGS,
493
516
  ...(rawOptions.debugInfo === true || process.env.GEA_GEATSC_DEBUG_INFO === '1' ? [] : NO_GENERATED_DEBUG_INFO_FLAGS),
517
+ // GEA_GEATSC_EXTRA_FLAGS: extra flags for the generated units only (part
518
+ // of the compile signature through this list), e.g. an app whose image
519
+ // must fit a slot dropping -fthreadsafe-statics when its generated code
520
+ // only ever runs on one task.
521
+ ...(process.env.GEA_GEATSC_EXTRA_FLAGS ?? '').split(/\s+/).filter(Boolean),
494
522
  ],
495
523
  }
496
524
  for (const [name, filePath] of Object.entries({
@@ -551,6 +579,9 @@ export async function buildGeneratedArchive(rawOptions) {
551
579
  '-MMD',
552
580
  '-MP',
553
581
  ...options.generatedCompileFlags,
582
+ `size-except:${process.env.GEA_GEATSC_OPTIMIZE_SIZE_EXCEPT ?? ''}`,
583
+ `speed:${process.env.GEA_GEATSC_OPTIMIZE_SPEED ?? ''}:${process.env.GEA_GEATSC_OPTIMIZE_SPEED_FLAGS ?? ''}`,
584
+ `level:${process.env.GEA_GEATSC_OPTIMIZE_LEVEL ?? ''}`,
554
585
  // A new .gch means every object that baked the old one in must rebuild;
555
586
  // stat identity is stable across builds that reuse the cached PCH.
556
587
  pch ? toolIdentity(pch.gchPath) : 'no-pch',
@@ -580,7 +611,7 @@ export async function buildGeneratedArchive(rawOptions) {
580
611
  const compiled = staleRecords.length
581
612
  const reused = records.length - compiled
582
613
  process.stdout.write(
583
- `geatsc-generated-archive: compiled=${compiled} reused=${reused} jobs=${Math.min(jobs, Math.max(1, compiled))} archived=${archiveChanged ? 1 : 0} pch=${pch ? (pch.rebuilt ? 'built' : 'reused') : 'off'}\n`,
614
+ `geatsc-generated-archive: compiled=${compiled} reused=${reused} jobs=${Math.min(jobs, Math.max(1, compiled))} archived=${archiveChanged ? 1 : 0} pch=${pch ? (pch.rebuilt ? 'built' : 'reused') : 'off'} os=${records.filter((record) => sizeOptimizedFlags(record.sourcePath).length > 0).length}\n`,
584
615
  )
585
616
  return { compiled, reused, jobs, archived: archiveChanged, records, pch }
586
617
  }
@@ -30,10 +30,10 @@ endif()
30
30
  # components that belong to one capability -- the codec, the WebSocket client,
31
31
  # the WebRTC peer -- on these variables, and the component manager treats an
32
32
  # unset environment variable in an `if:` rule as a hard error rather than a
33
- # false. The gea CLI always exports all three; a direct `idf.py` build has no
33
+ # false. The gea CLI always exports these values; a direct `idf.py` build has no
34
34
  # app analysis to go on, so it defaults to keeping everything, which is what it
35
35
  # built before the rules existed.
36
- foreach(_GEA_CAPABILITY NETWORK BLE AUDIO)
36
+ foreach(_GEA_CAPABILITY NETWORK BLE AUDIO RTC H264)
37
37
  if(NOT DEFINED ENV{GEA_EMBEDDED_CAPABILITY_${_GEA_CAPABILITY}}
38
38
  OR "$ENV{GEA_EMBEDDED_CAPABILITY_${_GEA_CAPABILITY}}" STREQUAL "")
39
39
  # Incremental Ninja/CMake reconfiguration does not inherit the CLI's