Skip to main content

VS Code Extension

The alplabai/alp-sdk-vscode extension is the recommended IDE for projects built against the Alp SDK. It ships an LSP-native board.yaml editing experience, command-palette wrappers around the loader, the tan CLI, and west, debug-aware orchestration for SWD / Linux-userspace / native-host targets, and it drives the same tan binary you would run headless or in CI.

The extension is debugger-aware, not a debugger — it generates, validates, inspects, and launches the right debug configuration for the active target, leaning on marus25.cortex-debug, cppdbg, and CodeLLDB for the actual attach.

Install

The extension is published as AlpLabAI.alp-sdk — publisher AlpLabAI, extension name alp-sdk. Its marketplace display name is "Alp IDE", not "Alp SDK".

SourceHow
VS Code MarketplaceSearch for Alp IDE in the Extensions panel (id AlpLabAI.alp-sdk).
.vsix artifactGrab the latest from the extension's Releases page and install via Extensions: Install from VSIX.
From sourcegit clone --recurse-submodules https://github.com/alplabai/alp-sdk-vscode && cd alp-sdk-vscode && pnpm install && pnpm run package. The submodule pins to the alp-sdk commit that owns the schema.

Requirements

  • VS Code ^1.85.0.
  • Two extension dependencies, installed automatically alongside it: redhat.vscode-yaml (the board.yaml YAML host) and marus25.cortex-debug (the MCU debug adapter).

Versions and channels

  • Current version: 0.5.2. It is merged on origin/main, but no v0.5.2 tag has been cut yet — the last tagged release is v0.5.1.
  • Channel is decided by the minor version: an odd minor (0.3.x, 0.5.x) publishes to the VS Code pre-release channel; an even minor is a stable release. The current 0.5.x line is therefore a pre-release build — that is why the Marketplace shows a pre-release badge.
  • The extension pins the tan CLI it drives: SUPPORTED_CLI_VERSION = "0.5.1". It shells the external tan binary and does not re-implement build logic.

License: Apache-2.0.

board.yaml LSP

Inline language-server support for board.yaml:

  • Completionsom.sku, preset: (board preset), inline name: / populated: / e1m_routes:, cores.<id>.os (offered only when overriding the topology default), cores.<id>.peripherals, chips, the top-level libraries: / cores.<id>.extra_libraries, cores.<id>.inference.default_arena_kib, the declarative blocks (boot:, ota:, storage:, security:, cores.<id>.memory: / power:, diagnostics.modules:), with values pulled from the metadata schemas the SDK ships under metadata/schemas/.
  • Hover — every field carries its schema description; hovering a SoM SKU shows silicon + form factor + status.
  • Diagnostics — schema errors land in the Problems panel as you type. Cross-field validator output (rules R1–R5 + warnings W4–W5) also surfaces inline, mirroring validate_board_yaml.py exit codes.
  • Document symbols — outline view shows the top-level blocks (som, preset, cores, boot, ota, storage, security, ipc, diagnostics, …) for fast navigation in large files.
  • Quick fixes — common typos (hw_rev: r0 → suggest the nearest released revision; missing required field → insert with a placeholder).
  • Effective-config preview — a side-pane that renders the resolved config after the loader applies the SoM preset, board preset, and library profiles. Useful for understanding what peripherals: actually compiles in.

Configurator panel

