Skip to main content

Getting Started

This page walks you from a fresh clone to a running Alp SDK example. If you already have a Zephyr toolchain, jump to step 3.

Two ways to develop

Pick whichever fits your workflow:

  • Hand-written firmware — write C against <alp/...> headers directly. The path covered below.
  • alp-studio codegen — drag-and-drop blocks; Studio emits the same <alp/...> API. See alp-studio.

The flow at a glance:

Prerequisites

The SDK is supported equally on Linux, macOS, and Windows (native PowerShell or WSL2). Tooling versions are identical across hosts.

ToolVersionNotes
Zephyrv4.4.0Pinned by the SDK's west.yml.
Python3.10+For west, the board.yaml loader, validators.
Python depspyyaml, jsonschema, imgtoolInstalled by scripts/bootstrap.sh.
CMake3.20+find_package(Zephyr) minimum.
C compilerGCC 11+ / Clang 14+native_sim builds; cross-toolchain for real silicon.
west1.2+pip install west if your distro doesn't ship it.

Per-platform install one-liners:

Homebrew
brew install cmake ninja python git
pip3 install west

For real-silicon builds you'll also need the Zephyr SDK (zephyr-sdk-0.17.0) and a JTAG/SWD probe.

Step 1 — Clone and bootstrap

Clone + bootstrap
git clone https://github.com/alplabai/alp-sdk
cd alp-sdk
bash scripts/bootstrap.sh
source ../zephyrproject/.venv/bin/activate
export ZEPHYR_BASE="$PWD/../zephyrproject/zephyr"

scripts/bootstrap.sh creates a Zephyr workspace next to alp-sdk/, runs west update --narrow, installs west + the SDK's Python deps and an editable alp CLI into a workspace venv (zephyrproject/.venv — your system Python is never touched), and prints host-specific hints for the optional native libraries the Yocto backends need. It's idempotent, and it reuses an existing $ZEPHYR_BASE workspace when it's a compatible v4.4.x tree.

On native Windows, run the PowerShell-7+ companion instead — it lays down the same workspace + venv + editable alp CLI:

Native Windows (PowerShell)
git clone https://github.com/alplabai/alp-sdk
cd alp-sdk
pwsh scripts\bootstrap.ps1
& ..\zephyrproject\.venv\Scripts\Activate.ps1
$env:ZEPHYR_BASE = "$PWD\..\zephyrproject\zephyr"

bootstrap.ps1 won't install git / CMake / Python / Ninja for you (it prints the matching winget install line and exits if one is missing) and leaves the Arm toolchain + Zephyr SDK as manual installs. native_sim isn't available on native Windows — use WSL2 for the simulator + Yocto halves. See Installation for the full walkthrough.

Step 2 — Set up the Zephyr workspace (alternative)

If you'd rather drive west directly:

mkdir alp-workspace && cd alp-workspace
west init -m https://github.com/alplabai/alp-sdk
west update --narrow -o=--depth=1
west zephyr-export

After this the workspace contains zephyr/, the standard Zephyr modules, and alp-sdk/ mounted as a Zephyr module.

Step 3 — Build the GPIO example

The alp CLI is the single front door — from inside a project it finds board.yaml, builds every core, and (on native_sim) runs the result in one step:

cd alp-sdk/examples/peripheral-io/gpio-button-led
alp run # build for native_sim + execute

Prefer driving west directly? The same build, spelled out:

cd alp-workspace
west alp-build -b native_sim/native/64 alp-sdk/examples/peripheral-io/gpio-button-led
west build -d build -t run

Expected output:

*** Booting Zephyr OS build v4.4.0 ***
[gpio] init button=BOARD_PIN_ENCODER_SW, led=BOARD_PIN_LED_RED
[gpio] led=0 status=0
[gpio] led=1 status=0
...
[gpio] done

Either front door validates the example's board.yaml, generates alp.conf + the build-time <alp_hw_info_build.h> companion header, and delegates to west build. See the board.yaml reference for the schema.

Step 4 — Target real hardware

For an Alp Lab EVK (or your own board), the alp front door builds every core from the project's board.yaml and programs the whole system over its registered flash backends:

cd alp-sdk/examples/peripheral-io/gpio-button-led
alp build && alp flash

Driving west directly instead — swap the board flag per family:

# AEN family on the E1M EVK
west alp-build -b alp_e1m_evk_aen alp-sdk/examples/peripheral-io/gpio-button-led
west flash

# V2N family on the E1M-X EVK
west alp-build -b alp_e1m_evk_v2n alp-sdk/examples/v2n/v2n-gd32-bridge-ping
west flash

Board files live in alplabai/alp-zephyr-modules; they are pulled in automatically by west update.

To order an Alp Lab EVK, request a dev kit.

What next?

Questions about this page? Discuss in Community Forum