@typecad/framework-zephyr 1.0.0-alpha.15 → 1.0.0-alpha.18
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 +202 -21
- package/README.md +49 -87
- package/dist/as-built.d.ts +2 -2
- package/dist/as-built.js +2 -2
- package/dist/boardgen.d.ts +1 -9
- package/dist/boardgen.js +228 -45
- package/dist/chips/types.d.ts +1 -1
- package/dist/debug-codegen.js +1 -1
- package/dist/display/touch-adapter.js +1 -1
- package/dist/display/ui-adapter.js +549 -549
- package/dist/doctor.js +4 -4
- package/dist/dt-config/custom-board.js +2 -2
- package/dist/dt-config/kconfig.js +18 -12
- package/dist/dt-config/overlay.d.ts +2 -2
- package/dist/dt-config/overlay.js +2 -2
- package/dist/framework.manifest.d.ts +3 -3
- package/dist/framework.manifest.js +10 -7
- package/dist/index.js +5 -5
- package/dist/licenses.d.ts +2 -2
- package/dist/licenses.js +8 -8
- package/dist/lowering/fs.js +1 -1
- package/dist/lowering/gpio.js +0 -32
- package/dist/lowering/http.js +264 -32
- package/dist/lowering/i2c.js +0 -8
- package/dist/lowering/interrupts.js +6 -0
- package/dist/lowering/mqtt.js +110 -8
- package/dist/lowering/usb.js +11 -11
- package/dist/lowering/wdt.js +2 -29
- package/dist/sdk/board-catalog-sync.d.ts +1 -3
- package/dist/sdk/board-catalog-sync.js +4 -10
- package/dist/strategy.d.ts +22 -44
- package/dist/strategy.js +152 -155
- package/dist/tmp-probe.d.ts +2 -0
- package/dist/tmp-probe.js +9 -0
- package/dist/toolchain/debug-config.d.ts +50 -90
- package/dist/toolchain/debug-config.js +241 -502
- package/dist/toolchain/env-check.d.ts +1 -3
- package/dist/toolchain/env-check.js +2 -7
- package/dist/toolchain/index.d.ts +65 -2
- package/dist/toolchain/index.js +432 -55
- package/dist/toolchain/runners.d.ts +16 -0
- package/dist/toolchain/runners.js +75 -0
- package/dist/toolchain/scaffold.d.ts +1 -1
- package/dist/toolchain/scaffold.js +12 -12
- package/dist/toolchain/west-discover.d.ts +6 -0
- package/dist/toolchain/west-discover.js +36 -13
- package/dist/toolchain/west-spawn.js +8 -2
- package/installer/README.md +328 -328
- package/installer/install.sh +2 -2
- package/installer/templates/project/.typecad/activate-zephyr.ps1 +1 -1
- package/installer/templates/project/.typecad/activate-zephyr.sh +1 -1
- package/installer/templates/project/.vscode/settings.json +1 -1
- package/installer/templates/project/README.md +2 -2
- package/package.json +5 -5
- package/src/as-built.ts +206 -206
- package/src/boardgen.ts +214 -48
- package/src/chips/types.ts +567 -567
- package/src/display/touch-adapter.ts +204 -204
- package/src/display/ui-adapter.ts +781 -781
- package/src/doctor.ts +4 -4
- package/src/dt-config/custom-board.ts +2 -2
- package/src/dt-config/kconfig.ts +18 -12
- package/src/dt-config/overlay.ts +1058 -1058
- package/src/framework.manifest.ts +538 -535
- package/src/index.ts +5 -5
- package/src/licenses.ts +425 -425
- package/src/lowering/fs.ts +135 -135
- package/src/lowering/gpio.ts +0 -33
- package/src/lowering/http.ts +264 -32
- package/src/lowering/i2c.ts +0 -9
- package/src/lowering/interrupts.ts +6 -0
- package/src/lowering/mqtt.ts +109 -8
- package/src/lowering/usb.ts +221 -221
- package/src/lowering/wdt.ts +2 -25
- package/src/sdk/board-catalog-sync.ts +4 -25
- package/src/strategy.ts +2265 -2309
- package/src/toolchain/debug-config.ts +264 -514
- package/src/toolchain/env-check.ts +279 -285
- package/src/toolchain/index.ts +1703 -1286
- package/src/toolchain/runners.ts +80 -0
- package/src/toolchain/scaffold.ts +296 -296
- package/src/toolchain/west-discover.ts +35 -13
- package/src/toolchain/west-spawn.ts +174 -168
- package/dist/async/timer-polyfill.d.ts +0 -10
- package/dist/async/timer-polyfill.js +0 -95
- package/dist/chips/board-overrides.d.ts +0 -7
- package/dist/chips/board-overrides.js +0 -11
- package/dist/chips/esp32.d.ts +0 -2
- package/dist/chips/esp32.js +0 -71
- package/dist/chips/esp32s3.d.ts +0 -2
- package/dist/chips/esp32s3.js +0 -103
- package/dist/chips/soc/.d.ts +0 -2
- package/dist/chips/soc/.js +0 -129
- package/dist/chips/soc/esp32.d.ts +0 -2
- package/dist/chips/soc/esp32.js +0 -120
- package/dist/chips/soc/esp32c3.d.ts +0 -2
- package/dist/chips/soc/esp32c3.js +0 -90
- package/dist/chips/soc/esp32c6.d.ts +0 -2
- package/dist/chips/soc/esp32c6.js +0 -109
- package/dist/chips/soc/esp32s3.d.ts +0 -2
- package/dist/chips/soc/esp32s3.js +0 -189
- package/dist/chips/soc/index.d.ts +0 -2
- package/dist/chips/soc/index.js +0 -23
- package/dist/chips/soc/nrf52840.d.ts +0 -2
- package/dist/chips/soc/nrf52840.js +0 -130
- package/dist/chips/soc/rp2040.d.ts +0 -2
- package/dist/chips/soc/rp2040.js +0 -141
- package/dist/chips/soc/rp2350a.d.ts +0 -2
- package/dist/chips/soc/rp2350a.js +0 -145
- package/dist/chips/soc/samd21g18a.d.ts +0 -2
- package/dist/chips/soc/samd21g18a.js +0 -143
- package/dist/chips/soc/stm32f411xe.d.ts +0 -2
- package/dist/chips/soc/stm32f411xe.js +0 -251
- package/dist/chips/xiao-ble.d.ts +0 -2
- package/dist/chips/xiao-ble.js +0 -100
- package/dist/lowering/power.d.ts +0 -9
- package/dist/lowering/power.js +0 -60
- package/dist/lowering/pulse.d.ts +0 -7
- package/dist/lowering/pulse.js +0 -51
- package/dist/lowering/tone.d.ts +0 -10
- package/dist/lowering/tone.js +0 -63
- package/dist/lowering/worker-backing.d.ts +0 -14
- package/dist/lowering/worker-backing.js +0 -79
- package/dist/lowering/worker.d.ts +0 -6
- package/dist/lowering/worker.js +0 -14
- package/dist/sdk/board-data.generated.d.ts +0 -2
- package/dist/sdk/board-data.generated.js +0 -4
- package/dist/sdk/catalog-walker.d.ts +0 -90
- package/dist/sdk/catalog-walker.js +0 -682
- package/dist/sdk/dts-reader.d.ts +0 -83
- package/dist/sdk/dts-reader.js +0 -596
- package/src/debug-codegen.ts +0 -207
package/src/doctor.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
2
|
// @typecad/framework-zephyr — Zephyr environment doctor
|
|
3
3
|
//
|
|
4
|
-
// `
|
|
4
|
+
// `typecad-hal doctor` (Zephyr framework) — verify west (the Zephyr build tool)
|
|
5
5
|
// is installed + responsive, the Zephyr RTOS is inside the framework's declared
|
|
6
6
|
// compat range, and the configured board target exists in the checkout. Exits 0
|
|
7
7
|
// if the environment is OK, non-zero otherwise. Follows the same contract
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { existsSync, readFileSync } from 'node:fs';
|
|
13
13
|
import { join } from 'node:path';
|
|
14
14
|
import * as ui from '@typecad/cuttlefish/utils/ui';
|
|
15
|
-
import {
|
|
15
|
+
import { loadTypecadConfig } from '@typecad/cuttlefish/config-loader';
|
|
16
16
|
import { checkZephyrEnv } from './toolchain/env-check.js';
|
|
17
17
|
import { PINNED_ZEPHYR_MANIFEST_REV, PINNED_ZEPHYR_SDK_VERSION, sdkFingerprint } from '@typecad/cuttlefish/board-catalog';
|
|
18
18
|
import { resolveChipFromBoard } from './chips/resolve.js';
|
|
@@ -26,7 +26,7 @@ export function runDoctor(): void {
|
|
|
26
26
|
ui.printHeader();
|
|
27
27
|
ui.printStep('Checking Zephyr environment...');
|
|
28
28
|
|
|
29
|
-
const config =
|
|
29
|
+
const config = loadTypecadConfig(process.cwd());
|
|
30
30
|
const buildTarget = config?.buildTarget;
|
|
31
31
|
|
|
32
32
|
const result = checkZephyrEnv(buildTarget);
|
|
@@ -71,7 +71,7 @@ export function runDoctor(): void {
|
|
|
71
71
|
ui.printInfo(`Board target .... ${buildTarget}${arrow}`);
|
|
72
72
|
}
|
|
73
73
|
} else {
|
|
74
|
-
ui.printInfo('(no buildTarget in
|
|
74
|
+
ui.printInfo('(no buildTarget in typecad-hal.config.ts — skipping board check)');
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// Probe methods — from the board package's table, via the board constants
|
|
@@ -94,7 +94,7 @@ export function generateCustomBoard(
|
|
|
94
94
|
'# package (or add a board package) instead of this file.',
|
|
95
95
|
'board:',
|
|
96
96
|
` name: ${name}`,
|
|
97
|
-
` full_name:
|
|
97
|
+
` full_name: TypeCAD custom board (${chip.soc})`,
|
|
98
98
|
` vendor: ${CUSTOM_BOARD_VENDOR}`,
|
|
99
99
|
' socs:',
|
|
100
100
|
` - name: ${soc}`,
|
|
@@ -126,7 +126,7 @@ export function generateCustomBoard(
|
|
|
126
126
|
...cb.dtsIncludes.map((inc) => `#include <${inc}>`),
|
|
127
127
|
'',
|
|
128
128
|
'/ {',
|
|
129
|
-
` model = "
|
|
129
|
+
` model = "TypeCAD custom board (${chip.soc})";`,
|
|
130
130
|
` compatible = "${CUSTOM_BOARD_VENDOR},${name.replace(/_/g, '-')}";`,
|
|
131
131
|
'',
|
|
132
132
|
' chosen {',
|
package/src/dt-config/kconfig.ts
CHANGED
|
@@ -341,12 +341,16 @@ export function resolveKconfigFragments(
|
|
|
341
341
|
// pinned-CA handshake fails with EPERM at connect (the insecure path
|
|
342
342
|
// skips verification, so it works either way).
|
|
343
343
|
m.set('CONFIG_MBEDTLS_X509_CRT_PARSE_C', 'y');
|
|
344
|
-
// KNOWN LIMITATION on this Zephyr tree: pinned-CA (verified TLS)
|
|
345
|
-
// connect — the tf-psa-crypto mbedTLS
|
|
346
|
-
// (RSA public-key parse + PEM/DER glue)
|
|
347
|
-
// select pulls in, and forcing the extra
|
|
348
|
-
//
|
|
349
|
-
//
|
|
344
|
+
// KNOWN LIMITATION on this Zephyr tree: pinned-CA (verified TLS) was
|
|
345
|
+
// observed failing at connect with EPERM — the tf-psa-crypto mbedTLS
|
|
346
|
+
// needs a wider symbol matrix (RSA public-key parse + PEM/DER glue)
|
|
347
|
+
// than the single-ciphersuite select pulls in, and forcing the extra
|
|
348
|
+
// symbols regressed the insecure path (two hardware cycles proved it
|
|
349
|
+
// upstream). CAVEAT: that diagnosis predates the 2026-09 fix of the
|
|
350
|
+
// request-fact reset ordering (every option — including caCert — was
|
|
351
|
+
// being wiped before each send, which alone reproduces connect
|
|
352
|
+
// failures); the matrix limitation needs a hardware re-run to confirm
|
|
353
|
+
// it still applies. insecure() HTTPS and no-CA https are unaffected.
|
|
350
354
|
// Handshake/protocol buffers allocate from the mbedTLS heap; MBEDTLS_HEAP_SIZE
|
|
351
355
|
// must hold ~2x MBEDTLS_SSL_MAX_CONTENT_LEN plus working state. 65000 fits on
|
|
352
356
|
// the ESP32; mbedTLS requires the full libc and PEM (not DER) cert format.
|
|
@@ -400,12 +404,14 @@ export function resolveKconfigFragments(
|
|
|
400
404
|
// pinned-CA handshake fails with EPERM at connect (the insecure path
|
|
401
405
|
// skips verification, so it works either way).
|
|
402
406
|
m.set('CONFIG_MBEDTLS_X509_CRT_PARSE_C', 'y');
|
|
403
|
-
// KNOWN LIMITATION on this Zephyr tree: pinned-CA (verified TLS)
|
|
404
|
-
// connect — the tf-psa-crypto mbedTLS
|
|
405
|
-
// (RSA public-key parse + PEM/DER glue)
|
|
406
|
-
// select pulls in
|
|
407
|
-
//
|
|
408
|
-
//
|
|
407
|
+
// KNOWN LIMITATION on this Zephyr tree: pinned-CA (verified TLS) was
|
|
408
|
+
// observed failing at connect with EPERM — the tf-psa-crypto mbedTLS
|
|
409
|
+
// needs a wider symbol matrix (RSA public-key parse + PEM/DER glue)
|
|
410
|
+
// than the single-ciphersuite select pulls in. CAVEAT: that diagnosis
|
|
411
|
+
// was made on the HTTPS path and predates the 2026-09 request-fact
|
|
412
|
+
// reset-ordering fix (options were wiped before every send, which
|
|
413
|
+
// alone reproduces connect failures); it is shared here because mqtts
|
|
414
|
+
// pins its CA through the same matrix — re-verify on hardware.
|
|
409
415
|
m.set('CONFIG_MBEDTLS_ENABLE_HEAP', 'y');
|
|
410
416
|
// 2x SSL_MAX_CONTENT_LEN record buffers + CA-chain parse state +
|
|
411
417
|
// handshake working memory. 65000 fit insecure-mode handshakes but the
|