@typecad/framework-zephyr 1.0.0-alpha.11 → 1.0.0-alpha.13
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/dist/display/index.d.ts +1 -1
- package/dist/display/index.js +1 -1
- package/dist/display/profiles.d.ts +33 -0
- package/dist/display/profiles.js +36 -0
- package/dist/display/touch-adapter.d.ts +3 -4
- package/dist/display/touch-adapter.js +119 -16
- package/dist/display/ui-adapter.d.ts +4 -0
- package/dist/display/ui-adapter.js +348 -139
- package/dist/dt-config/kconfig.d.ts +5 -1
- package/dist/dt-config/kconfig.js +22 -5
- package/dist/dt-config/overlay.d.ts +26 -2
- package/dist/dt-config/overlay.js +138 -27
- package/dist/framework.manifest.d.ts +29 -28
- package/dist/framework.manifest.js +9 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/lowering/ble.js +3 -1
- package/dist/lowering/gpio.js +7 -3
- package/dist/strategy.d.ts +24 -0
- package/dist/strategy.js +326 -134
- package/dist/toolchain/debug-config.d.ts +43 -2
- package/dist/toolchain/debug-config.js +129 -17
- package/dist/toolchain/index.d.ts +13 -0
- package/dist/toolchain/index.js +104 -23
- package/dist/toolchain/scaffold.js +40 -18
- package/dist/toolchain/west-discover.js +4 -1
- package/package.json +4 -4
- package/src/display/index.ts +1 -1
- package/src/display/profiles.ts +63 -0
- package/src/display/touch-adapter.ts +119 -15
- package/src/display/ui-adapter.ts +357 -139
- package/src/dt-config/kconfig.ts +26 -6
- package/src/dt-config/overlay.ts +450 -298
- package/src/framework.manifest.ts +9 -3
- package/src/index.ts +6 -0
- package/src/lowering/ble.ts +3 -1
- package/src/lowering/gpio.ts +7 -3
- package/src/strategy.ts +355 -136
- package/src/toolchain/debug-config.ts +137 -14
- package/src/toolchain/index.ts +107 -24
- package/src/toolchain/scaffold.ts +39 -16
- package/src/toolchain/west-discover.ts +4 -1
|
@@ -289,8 +289,13 @@ export default defineFrameworkManifest({
|
|
|
289
289
|
},
|
|
290
290
|
display: {
|
|
291
291
|
supported: true,
|
|
292
|
-
partialCoverage:
|
|
293
|
-
|
|
292
|
+
partialCoverage: true,
|
|
293
|
+
// Partial: mono profiles (ssd1306-zephyr) drive display.* ops via the
|
|
294
|
+
// direct GFX runtime only — no CuttlefishGFX UI rendering path. The
|
|
295
|
+
// ILI9341 UI adapter shares the ST7796S direct-drive transport with a
|
|
296
|
+
// per-controller init table (16-bit RGB565 wire format); hardware-tuned
|
|
297
|
+
// on ST7796S only. E-ink panels are out of scope at this time.
|
|
298
|
+
unsupportedReason: 'Mono panels (ssd1306) are direct-op only (no UI rendering); ili9341 UI path is ported but not yet hardware-verified; e-ink is out of scope at this time.',
|
|
294
299
|
drivers: ['ili9341-zephyr', 'st7796-zephyr', 'ssd1306-zephyr'],
|
|
295
300
|
colorFormat: 'rgb565',
|
|
296
301
|
ops: {
|
|
@@ -499,6 +504,7 @@ export default defineFrameworkManifest({
|
|
|
499
504
|
polyfills: {
|
|
500
505
|
emitted: [
|
|
501
506
|
{ id: 'cuttlefish_halt', domain: 'standard', notes: 'Mapped to a k_msleep halt loop (exceptions disabled)' },
|
|
507
|
+
{ id: 'wiring_compat', domain: 'standard', notes: 'HIGH/LOW/digitalRead/etc. macros routing Wiring tokens (referenced unconditionally by the UI runtime header) to the __tc_gpio_* helpers' },
|
|
502
508
|
{ id: 'string_methods', domain: 'embedded', notes: 'STL-free __tc_* string helpers (const char*, inline ASCII case conv, <cstring> only)' },
|
|
503
509
|
{ id: 'static_array', domain: 'embedded', notes: 'STL-free __tc_StaticArray<T,N> wrapper for no-<vector> mutated/struct array literals' },
|
|
504
510
|
{ id: 'timer_methods', domain: 'embedded', notes: 'k_timer + k_work pool (system workqueue); callbacks run in thread context' },
|
|
@@ -509,7 +515,7 @@ export default defineFrameworkManifest({
|
|
|
509
515
|
|
|
510
516
|
toolchain: {
|
|
511
517
|
backend: 'west',
|
|
512
|
-
operations: { prepare: true, compile: true, upload: true, monitor: true },
|
|
518
|
+
operations: { prepare: true, compile: true, upload: true, monitor: true, debug: true },
|
|
513
519
|
},
|
|
514
520
|
|
|
515
521
|
libraryResolution: {
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,12 @@ export { ZephyrStrategy as FrameworkStrategy } from './strategy.js';
|
|
|
10
10
|
export { ZephyrStrategy } from './strategy.js';
|
|
11
11
|
export { Toolchain } from './toolchain/index.js';
|
|
12
12
|
|
|
13
|
+
// Create-time starter debug artifacts. The `cuttlefish create` flow reads this
|
|
14
|
+
// optional named export off the loaded framework module (same loader pattern
|
|
15
|
+
// as doctor/licenses) and calls it for freshly scaffolded projects, so F5 in
|
|
16
|
+
// VS Code works before the first build. No-ops for non-GDB targets.
|
|
17
|
+
export { writeProjectDebugArtifacts } from './toolchain/debug-config.js';
|
|
18
|
+
|
|
13
19
|
// `cuttlefish doctor` — verify the installed Zephyr is reachable + inside the
|
|
14
20
|
// declared compat range, and preview board-target normalization. Re-exported
|
|
15
21
|
// under the dispatcher-facing alias `doctor` so the loader picks it up as
|
package/src/lowering/ble.ts
CHANGED
|
@@ -393,7 +393,9 @@ export function lowerBle(op: HALOpIR): { code?: string; expression?: string } {
|
|
|
393
393
|
case 'ble.on_read':
|
|
394
394
|
// Store the typed read handler as void*; __tc_ble_attr_read casts it back
|
|
395
395
|
// to the right signature based on the char's type field. reinterpret_cast
|
|
396
|
-
// (not a C-style cast)
|
|
396
|
+
// (not a C-style cast) avoids M5-0-7, but M5-0-10 still flags it — the
|
|
397
|
+
// whole type-erased table is covered by a knownPatterns deviation on
|
|
398
|
+
// that rule (see rules.ts, "BLE type-erased callback table").
|
|
397
399
|
return { code: `__tc_ble.on_read[__tc_ble.current_char] = reinterpret_cast<void*>(${s(o.handler)});` };
|
|
398
400
|
case 'ble.on_write':
|
|
399
401
|
return { code: `__tc_ble.on_write[__tc_ble.current_char] = (${s(o.handler)});` };
|
package/src/lowering/gpio.ts
CHANGED
|
@@ -136,9 +136,13 @@ function lowerGpioRaw(
|
|
|
136
136
|
case 'gpio.read':
|
|
137
137
|
return { expression: `gpio_pin_get_raw(${controller}, ${pin})` };
|
|
138
138
|
case 'gpio.toggle':
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
// Native atomic toggle — never read-modify-write. gpio_pin_get_raw on
|
|
140
|
+
// a direction-only output reads the input latch, which is undefined on
|
|
141
|
+
// SoCs that don't latch it. Zephyr's toggle API has no _raw variant —
|
|
142
|
+
// gpio_pin_toggle is the driver-level atomic toggle, and for pins
|
|
143
|
+
// configured without GPIO_ACTIVE_LOW the logical level equals the
|
|
144
|
+
// physical one, so it matches the get_raw/set_raw used elsewhere.
|
|
145
|
+
return { code: `gpio_pin_toggle(${controller}, ${pin});` };
|
|
142
146
|
default:
|
|
143
147
|
throw new Error(
|
|
144
148
|
`framework-zephyr does not yet support HAL op \`${op.operation}\`. ` +
|