A GUI panel for new projects and for quick experimentation:

  • Dropdowns for every released SoM MPN + stock board preset + per-core os: override (offered only where the topology default isn't what you want).
  • Live preview of the board.yaml that will be written.
  • First-run project wizard that scaffolds a working app (CMakeLists, prj.conf placeholder, src/main.c, board overlay) from a template.

Command palette

The extension contributes the Alp: command family — 46 commands in 0.5.2 (pre-release channel). The tables below are a curated walkthrough of the ones you reach for; every title is the verbatim palette entry.

Validate + generate

CommandWhat it does
Alp: Validate board.yamlSchema + semantic validation. Same rules as the CLI's tan validate.
Alp: Generate all (zephyr-conf + dts-overlay + cmake-args + yocto-conf)Runs the loader's per-slice emit modes in one shot: zephyr-confalp.conf, dts-overlayalp.overlay, cmake-argsalp-cmake-args.txt, yocto-conf → the Yocto conf snippet.
Alp: Generate alp.conf (zephyr-conf) · Alp: Generate alp.overlay (dts-overlay) · Alp: Generate alp-cmake-args.txt (cmake-args) · Alp: Generate alp-yocto.conf (yocto-conf)Individual emit modes.
Alp: Generate native_sim overlay (native-sim-overlay)The host-simulator overlay, emitted on its own.
Alp: Preview effective config (LSP)Show the resolved config (SoM preset + board preset + library profiles applied) without writing files.
Alp: Preview build planShow the per-core build plan the orchestrator will run before building.
Alp: Inspect project stateEffective resolved config + preset origins; supports drilling into a field path.

Project & SDK setup

CommandWhat it does
Alp: Get started (walkthrough)Guided first-run walkthrough.
Alp: New project wizardScaffold a working app (CMakeLists, prj.conf placeholder, src/main.c, board overlay) from a template.
Alp: Open Existing Alp ProjectOpen + adopt an existing project workspace.
Alp: Scaffold moduleAdd a starter source/peripheral module to an existing project.
Alp: Open board configurator (GUI)The dropdown-driven configurator panel.
Alp: Open setup wizardFirst-time environment setup flow.
Alp: Bootstrap SDK environment (Zephyr + build deps)Install Zephyr + build dependencies into the workspace; runs tan bootstrap.
Alp: Select active SDK / Alp: SDK ManagerPick / manage the SDK checkout the project resolves against. The SDK Manager can list releases online, shows a truthful active-SDK badge and Deactivate action, and sits Bootstrap next to Install. Switching SDKs reconciles the west workspace.
Alp: Install tan CLI (global) / Alp: Reinstall the pinned tan CLIInstall the tan binary the extension shells, or reinstall the pinned version (0.5.1) when the local one drifts.
Alp: DependenciesThe dependency panel — what the toolchain needs, what is present, and what to install.
Alp: Switch workspace folderRe-target the active workspace folder.
Alp: Reset workspace (.west/)Reset the west workspace state by removing .west/.

Build + run

CommandWhat it does
Alp: Build (validate + generate + build)Validate + generate + build in one step; the build itself runs tan build.
Alp: Flash (single image)Flash one image to the active target.
Alp: Flash (all slices)Flash every slice of a heterogeneous build (tan flash).
Alp: Build image (assemble image bundle)Assemble the deployable image bundle (tan image).
Alp: Update workspaceFetch + update the west modules for the workspace.
Alp: Clean build (remove build dir)Remove the build directory (tan clean).
Alp: Run under native_simBuild + run the host-simulator target (tan run).
Alp: Run in Renode (simulate)Build + run under the Renode simulator (tan renode).
Alp: Toolchain doctor (opens Dependencies)Verify tool availability + project sanity; opens the Dependencies panel.
Alp: Show output logOpen the extension's output channel.

Build feedback in 0.5.x: the orchestrator's output streams live to the Alp SDK output channel, each slice reports its memory footprint via tan size, a failed slice says why it failed rather than just failing, and the finish toast can reveal the Build Plan panel.

Explore + debug

CommandWhat it does
Alp: Hardware ExplorerBrowse the resolved board's pads, routes, and populated chips.
Alp: Configure debug profile (launch.json)Resolve a debug profile and write the matching .vscode/launch.json entry.
Alp: Debug (generate profile + start session)Generate the profile and start the debug session in one step.
Alp: Debug doctor / Alp: Debug preflightVerify debug-backend prerequisites — generally, or scoped to a specific profile before launch.
Alp: Export debug support bundleSanitised archive (inspect output + doctor results + tool versions) for issue filing.
Alp: Open troubleshooting panelGuided debug-failure triage.

Alp IDE panel

Beyond the command palette the extension ships an integrated Alp IDE surface — an Activity Bar entry with sidebar views and a dedicated panel that ties the configurator, build/flash, SDK manager, and hardware explorer together in one place.

CommandWhat it does
Alp: Open Alp IDE panelFocus the Alp IDE view container.
Alp: Open HubThe hub: project state + next steps. A deprecated alias, Alp: Open Hub (deprecated alias), is still contributed for anyone with the old keybinding.
Alp: Open Alp IDE settingsExtension + project settings.
Alp: Refresh sidebar viewsRe-resolve the sidebar tree views.

Settings

The extension contributes eight settings under the alpSdk. namespace:

SettingWhat it controls
alpSdk.pathPath to the alp-sdk checkout the project resolves against.
alpSdk.pythonPathPython interpreter used for the SDK's loader / bootstrap work.
alpSdk.boardYamlPathPath to the project's board.yaml when it isn't at the default location.
alpSdk.westCwdWorking directory for west invocations.
alpSdk.cliPathExplicit path to the tan binary.
alpSdk.preferGlobalCliPrefer a globally-installed tan over the extension-managed one.
alpSdk.tanCliDownloadConsentConsent for the extension to download the tan CLI.
alpSdk.svdPathSVD file passed through to tan debug-config --svd for register-aware debugging.

Downloading tan

The extension asks for consent before it downloads the tan CLI (alpSdk.tanCliDownloadConsent), verifies the checksum of both the downloaded and the cached binary, routes downloads through your configured proxy settings, and — when your platform has no published build — explains that instead of surfacing a bare 404.

Debug surface

Three debug classes are supported, each with a dedicated launch-config generator:

ClassUsed forAdapterProbe / server
MCUZephyr + bare-metal targets, SWD/JTAG bring-up, flash + halt + stepmarus25.cortex-debugJ-Link · OpenOCD · pyOCD
Linux userspaceYocto userspace apps; remote symbolised debug over SSHcppdbg + gdbserver (or lldb-dap later)
Host / nativenative_sim, host-side tools, generator helpersCodeLLDB

The extension itself never embeds a debugger. Alp: Configure debug profile (launch.json) writes the matching .vscode/launch.json entry; the third-party adapter handles attach + breakpoints + stepping. Alp: Debug preflight verifies probe access, gdbserver reachability, or simulator availability before launch. Alp: Debug (generate profile + start session) does both in one step.

The launch configuration comes from tan — the extension no longer keeps a second draft of it — and diagnostics come from tan doctor rather than an in-process twin. Set alpSdk.svdPath to feed a device SVD through tan debug-config --svd and get register-aware views. Pressing F5 builds first, via a pre-launch task, so you never step through a stale image. MCU debugging needs marus25.cortex-debug with its Memory View and RTOS Views enabled.

For the full per-target compatibility matrix, see docs/DEBUG.md in the extension repo.

CLI

The extension does not ship a CLI of its own any more. It shells tan — the standalone, independently-versioned binary that is also the Alp SDK's sole user-facing command (ADR-0020). As of the 0.5.x line tan is a Python program, and the extension drives that Python tan, pinned to SUPPORTED_CLI_VERSION = "0.5.1"; environment setup therefore calls tan bootstrap, not a --fix flag (Python tan has none). The in-repo TypeScript CLI (packages/alp-cli) and the earlier alp binary it grew out of are retired. The same tan you get from the palette's Alp: Install tan CLI (global) is the one you run headless or in CI:

FamilyPurpose
tan validateSchema + semantic validation; structured issues.
tan generateEmit derived artifacts — zephyr-conf, dts-overlay, native-sim-overlay, cmake-args, yocto-conf, carrier-netlist.
tan bootstrapInstall the Zephyr + build dependencies for the workspace.
tan initInitialise a new project from a template.
tan scaffoldAdd starter files / modules to an existing project.
tan inspectShow the resolved config + preset origins (field-path scoped).
tan traceExplain why a resolution or generation decision was made.
tan doctorTool availability + project sanity + (optional) debug preflight.
tan support-bundleSanitised diagnostics archive.
tan debug-configResolve a named debug profile and emit a launch artifact.
tan completion <shell>Emit shell-completion script for bash / zsh / fish.

tan covers more verbs than these — the build-execution surface (tan build / flash / size / image / clean / renode / run) is the same one the tan CLI page documents.

Every command supports --format json for machine-readable output (single JSON document to stdout, prose / progress to stderr) and a stable exit-code matrix (0 success, 1 command/runtime failure, 2 validation, 3 write failure, 4 doctor/preflight failure, 5 internal). The full envelope contract is in docs/CLI.md.

Command behaviour therefore has one implementation: the extension shells tan rather than re-deriving the same outcomes, so a tan validate in CI matches what the palette runs. The LSP keeps a separate in-process path for the per-keystroke editor intelligence a subprocess can't serve.

Snippets

board.yaml and src/main.c snippets ship with the extension. Trigger with the usual Ctrl+Space; the snippets reference the same instance-ID macros as the SDK's per-peripheral examples (ALP_E1M_I2C0, ALP_E1M_GPIO_IO0, …).

Schema sync

The extension's schema-aware validation pulls from alp-sdk directly via a git submodule (alp-sdk-upstream/metadata/schemas/). When the SDK's schema evolves, the extension bumps the submodule pin in lockstep and republishes; you don't need to do anything on your side beyond updating the extension.

See also

Questions about this page? Discuss in Community Forum