Skip to main content

mproc-mailbox

Cortex-M55-HP ↔ Cortex-M55-HE mailbox round-trip on AEN. HP-side stages a payload in shared SRAM, signals the peer via the hardware mailbox, waits for a reply, reads the result back. Both peer images ship in the SDK.

Source: examples/mproc-mailbox/.

What it shows

  • Opening a shared-memory region with alp_shmem_open against the DT-alias-anchored name "alp_shmem0" (the alias is declared in boards/native_sim_native_64.overlay for the host smoke build; the orchestrator emits it from board.yaml's ipc: block on real silicon).
  • Opening the hardware mailbox with alp_mbox_open(.channel = 0, .peer = ALP_CORE_M55_HE).
  • Getting a raw pointer + size view with alp_shmem_view and staging the payload with memcpy — the backend handles cache coherency when .cacheable = false.
  • Signalling the peer with alp_mbox_send carrying a small (offset, length) tuple pointing at the staged bytes.
  • Registering an alp_mbox_set_callback to drain the peer's reply tuple from the mbox-ISR thread, then memcpy-ing the response out of shmem.

board.yaml (HP side)

som:
sku: E1M-AEN701

preset: e1m-evk

cores:
m55_hp:
app: ./src
peripherals: [mproc]
m55_he:
app: ./peer
peripherals: [mproc]

diagnostics:
log_level: info

Build

# native_sim (HP-side only; no peer core)
west alp-build -b native_sim/native/64 alp-sdk/examples/mproc-mailbox
west build -d build -t run

# Real silicon (AEN dual-core, Zephyr v4.4 upstream board)
west alp-build -b ensemble_e8_dk/ae402fa0e5597le0/rtss_hp alp-sdk/examples/mproc-mailbox
west build -b ensemble_e8_dk/ae402fa0e5597le0/rtss_he alp-sdk/examples/mproc-mailbox/peer
west flash

Flash the HP image into the RTSS-HP slot and the HE peer image into the RTSS-HE slot. Once both are running:

[mproc] init mbox + shmem
[mproc] sending payload "hello-from-HP" (13 bytes)
[mproc] HE replied via mbox callback
[mproc] HE replied "echo: hello-from-HP" (19 bytes)
[mproc] done

The two halves still build standalone today; sysbuild glue that builds them in one west build invocation lands alongside the dual-image flow in alplabai/alp-zephyr-modules. Until then, the two west invocations shown above are the canonical recipe.

See also

Questions about this page? Discuss in Community Forum