alp-console
A single, shippable slot0 application that brings the alp interactive console up on the SoM's UART and — on the E1M-AEN801 — wires it to the on-module TI CC3501E Wi-Fi/BLE coprocessor plus a live RGB status LED. One app, three things to show: a Linux-like shell, on-air connectivity, and a "board is alive" indicator.
:::tip This page documents the example
The alp command tree itself is SDK infrastructure with its own reference page — see Console for the full command surface, flags, and safety tiers. This page covers the example app that hosts it.
:::
Source: examples/peripheral-io/alp-console/.
What it does
Almost nothing — and that's the lesson. Setting CONFIG_ALP_SDK_CONSOLE=y registers the whole alp command tree on the Zephyr shell at link time, so the app gets board / gpio / i2c / adc / pwm / mem / clk / reboot / companion diagnostics for free.
main() registers no commands. It only:
- Binds the companion chip (on Alif: opens the CC3501E and hands the handle to the console).
- Spawns the RGB status-LED thread.
| Surface | Command(s) | Backed by |
|---|---|---|
| Interactive shell | alp … (Tab to explore) | CONFIG_ALP_SDK_CONSOLE |
| SoM identity | alp board | HW_INFO + the on-module EEPROM |
| Companion liveness | alp companion ver / ping | CC3501E bridge (Alif) / GD32 supervisor (V2N) |
| Wi-Fi scan | alp companion wifi scan | CC3501E Wlan_Scan |
| Wi-Fi connect | alp companion wifi connect <ssid> [pass] [wpa3] | CC3501E STA join |
| BLE enable | alp companion ble enable | CC3501E NWP controller + NimBLE host |
| BLE scan | alp companion ble scan | NimBLE ble_gap_disc |
| RGB status LED | (automatic background thread) | Alif UTIMER PWM (pwm-leds) |
Wi-Fi
wifi scan lists nearby APs with channel, RSSI, and decoded security (open / wpa2 / wpa3). The security decode is worth knowing: it comes from the raw 16-bit TI SecurityInfo, whose sec-type bitmap lives in the high byte — (info >> 8) & 0x3f.
uart:~$ alp companion wifi scan
5 AP(s):
MyNetwork ch5 -43 dBm wpa3
Guest-2.4GHz ch3 -59 dBm wpa2
IoT-Hub ch6 -84 dBm open
uart:~$ alp companion wifi connect "MyNetwork" hunter2 wpa3
connecting to "MyNetwork" (wpa3)...
connected rssi=-44 dBm
ip 192.0.2.74
No passphrase means open; a trailing wpa3 token forces WPA3-SAE.
BLE
uart:~$ alp companion ble enable
BLE controller + NimBLE host up
uart:~$ alp companion ble scan
10 device(s):
66:c6:d2:91:31:26 -91 dBm ET-2870 Series
26:2a:8d:21:9d:4d -50 dBm (no name)
RGB status LED
A low-priority background thread breathes the on-board RGB LED through a rainbow on the Alif UTIMER PWM (the board overlay's pwm-leds children). The shell stays fully responsive while it runs. The thread is devicetree-guarded on led_red, so on a board without those PWM nodes (native_sim, V2N) it compiles out and nothing is spawned.
board.yaml
som:
sku: E1M-AEN801
preset: e1m-evk
cores:
a32_cluster:
os: "off"
m55_hp:
os: "off" # single-core HE app
m55_he:
app: ./src
peripherals:
- gpio # `alp gpio`
- i2c # `alp i2c`
- adc # `alp adc`
- spi # required by the CC3501E companion bridge
chips:
- cc3501e
diagnostics:
log_level: info
The console rides the board's existing chosen { zephyr,shell-uart } — no custom pins needed. The alp commands discover the peripheral buses through the EVK preset aliases.
prj.conf carries the console's own knobs:
CONFIG_ALP_SDK=y
CONFIG_ALP_SDK_CONSOLE=y
CONFIG_ALP_SDK_CONSOLE_UNSAFE=y
CONFIG_ALP_SDK_HW_INFO=y
CONFIG_SHELL=y
CONFIG_REBOOT=y
CONFIG_HWINFO=y
CONFIG_MAIN_STACK_SIZE=4096
:::warning CONFIG_ALP_SDK_CONSOLE_UNSAFE
This unlocks the write-capable verbs (mem wr, gpio write, companion gpio write). The example sets it because it's a bench build. Leave it off in field builds.
:::
Portability
main() is identical across targets; only the companion bind differs.
| Target | Companion bind |
|---|---|
| Alif (AEN801) | No companion singleton, so main() opens the CC3501E via cc3501e_bridge_bringup() and hands the handle to the console. alp companion … then reaches Wi-Fi/BLE. Guarded by CONFIG_ALP_SDK_CHIP_CC3501E. |
| V2N | The GD32 supervisor is a managed singleton inside the SDK — the bind is a no-op and alp companion reaches the GD32 automatically. Its gpio sub-commands replace the CC3501E wifi/ble ones. |
native_sim | No companion at all. The console plus every non-companion command still works, so the example builds and runs everywhere. |
Portability-lint allowlist
This example is on the SDK's example-portability lint allowlist. It reaches for Zephyr driver headers directly in two places:
zephyr/drivers/pwm.hfor the RGB status LED;gpio.h/pinctrl.hin the CC3501E bridge's own control-transport HAL.
Both are pre-existing gaps that predate the portable-surface migration; moving the LED path onto <alp/pwm.h> is tracked as separate follow-up work.
Status
build_only: true on native_sim/native/64. CI proves it compiles and links; the shell, Wi-Fi, BLE, and LED behaviour are bench signals on real AEN silicon.
The app is slot0-linked (CONFIG_FLASH_LOAD_OFFSET=0x10000), so it flashes via the MRAM path: app-gen-toc builds a signed ATOC, then J-Link loads the image and the ATOC to their addresses. The companion CC3501E must already be running its bridge firmware.
See also
- Console reference — the full
alpcommand tree aen-cc3501e-bringup— the minimal CC3501E power + PING soakaen-cc3501e-companion-tour— the full-surface companion walkthrough<alp/hw_info.h>reference — what backsalp board- Examples overview