---
title: "Hello World"
description: "The canonical \"first program\" for the Alp SDK. No peripherals, no chips, no board-specific wiring — just the boot path plus a periodic printf loop, so you can confirm your toolchain, flash flow, and log console are wired correctly before chasing harder bugs."
source: https://docs.alplab.ai/sdk/examples/hello-world
---

# `hello-world`

The canonical "first program" for the Alp SDK. No peripherals, no chips, no board-specific wiring — just the boot path plus a periodic `printf` loop, so you can confirm your toolchain, flash flow, and log console are wired correctly *before* chasing harder bugs.

If `[hello] tick 0` never appears, the suspect list is short: the toolchain built for the wrong core/board, the image flashed but the boot vector / secure-state config won't let it start, or the app is running fine and your terminal is on the wrong UART.

Source: [`examples/peripheral-io/hello-world/`](https://github.com/alplabai/alp-sdk/tree/main/examples/peripheral-io/hello-world).

## What it does

1. Calls `alp_init()` to bring up the SDK runtime.
2. Prints a banner, then five `[hello] tick N` lines one second apart via `alp_delay_ms(1000)`.
3. Demonstrates both halves of the capability API: `ALP_HAS(HELIUM_MVE)` (a compile-time constant expression — the unused branch disappears from the binary) and `alp_has(ALP_CAP_ID_HW_I2C)` (the runtime equivalent).
4. Prints `[hello] done`.

The tick count is capped at 5 so the `native_sim` run stays inside twister's timeout. The source carries a commented-out `TICKS_ON_REAL_SILICON` block showing the forever-loop shape production firmware would use instead.

## `board.yaml`

The minimal shape: one core, an empty `peripherals:` list. `prj.conf` stays empty — every `CONFIG_*` comes from the loader-generated `alp.conf`.

```yaml
som:
  sku: E1M-AEN801

preset: e1m-evk
supported_boards:
  - e1m-evk
  - e1m-x-evk

cores:
  m55_hp:
    app: ./src
    # No peripherals — this example exercises only the boot path
    # and printf, both part of the Zephyr baseline.
    peripherals: []

diagnostics:
  log_level: info
```

An empty `peripherals:` list is not the same as no core: the loader still emits the SoC + board configs the SoM topology requires, so the app boots normally.

## Expected output

```
[hello] Alp SDK hello-world starting
[hello] tick 0
[hello] tick 1
[hello] tick 2
[hello] tick 3
[hello] tick 4
[hello] no Helium MVE on this SoC -- scalar path
[hello] HW I2C available (could probe sensors here)
[hello] done
```

The capability lines flip with the target: a Helium-capable SoC prints `this build targets a Helium-capable SoC` instead.

## Where the output lands

| SoM family | Console route |
|---|---|
| E1M-AEN | E1M `UART0` → the on-board RP2040 USB serial port on `J5` of the E1M EVK, through console switch `S7` (115200 8N1) |
| E1M-V2N / V2N-M1 | Silicon Labs CP2102 (`U29`) on USB-C `J27` of the E1M-X EVK, selected by jumpers `P11` and `P14` (115200 8N1) |
| `native_sim` | Host binary stdout |

The SDK's recommended cross-platform terminal is `tio` — one binary, one syntax on Linux, macOS, and Windows:

```bash
tio -b 115200 <your-serial-device>
```

## Status

Builds and runs on `native_sim/native/64`; the twister harness latches on `[hello] done`. Two rows ship — one per EVK route table (`ALP_BOARD_E1M_EVK` / `ALP_BOARD_E1M_X_EVK`).

## See also

- [Quick start](https://docs.alplab.ai/sdk/quick-start) — the first example end-to-end
- [`uart-hello-world`](https://docs.alplab.ai/sdk/examples/uart-hello-world) — the same heartbeat, but out a UART you chose
- [`gpio-button-led`](https://docs.alplab.ai/sdk/examples/gpio-button-led) — the next step once the console is proven
- [`board.yaml` reference](https://docs.alplab.ai/sdk/board-yaml)
- [Examples overview](https://docs.alplab.ai/sdk/examples/overview)
