@kvell007/embed-labs-cli 0.1.0-alpha.50 → 0.1.0-alpha.52
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/README.md +32 -16
- package/dist/index.js +63 -23
- package/dist/index.js.map +1 -1
- package/dist/install-progress.js +2 -1
- package/dist/install-progress.js.map +1 -1
- package/dist/local-toolchain.d.ts +15 -0
- package/dist/local-toolchain.js +114 -26
- package/dist/local-toolchain.js.map +1 -1
- package/package.json +3 -3
package/dist/install-progress.js
CHANGED
|
@@ -9,7 +9,8 @@ const nativePackages = {
|
|
|
9
9
|
"darwin-arm64": "@embed-labs/local-bridge-darwin-arm64",
|
|
10
10
|
"linux-x64": "@embed-labs/local-bridge-linux-x64",
|
|
11
11
|
"linux-arm64": "@embed-labs/local-bridge-linux-arm64",
|
|
12
|
-
"win32-x64": "@embed-labs/local-bridge-win32-x64"
|
|
12
|
+
"win32-x64": "@embed-labs/local-bridge-win32-x64",
|
|
13
|
+
"win32-arm64": "@embed-labs/local-bridge-win32-arm64"
|
|
13
14
|
};
|
|
14
15
|
async function main() {
|
|
15
16
|
if (phase === "preinstall") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-progress.js","sourceRoot":"","sources":["../src/install-progress.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9E,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,MAAM,GAAG,GAAG,QAAQ,EAAE,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ACvE,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,eAAe,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,aAAa,CAAC,GAAG,EAAE,qBAAqB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACrG,CAAC,CAAC,CAAC"}
|
|
@@ -160,6 +160,10 @@ export interface LocalToolchainListOptions extends LocalToolchainLatestOptions {
|
|
|
160
160
|
installRoot?: string;
|
|
161
161
|
installedOnly?: boolean;
|
|
162
162
|
}
|
|
163
|
+
export interface LocalToolchainUninstallOptions {
|
|
164
|
+
boardId?: string;
|
|
165
|
+
installRoot?: string;
|
|
166
|
+
}
|
|
163
167
|
export interface LocalToolchainEnvironmentRecord {
|
|
164
168
|
board_id: string;
|
|
165
169
|
package_id: string;
|
|
@@ -210,6 +214,16 @@ export interface LocalToolchainListResult {
|
|
|
210
214
|
registry_path: string;
|
|
211
215
|
environments: LocalToolchainEnvironmentRecord[];
|
|
212
216
|
}
|
|
217
|
+
export interface LocalToolchainUninstallResult {
|
|
218
|
+
board_id: string;
|
|
219
|
+
install_root: string;
|
|
220
|
+
registry_path: string;
|
|
221
|
+
removed: boolean;
|
|
222
|
+
removed_paths: string[];
|
|
223
|
+
removed_registry_entry: boolean;
|
|
224
|
+
remaining_installed_boards: string[];
|
|
225
|
+
observed_at: string;
|
|
226
|
+
}
|
|
213
227
|
export interface LocalToolchainDownloadPlan {
|
|
214
228
|
channel_url: string;
|
|
215
229
|
manifest_url: string;
|
|
@@ -267,6 +281,7 @@ export declare function latestLocalToolchain(options?: LocalToolchainLatestOptio
|
|
|
267
281
|
export declare function currentLocalToolchain(installRoot?: string, boardId?: string): Promise<LocalToolchainCurrentResult>;
|
|
268
282
|
export declare function listLocalToolchainEnvironments(options?: LocalToolchainListOptions): Promise<LocalToolchainListResult>;
|
|
269
283
|
export declare function installLocalToolchain(options?: LocalToolchainInstallOptions): Promise<LocalToolchainInstallResult>;
|
|
284
|
+
export declare function uninstallLocalToolchain(options?: LocalToolchainUninstallOptions): Promise<LocalToolchainUninstallResult>;
|
|
270
285
|
export declare function validateLocalToolchain(input?: string | {
|
|
271
286
|
releaseRoot?: string;
|
|
272
287
|
mode?: string;
|
package/dist/local-toolchain.js
CHANGED
|
@@ -8,7 +8,6 @@ import { Readable } from "node:stream";
|
|
|
8
8
|
import { pipeline } from "node:stream/promises";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
const DEFAULT_RELEASE_ROOT = "/Volumes/LLVM-TSPI/tspi-rk3566-llvm-release-minimal";
|
|
11
|
-
const DEFAULT_QT_SMOKE_SOURCE = "/Users/kvell/kk-project/DBT-Agent-Project/llvm-build-tspi/qt-smoke";
|
|
12
11
|
const DEFAULT_BOARD_ID = "taishanpi-1m-rk3566";
|
|
13
12
|
const PICO2W_RP2350_BOARD_ID = "pico2w-rp2350-monitor";
|
|
14
13
|
const COLOREASYPICO2_RP2350_BOARD_ID = "coloreasypico2-rp2350-monitor";
|
|
@@ -23,13 +22,13 @@ const BUILT_IN_CHANNEL = {
|
|
|
23
22
|
{ id: "embedlabs.tools.common.llvm", version: "22.1.3", manifest: "" },
|
|
24
23
|
{ id: "embedlabs.tools.common.arm-none-eabi", version: "15.2.rel1", manifest: "" },
|
|
25
24
|
{ id: "embedlabs.tools.common.e2fsprogs", version: "1.0.0", manifest: "" },
|
|
26
|
-
{ id: "embedlabs.tools.runtime.qtquick-live-preview", version: "1.0.
|
|
27
|
-
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "1.0.
|
|
25
|
+
{ id: "embedlabs.tools.runtime.qtquick-live-preview", version: "1.0.33", manifest: "" },
|
|
26
|
+
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "1.0.33", manifest: "" },
|
|
28
27
|
{ id: "embedlabs.family.rk356x", version: "1.0.0", manifest: "" },
|
|
29
28
|
{ id: "embedlabs.family.rp2350", version: "1.0.0", manifest: "" },
|
|
30
|
-
{ id: "embedlabs.board.taishanpi.1m-rk3566", version: "1.0.
|
|
31
|
-
{ id: "embedlabs.board.pico2w.rp2350-monitor", version: "1.0.
|
|
32
|
-
{ id: "embedlabs.board.coloreasypico2.rp2350-monitor", version: "1.0.
|
|
29
|
+
{ id: "embedlabs.board.taishanpi.1m-rk3566", version: "1.0.33", manifest: "" },
|
|
30
|
+
{ id: "embedlabs.board.pico2w.rp2350-monitor", version: "1.0.33", manifest: "" },
|
|
31
|
+
{ id: "embedlabs.board.coloreasypico2.rp2350-monitor", version: "1.0.33", manifest: "" }
|
|
33
32
|
]
|
|
34
33
|
};
|
|
35
34
|
const BUILT_IN_MANIFESTS = {
|
|
@@ -68,7 +67,7 @@ const BUILT_IN_MANIFESTS = {
|
|
|
68
67
|
"embedlabs.tools.runtime.qtquick-live-preview": {
|
|
69
68
|
schema: "embedlabs.package.v1",
|
|
70
69
|
id: "embedlabs.tools.runtime.qtquick-live-preview",
|
|
71
|
-
version: "1.0.
|
|
70
|
+
version: "1.0.33",
|
|
72
71
|
kind: "tools",
|
|
73
72
|
hosts: ["darwin-arm64", "linux-x86_64"],
|
|
74
73
|
provides: ["qtquick.live_preview", "qtquick.live_preview.inspector", "qtquick.live_preview.feedback"]
|
|
@@ -76,7 +75,7 @@ const BUILT_IN_MANIFESTS = {
|
|
|
76
75
|
"embedlabs.tools.runtime.rp2350-monitor": {
|
|
77
76
|
schema: "embedlabs.package.v1",
|
|
78
77
|
id: "embedlabs.tools.runtime.rp2350-monitor",
|
|
79
|
-
version: "1.0.
|
|
78
|
+
version: "1.0.33",
|
|
80
79
|
kind: "tools",
|
|
81
80
|
hosts: ["darwin-arm64", "linux-x86_64"],
|
|
82
81
|
provides: ["rp2350.monitor.cli", "rp2350.monitor.logic_analyzer", "rp2350.monitor.logic_decode"]
|
|
@@ -101,13 +100,13 @@ const BUILT_IN_MANIFESTS = {
|
|
|
101
100
|
family: "rp2350",
|
|
102
101
|
requires: [
|
|
103
102
|
{ id: "embedlabs.tools.common.arm-none-eabi", version: "15.x", roles: ["compile", "uf2"] },
|
|
104
|
-
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.
|
|
103
|
+
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.33", roles: ["hardware-control", "logic-analyzer", "debug-probe"] }
|
|
105
104
|
]
|
|
106
105
|
},
|
|
107
106
|
"embedlabs.board.taishanpi.1m-rk3566": {
|
|
108
107
|
schema: "embedlabs.package.v1",
|
|
109
108
|
id: "embedlabs.board.taishanpi.1m-rk3566",
|
|
110
|
-
version: "1.0.
|
|
109
|
+
version: "1.0.33",
|
|
111
110
|
kind: "board",
|
|
112
111
|
family: "rk356x",
|
|
113
112
|
board: "TaishanPi",
|
|
@@ -117,14 +116,14 @@ const BUILT_IN_MANIFESTS = {
|
|
|
117
116
|
{ id: "embedlabs.tools.vendor.rockchip", version: "^1.0.0", roles: ["flash", "resource-image"] },
|
|
118
117
|
{ id: "embedlabs.tools.common.llvm", version: "22.x", roles: ["compile"] },
|
|
119
118
|
{ id: "embedlabs.tools.common.e2fsprogs", version: "^1.0.0", roles: ["userdata-image"] },
|
|
120
|
-
{ id: "embedlabs.tools.runtime.qtquick-live-preview", version: "^1.0.
|
|
119
|
+
{ id: "embedlabs.tools.runtime.qtquick-live-preview", version: "^1.0.33", roles: ["qtquick-preview"] }
|
|
121
120
|
],
|
|
122
121
|
build_modes: ["local-llvm"]
|
|
123
122
|
},
|
|
124
123
|
"embedlabs.board.pico2w.rp2350-monitor": {
|
|
125
124
|
schema: "embedlabs.package.v1",
|
|
126
125
|
id: "embedlabs.board.pico2w.rp2350-monitor",
|
|
127
|
-
version: "1.0.
|
|
126
|
+
version: "1.0.33",
|
|
128
127
|
kind: "board",
|
|
129
128
|
display_name: "Pico 2 W",
|
|
130
129
|
family: "rp2350",
|
|
@@ -133,14 +132,14 @@ const BUILT_IN_MANIFESTS = {
|
|
|
133
132
|
requires: [
|
|
134
133
|
{ id: "embedlabs.family.rp2350", version: "^1.0.0" },
|
|
135
134
|
{ id: "embedlabs.tools.common.arm-none-eabi", version: "15.x", roles: ["compile", "uf2", "picotool"] },
|
|
136
|
-
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.
|
|
135
|
+
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.33", roles: ["hardware-control", "logic-analyzer", "debug-probe"] }
|
|
137
136
|
],
|
|
138
137
|
build_modes: ["local-pico-sdk", "optional-rp2350-monitor"]
|
|
139
138
|
},
|
|
140
139
|
"embedlabs.board.coloreasypico2.rp2350-monitor": {
|
|
141
140
|
schema: "embedlabs.package.v1",
|
|
142
141
|
id: "embedlabs.board.coloreasypico2.rp2350-monitor",
|
|
143
|
-
version: "1.0.
|
|
142
|
+
version: "1.0.33",
|
|
144
143
|
kind: "board",
|
|
145
144
|
display_name: "ColorEasyPICO2",
|
|
146
145
|
family: "rp2350",
|
|
@@ -149,7 +148,7 @@ const BUILT_IN_MANIFESTS = {
|
|
|
149
148
|
requires: [
|
|
150
149
|
{ id: "embedlabs.family.rp2350", version: "^1.0.0" },
|
|
151
150
|
{ id: "embedlabs.tools.common.arm-none-eabi", version: "15.x", roles: ["compile", "uf2", "picotool"] },
|
|
152
|
-
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.
|
|
151
|
+
{ id: "embedlabs.tools.runtime.rp2350-monitor", version: "^1.0.33", roles: ["hardware-control", "logic-analyzer", "debug-probe"] }
|
|
153
152
|
],
|
|
154
153
|
build_modes: ["local-pico-sdk", "optional-rp2350-monitor"]
|
|
155
154
|
}
|
|
@@ -372,7 +371,10 @@ export async function listLocalToolchainEnvironments(options = {}) {
|
|
|
372
371
|
}
|
|
373
372
|
: undefined;
|
|
374
373
|
const updateAvailable = !!installed?.version && installed.version !== latestVersion;
|
|
375
|
-
const
|
|
374
|
+
const effectiveHostSupport = download || installed
|
|
375
|
+
? { supported: true, unsupportedPackages: [] }
|
|
376
|
+
: hostSupport;
|
|
377
|
+
const status = !effectiveHostSupport.supported
|
|
376
378
|
? "unsupported_host"
|
|
377
379
|
: updateAvailable
|
|
378
380
|
? "update_available"
|
|
@@ -380,7 +382,11 @@ export async function listLocalToolchainEnvironments(options = {}) {
|
|
|
380
382
|
? "installed"
|
|
381
383
|
: "available";
|
|
382
384
|
const mode = download?.default_mode ?? "qt";
|
|
383
|
-
const installModes =
|
|
385
|
+
const installModes = download
|
|
386
|
+
? localToolchainInstallModesForDownload(download)
|
|
387
|
+
: installed?.mode
|
|
388
|
+
? [installed.mode]
|
|
389
|
+
: localToolchainInstallModesForDownload(download);
|
|
384
390
|
environments.push({
|
|
385
391
|
board_id: boardId,
|
|
386
392
|
package_id: board.id,
|
|
@@ -390,8 +396,8 @@ export async function listLocalToolchainEnvironments(options = {}) {
|
|
|
390
396
|
channel: channel.channel,
|
|
391
397
|
host,
|
|
392
398
|
status,
|
|
393
|
-
supported_host:
|
|
394
|
-
unsupported_packages:
|
|
399
|
+
supported_host: effectiveHostSupport.supported,
|
|
400
|
+
unsupported_packages: effectiveHostSupport.unsupportedPackages,
|
|
395
401
|
install_modes: installModes,
|
|
396
402
|
installed,
|
|
397
403
|
latest: {
|
|
@@ -406,7 +412,7 @@ export async function listLocalToolchainEnvironments(options = {}) {
|
|
|
406
412
|
components: download?.components?.map(localToolchainEnvironmentComponent),
|
|
407
413
|
install_command: `embedlabs local toolchain install --board ${boardId} --mode ${mode}`,
|
|
408
414
|
update_command: `embedlabs local toolchain install --board ${boardId} --mode ${mode} --force`,
|
|
409
|
-
notes: environmentNotes({ boardId, status, downloadError, unsupportedPackages:
|
|
415
|
+
notes: environmentNotes({ boardId, status, downloadError, unsupportedPackages: effectiveHostSupport.unsupportedPackages })
|
|
410
416
|
});
|
|
411
417
|
}
|
|
412
418
|
const filteredEnvironments = options.installedOnly
|
|
@@ -505,6 +511,69 @@ export async function installLocalToolchain(options = {}) {
|
|
|
505
511
|
await rm(tempDir, { recursive: true, force: true });
|
|
506
512
|
}
|
|
507
513
|
}
|
|
514
|
+
export async function uninstallLocalToolchain(options = {}) {
|
|
515
|
+
if (!options.boardId?.trim()) {
|
|
516
|
+
throw new Error("board_id is required for local toolchain uninstall.");
|
|
517
|
+
}
|
|
518
|
+
const boardId = normalizeBoardId(options.boardId);
|
|
519
|
+
const installRoot = resolveInstallRoot(options.installRoot);
|
|
520
|
+
const registryPath = localToolchainRegistryPath(installRoot);
|
|
521
|
+
const boardRoot = resolve(installRoot, "toolchains", boardId);
|
|
522
|
+
const removedPaths = [];
|
|
523
|
+
if (await pathExists(boardRoot)) {
|
|
524
|
+
await rm(boardRoot, { recursive: true, force: true });
|
|
525
|
+
removedPaths.push(boardRoot);
|
|
526
|
+
}
|
|
527
|
+
let removedRegistryEntry = false;
|
|
528
|
+
let existing = {};
|
|
529
|
+
try {
|
|
530
|
+
existing = JSON.parse(await readFile(registryPath, "utf8"));
|
|
531
|
+
}
|
|
532
|
+
catch {
|
|
533
|
+
existing = {};
|
|
534
|
+
}
|
|
535
|
+
const environments = isRecord(existing.environments)
|
|
536
|
+
? { ...existing.environments }
|
|
537
|
+
: {};
|
|
538
|
+
if (Object.prototype.hasOwnProperty.call(environments, boardId)) {
|
|
539
|
+
delete environments[boardId];
|
|
540
|
+
removedRegistryEntry = true;
|
|
541
|
+
}
|
|
542
|
+
const topLevelBoard = normalizeBoardId(String(existing.board_id ?? DEFAULT_BOARD_ID));
|
|
543
|
+
const topLevelPointsToBoard = topLevelBoard === boardId && typeof existing.release_root === "string";
|
|
544
|
+
const cleaned = { ...existing, environments, updated_at: new Date().toISOString() };
|
|
545
|
+
if (topLevelPointsToBoard) {
|
|
546
|
+
for (const key of [
|
|
547
|
+
"installed",
|
|
548
|
+
"board_id",
|
|
549
|
+
"version",
|
|
550
|
+
"channel",
|
|
551
|
+
"host",
|
|
552
|
+
"mode",
|
|
553
|
+
"release_root",
|
|
554
|
+
"packages",
|
|
555
|
+
"source",
|
|
556
|
+
"installed_components"
|
|
557
|
+
]) {
|
|
558
|
+
delete cleaned[key];
|
|
559
|
+
}
|
|
560
|
+
removedRegistryEntry = true;
|
|
561
|
+
}
|
|
562
|
+
if (removedRegistryEntry || Object.keys(environments).length > 0 || Object.keys(existing).length > 0) {
|
|
563
|
+
await mkdir(dirname(registryPath), { recursive: true });
|
|
564
|
+
await writeFile(registryPath, `${JSON.stringify(cleaned, null, 2)}\n`, "utf8");
|
|
565
|
+
}
|
|
566
|
+
return {
|
|
567
|
+
board_id: boardId,
|
|
568
|
+
install_root: installRoot,
|
|
569
|
+
registry_path: registryPath,
|
|
570
|
+
removed: removedPaths.length > 0 || removedRegistryEntry,
|
|
571
|
+
removed_paths: removedPaths,
|
|
572
|
+
removed_registry_entry: removedRegistryEntry,
|
|
573
|
+
remaining_installed_boards: Object.keys(environments).sort(),
|
|
574
|
+
observed_at: new Date().toISOString()
|
|
575
|
+
};
|
|
576
|
+
}
|
|
508
577
|
export async function validateLocalToolchain(input) {
|
|
509
578
|
const releaseRoot = typeof input === "string" ? input : input?.releaseRoot;
|
|
510
579
|
const mode = normalizeLocalToolchainInstallMode(typeof input === "string" ? undefined : input?.mode);
|
|
@@ -661,6 +730,8 @@ async function taishanPiPortableTextFiles(releaseRoot) {
|
|
|
661
730
|
}
|
|
662
731
|
function taishanPiPortablePathReplacements(releaseRoot) {
|
|
663
732
|
const normalizedRoot = resolve(releaseRoot);
|
|
733
|
+
// Legacy development paths are recognized only so older staged packages can
|
|
734
|
+
// be rewritten into a portable installed layout during validation/repair.
|
|
664
735
|
return [
|
|
665
736
|
["@EMBEDLABS_RELEASE_ROOT@", normalizedRoot],
|
|
666
737
|
["/Users/kvell/kk-project/DBT-Agent-Project/llvm-build-tspi/scripts/qt6-rk3566-llvm-toolchain.cmake", join(normalizedRoot, "toolchain", "qt6-rk3566-llvm-toolchain.cmake")],
|
|
@@ -767,6 +838,11 @@ function requiredLocalToolchainChecks(mode, boardId) {
|
|
|
767
838
|
return [...base, ...compile, ...qt, ...images, ...full];
|
|
768
839
|
}
|
|
769
840
|
function requiredRp2350MonitorChecks(mode) {
|
|
841
|
+
const armToolchainDir = rp2350ArmToolchainDirName();
|
|
842
|
+
const executableSuffix = platform() === "win32" ? ".exe" : "";
|
|
843
|
+
const monitorLauncher = platform() === "win32"
|
|
844
|
+
? "toolkit-runtime/rp2350-monitor/ui/bin/embed-labs-logic-analyzer.cmd"
|
|
845
|
+
: "toolkit-runtime/rp2350-monitor/ui/bin/embed-labs-logic-analyzer";
|
|
770
846
|
const base = [
|
|
771
847
|
["release root", "."],
|
|
772
848
|
];
|
|
@@ -774,8 +850,8 @@ function requiredRp2350MonitorChecks(mode) {
|
|
|
774
850
|
["RP2350 Monitor UI", "toolkit-runtime/rp2350-monitor/ui/index.html"],
|
|
775
851
|
["RP2350 Monitor bridge", "toolkit-runtime/rp2350-monitor/ui/bridge/rpmon_bridge.py"],
|
|
776
852
|
["RP2350 Monitor CLI", "toolkit-runtime/rp2350-monitor/tools/rpmon_cli.py"],
|
|
777
|
-
["RP2350 picotool",
|
|
778
|
-
["RP2350 Monitor logic analyzer",
|
|
853
|
+
["RP2350 picotool", `toolkit-runtime/rp2350-monitor/tools/picotool${executableSuffix}`],
|
|
854
|
+
["RP2350 Monitor logic analyzer", monitorLauncher],
|
|
779
855
|
["RP2350 Monitor AI operation contract", "toolkit-runtime/rp2350-monitor/ui/docs/ai-operation-contract.md"],
|
|
780
856
|
["package metadata", "meta"]
|
|
781
857
|
];
|
|
@@ -790,9 +866,9 @@ function requiredRp2350MonitorChecks(mode) {
|
|
|
790
866
|
const compile = [
|
|
791
867
|
["Pico SDK", "rp2350-sdk/pico-sdk/pico_sdk_init.cmake"],
|
|
792
868
|
["Pico SDK CMakeLists", "rp2350-sdk/pico-sdk/CMakeLists.txt"],
|
|
793
|
-
["ARM bare-metal C compiler",
|
|
794
|
-
["ARM bare-metal C++ compiler",
|
|
795
|
-
["picotool",
|
|
869
|
+
["ARM bare-metal C compiler", `rp2350-sdk/toolchains/${armToolchainDir}/bin/arm-none-eabi-gcc${executableSuffix}`],
|
|
870
|
+
["ARM bare-metal C++ compiler", `rp2350-sdk/toolchains/${armToolchainDir}/bin/arm-none-eabi-g++${executableSuffix}`],
|
|
871
|
+
["picotool", `rp2350-sdk/picotool/install/picotool/picotool${executableSuffix}`]
|
|
796
872
|
];
|
|
797
873
|
if (mode === "compile") {
|
|
798
874
|
return [...base, ...compile, ...initialFirmware];
|
|
@@ -805,6 +881,18 @@ function requiredRp2350MonitorChecks(mode) {
|
|
|
805
881
|
}
|
|
806
882
|
return [...base, ...runtime];
|
|
807
883
|
}
|
|
884
|
+
function rp2350ArmToolchainDirName() {
|
|
885
|
+
if (platform() === "win32") {
|
|
886
|
+
return "arm-gnu-toolchain-15.2.rel1-mingw-w64-x86_64-arm-none-eabi";
|
|
887
|
+
}
|
|
888
|
+
if (platform() === "linux" && arch() === "x64") {
|
|
889
|
+
return "arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi";
|
|
890
|
+
}
|
|
891
|
+
if (platform() === "linux" && arch() === "arm64") {
|
|
892
|
+
return "arm-gnu-toolchain-15.2.rel1-aarch64-arm-none-eabi";
|
|
893
|
+
}
|
|
894
|
+
return "arm-gnu-toolchain-15.2.rel1-darwin-arm64-arm-none-eabi";
|
|
895
|
+
}
|
|
808
896
|
export async function compileTaishanPiSingleFile(options) {
|
|
809
897
|
assertAuthenticated(options.auth);
|
|
810
898
|
const releaseRoot = await resolveLocalReleaseRoot(options.releaseRoot);
|
|
@@ -835,7 +923,7 @@ export async function compileTaishanPiSingleFile(options) {
|
|
|
835
923
|
export async function buildTaishanPiQtSmoke(options) {
|
|
836
924
|
assertAuthenticated(options.auth);
|
|
837
925
|
const releaseRoot = await resolveLocalReleaseRoot(options.releaseRoot);
|
|
838
|
-
const sourceDir = resolve(options.sourceDir ??
|
|
926
|
+
const sourceDir = resolve(options.sourceDir ?? join(releaseRoot, "examples", "qt-smoke"));
|
|
839
927
|
const buildDir = resolve(options.buildDir);
|
|
840
928
|
const targetName = options.targetName ?? "qt_llvm_smoke";
|
|
841
929
|
const qtCmake = join(releaseRoot, "qt-target", "qt6-rk3566-llvm-6.8.3", "bin", "qt-cmake");
|