Summary
tan flash cannot complete a slot0 MRAM flash on E1M-AEN801 without four
values nothing in the chain supplies. Found by running Target 1 (tan-cli#268's
last precondition) on the real board — e1m-aen-evk-01, E8 AE822, J-Link
SN 603000869, DPS-150 Vin 16.0 V — end to end through tan.
Every refusal below is correct behaviour. The defect is that the pipeline
never produces what the refusals ask for, so "scaffold → build → flash entirely
through tan" is not achievable on this SoM today.
Measured, in order
tan init --from-example peripheral-io/blink → exit 0, 9 files.
tan build → exit 0, m55_he ok + m55_hp ok, slot0-linked (8001xxxx).
Then:
1. No signed ATOC, and nothing signs one.
flash.entry-failed alif_mram_jlink: flash_args.atoc (the signed ATOC blob) and
flash_args.atoc_address are both required. Both flows burn the SAME signed ATOC
-- sign it with the SETOOLS `app-gen-toc` step and pass the ...
What the SDK actually emitted for the slice:
flash_method: zephyr_west_flash
flash_args:
jlink_flash_device: AE822FA0E5597LS0_M55_HE
No atoc, no atoc_address, and no step anywhere runs app-gen-toc. I had
to run SETOOLS by hand (app-gen-toc -f <app>-slot0.json → ATOC at
0x8057ea50) and inject both fields into build/system-manifest.yaml.
SETOOLS is license-gated and not redistributable, which is exactly why this
needs a decision rather than a quick patch — see "The decision" below.
2. output_artefact is zephyr.elf, but a slot0 loadbin needs the raw .bin.
flash.entry-failed alif_mram_jlink: flash_args.slot0_load_address is set but the
artefact .../zephyr.elf is not a raw .bin -- refusing to loadbin it at
slot0_load_address, which would write the artefact's own headers into MRAM
This is tan-cli#311's guard firing on real silicon, and it was right — that
write would have put ELF headers into on-die MRAM. But the sibling
zephyr.bin is sitting right next to the .elf in the same build dir, so tan
refuses over something it could resolve.
3. No probe selection → the flash cannot connect on a multi-probe host.
flash.entry-failed alif_mram_jlink[m55_he]: J-Link>si SWD | J-Link connection
not established yet but required for command. | Connecting to J-Link ...FAILED:
Cannot connect to the probe/programmer.
The generated script has no -SelectEmuBySN. It only worked after I set
flash_args.jlink_serial: 603000869 by hand. This bench has three J-Links,
and — per flashing-and-bench-debugging-aen — the AEN probe's serial
603000869 is cloned by the GD32 bridge probe on a different board, so an
unpinned connect can attach to hardware the reservation does not cover. The
error text also names none of this.
4. slot0_load_address is never emitted, so the mramxip two-blob shape
never arms even though both cores link 8001xxxx.
After injecting all four: tan flash --core m55_he → exit 0, and slot0
byte-matched the flashed .bin on all four words
(20004250 80015A51 8001F9F3 80015A3D) and survived a true cold power-cycle
at 16.0 V. So the burn path itself is sound — only its inputs are missing.
The decision this needs
Signing is the load-bearing one, and it is a product call, not a patch:
- (a) tan runs
app-gen-toc when SETOOLS_DIR resolves. Makes
tan flash self-sufficient on a licensed host; makes tan depend on a
license-gated vendor tool and forces a policy for hosts without it.
- (b) alp-sdk signs during
build and emits atoc/atoc_address into
system-manifest.yaml. Keeps tan vendor-neutral and keeps SETOOLS on the
build side where the toolchain already lives; means tan flash alone can
never produce a flashable AEN image from an unsigned tree.
- (c) Neither — document it. Say plainly that AEN801 MRAM flashing requires
a manual SETOOLS step, and have tan flash print that recipe instead of a
bare field-missing refusal.
I lean (b): securing-the-alp-sdk-position keeps the portable <alp/*>
surface vendor-clean, and a license-gated binary is a build-time concern. But it
makes tan flash structurally unable to stand alone here, which is worth
saying out loud.
What I am fixing now, tan-side, regardless of that decision
Neither depends on the signing answer:
Not in scope here
slot0_load_address (4) is a build-time property — it is only correct when the
app was built CONFIG_USE_DT_CODE_PARTITION=y, which tan cannot detect. That
belongs with whoever emits the manifest, same as the signing answer.
Blocks
tan-cli#268 — Target 1 ("entirely through tan") cannot pass on E1M-AEN801 until
the signing question is answered.
Verified on feat/v06-batch @ 063c4b1, tan 0.5.0-rc4.
Summary
tan flashcannot complete a slot0 MRAM flash on E1M-AEN801 without fourvalues nothing in the chain supplies. Found by running Target 1 (tan-cli#268's
last precondition) on the real board —
e1m-aen-evk-01, E8 AE822, J-LinkSN
603000869, DPS-150 Vin 16.0 V — end to end throughtan.Every refusal below is correct behaviour. The defect is that the pipeline
never produces what the refusals ask for, so "scaffold → build → flash entirely
through tan" is not achievable on this SoM today.
Measured, in order
tan init --from-example peripheral-io/blink→ exit 0, 9 files.tan build→ exit 0,m55_heok +m55_hpok, slot0-linked (8001xxxx).Then:
1. No signed ATOC, and nothing signs one.
What the SDK actually emitted for the slice:
No
atoc, noatoc_address, and no step anywhere runsapp-gen-toc. I hadto run SETOOLS by hand (
app-gen-toc -f <app>-slot0.json→ ATOC at0x8057ea50) and inject both fields intobuild/system-manifest.yaml.SETOOLS is license-gated and not redistributable, which is exactly why this
needs a decision rather than a quick patch — see "The decision" below.
2.
output_artefactiszephyr.elf, but a slot0loadbinneeds the raw.bin.This is tan-cli#311's guard firing on real silicon, and it was right — that
write would have put ELF headers into on-die MRAM. But the sibling
zephyr.binis sitting right next to the.elfin the same build dir, so tanrefuses over something it could resolve.
3. No probe selection → the flash cannot connect on a multi-probe host.
The generated script has no
-SelectEmuBySN. It only worked after I setflash_args.jlink_serial: 603000869by hand. This bench has three J-Links,and — per
flashing-and-bench-debugging-aen— the AEN probe's serial603000869is cloned by the GD32 bridge probe on a different board, so anunpinned connect can attach to hardware the reservation does not cover. The
error text also names none of this.
4.
slot0_load_addressis never emitted, so the mramxip two-blob shapenever arms even though both cores link
8001xxxx.After injecting all four:
tan flash --core m55_he→ exit 0, and slot0byte-matched the flashed
.binon all four words(
20004250 80015A51 8001F9F3 80015A3D) and survived a true cold power-cycleat 16.0 V. So the burn path itself is sound — only its inputs are missing.
The decision this needs
Signing is the load-bearing one, and it is a product call, not a patch:
app-gen-tocwhenSETOOLS_DIRresolves. Makestan flashself-sufficient on a licensed host; makes tan depend on alicense-gated vendor tool and forces a policy for hosts without it.
buildand emitsatoc/atoc_addressintosystem-manifest.yaml. Keeps tan vendor-neutral and keeps SETOOLS on thebuild side where the toolchain already lives; means
tan flashalone cannever produce a flashable AEN image from an unsigned tree.
a manual SETOOLS step, and have
tan flashprint that recipe instead of abare field-missing refusal.
I lean (b):
securing-the-alp-sdk-positionkeeps the portable<alp/*>surface vendor-clean, and a license-gated binary is a build-time concern. But it
makes
tan flashstructurally unable to stand alone here, which is worthsaying out loud.
What I am fixing now, tan-side, regardless of that decision
Neither depends on the signing answer:
.binsibling when a slot0loadbinneeds one and theartefact is an ELF, instead of refusing. flash: plan_alif_mram_jlink loadbin's the slot0 app with no is_raw_bin guard; an ELF artefact would write headers into MRAM #311's guard stays exactly as
strict for anything that is genuinely not a raw image — it should refuse a
.hex, and refuse when no sibling.binexists.Cannot connect to the probe/programmershould say that noflash_args.jlink_serialwas pinned,and that on a host with several probes the connect is ambiguous.
Not in scope here
slot0_load_address(4) is a build-time property — it is only correct when theapp was built
CONFIG_USE_DT_CODE_PARTITION=y, which tan cannot detect. Thatbelongs with whoever emits the manifest, same as the signing answer.
Blocks
tan-cli#268 — Target 1 ("entirely through tan") cannot pass on E1M-AEN801 until
the signing question is answered.
Verified on
feat/v06-batch@063c4b1,tan 0.5.0-rc4.