board-selftest
The "run this first on a fresh board" self-test. Four checks, chip-free, portable across every E1M family — it answers is this board alive and is it the board I think it is before you spend an afternoon debugging an app. New in v0.14.0.
Source: examples/bringup/board-selftest/.
What it does
- SoM identity —
alp_hw_info_read(). - SoC alive —
alp_soc_secure_fw_ping()thenalp_soc_info_read(). - Power profile —
alp_power_profile_get(RUN). - I²C bus scan —
alp_i2c_read()across the bus.
It opens the bus through the BOARD_I2C_SENSORS alias, so it runs on any E1M SoM without editing the source.
SKIP is not FAIL
The three-state result is the point of this example. A check that cannot answer on this hardware reports SKIP — that is not a failure, and it is not something to chase. FAIL means the check ran and the answer was wrong. PASS means it ran and answered. Read the summary line accordingly:
[selftest] result: 4 PASS, 0 SKIP, 0 FAIL
board.yaml
som:
sku: E1M-AEN801
preset: e1m-evk
supported_boards:
- e1m-evk
- e1m-x-evk
pins:
- { e1m: E1M_I2C0, macro: EVK_I2C_BUS_SENSORS, doc: "Shared sensor + IO-expander + INA236 bus" }
cores:
m55_hp:
peripherals: [i2c]
Expected output
Real hardware (E1M-AEN801), every check able to answer:
[selftest] === board self-test ===
[selftest] SoM identity: E1M-AEN801 rev r1 sn AEN0000123 -> PASS
[selftest] SoC identity: alif:ensemble:e8 (secure-fw OK) -> PASS
[selftest] power profile: RUN core 800 mV @ 400 MHz -> PASS
[selftest] i2c scan BOARD_I2C_SENSORS: 3 device(s) -> PASS
[selftest] result: 4 PASS, 0 SKIP, 0 FAIL
[selftest] done
:::note Illustrative, not a bench citation The block above is illustrative. No dated bench capture is published for it — see Status. :::
Under native_sim the emulated I²C bus is empty and there is no EEPROM target behind the identity read:
[selftest] SoM identity ... -> FAIL
[selftest] SoC identity ... -> SKIP
[selftest] power profile ... -> SKIP
[selftest] i2c scan ... 0 device(s) -> PASS
[selftest] result: 1 PASS, 2 SKIP, 1 FAIL
[selftest] done
That FAIL under native_sim is expected and honest — there is no EEPROM to read, so the identity check ran and could not produce the right answer. It is not a defect in the example, and it is not something to "fix" before moving on.
Status
- Build-only /
native_sim-green. Thenative_simblock above is what CI actually exercises. - The real-hardware block is illustrative; no dated bench capture is published.
- Catalog status:
stable. - This is the canonical example behind the
diagnosticsscaffold template.
See also
<alp/hw-info.h>reference —alp_hw_info_read<alp/power.h>reference —alp_power_profile_get<alp/peripheral.h>reference — I²C —alp_i2c_readi2c-scanner— the bus scan on its own, in more detailboard.yamlreference- Examples overview