Skip to main content

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/.

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.

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 familyConsole route
E1M-AENAlif first USART → FTDI USB-UART on the E1M-EVK (115200 8N1)
E1M-V2N / V2N-M1Renesas SCIF → FTDI USB-UART on the E1M-X-EVK (115200 8N1)
native_simHost binary stdout

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

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

Questions about this page? Discuss in Community Forum