Skip to main content

blink

The canonical first program: toggle the RGB-red LED pad as a plain digital GPIO. Upstream's examples/README.md lists it first — start here, before anything else. New in v0.14.0.

It uses the bare GPIO calls — alp_gpio_open() / alp_gpio_configure() / alp_gpio_write() / alp_gpio_close() — with no block helper, so nothing sits between your code and the pad.

Source: examples/peripheral-io/blink/.

What it does

  1. Opens the RGB-red LED pad as a GPIO with alp_gpio_open().
  2. Configures it as an output with alp_gpio_configure().
  3. Toggles it with alp_gpio_write(), printing the level and the returned status each time.
  4. Closes the handle with alp_gpio_close() and prints [blink] done.

It builds unmodified for both EVKs — the pad differs, the source does not:

BoardLED pad instance
E1M EVKALP_E1M_GPIO_PWM0
E1M-X EVKALP_E1M_X_GPIO_PWM5

board.yaml

The load-bearing part — one SoM, one preset, one pin, one core with one peripheral:

som:
sku: E1M-AEN801

preset: e1m-evk

pins:
- { e1m: E1M_GPIO_PWM0, macro: EVK_PIN_LED_RED, doc: "RGB LED red -- the PWM0 pad as a digital GPIO" }

cores:
m55_hp:
peripherals: [gpio]

Expected output

Real hardware, either EVK:

[blink] init led=BOARD_PIN_LED_RED
[blink] led=1 status=0
[blink] led=0 status=0
...
[blink] done

The LED visibly toggles about five times a second. Under native_sim the output has the same shape, minus photons.

Status

Report this one honestly — the parts that are bench-measured and the parts that are not:

  • Bench-measured (2026-07-28) — the RED/GREEN pin choice and the pad swap between the two EVKs.
  • Twister coveragenative_sim / native_sim/native/64 only, with the harness matching on the regex \[blink\] done. There is no AEN801 platform in platform_allow.
  • Real silicon — the overlays exist for a tan build, but no dated silicon PASS capture is published for the full run. Treat the hardware block above as the expected shape, not as a citation.

See also

Questions about this page? Discuss in Community Forum