@@ -26,11 +26,12 @@ The source target therefore:
2626- initializes ` .data ` and ` .bss ` ; and
2727- enforces the ` 0x1e000 ` load budget in the linker and post-link checker.
2828
29- The current payload is the hardware-neutral application/runtime skeleton. It
30- does not initialize the audio codec, SAI, eDMA, GPIO, mute, or LEDs. Flashing
31- it would at best produce a silent diagnostic loop. It is deliberately marked
32- ** offline only** until the source audio path and a non-destructive hardware
33- diagnostic are implemented and reviewed.
29+ The default payload remains a hardware-neutral application/runtime skeleton.
30+ An additional, separately gated build reproduces the executed factory
31+ SAI1/eDMA contract and runs a four-slot, 32-bit passthrough with two 128-byte
32+ DTCM buffer halves. The source audio path has passed register-level emulation
33+ and an emulated DMA-block copy, but it is still marked ** offline only** :
34+ the board's analog mute/bypass sequencing has not yet been recovered.
3435
3536## Build and verify
3637
@@ -44,13 +45,25 @@ cmake -S firmware -B build/factory-slot -G Ninja \
4445 -DCMAKE_TOOLCHAIN_FILE=" $PWD /firmware/cmake/arm-none-eabi-toolchain.cmake" \
4546 -DCMAKE_BUILD_TYPE=Release \
4647 -DNCR2_BUILD_FACTORY_SLOT_APP=ON \
48+ -DNCR2_FACTORY_SLOT_AUDIO_PASSTHROUGH=ON \
4749 -DNCR2_MCUX_SDK_ROOT=" $PWD /third_party/mcux-sdk-workspace"
4850
4951cmake --build build/factory-slot --target ncr2_factory_slot_app
5052python3 tools/check_factory_slot.py \
5153 build/factory-slot/ncr2_factory_slot_app.elf
54+
55+ PYTHONPATH=/path/to/unicorn \
56+ python3 tools/emulate_source_audio.py \
57+ build/factory-slot/ncr2_factory_slot_app.elf
5258```
5359
60+ Omit ` NCR2_FACTORY_SLOT_AUDIO_PASSTHROUGH=ON ` to produce the deliberately
61+ hardware-inert default. The post-link checker validates the complete vector
62+ table, including external IRQ0 targeting the shared eDMA channel 0/16
63+ handler. The source emulator executes reset and initialization, checks the
64+ factory SAI1, PLL, pin, DMAMUX, and TCD values, injects one RX block, invokes
65+ the source ISR, and verifies the unchanged TX block. It does not access USB.
66+
5467## Build an offline OEM-DFU package
5568
5669The packer starts from the verified private dump because the factory HID
@@ -76,15 +89,16 @@ refuses to overwrite existing artifacts.
7689
7790For the verified local dump, the generated Metal restore is byte-identical to
7891the previously live-tested ` eng3-slot1.bina ` . The source package is still not
79- approved for streaming: it lacks audio and target-visible diagnostics.
92+ approved for streaming: digital passthrough is implemented, but the analog
93+ mute/bypass state and live slot semantics remain unverified.
8094
8195## Gates before first source-slot hardware test
8296
83- 1 . Recover and source-control exact audio clocks, pads, SAI framing, eDMA
84- channels, and ping-pong buffer geometry.
97+ 1 . ~~ Recover and source-control exact audio clocks, pads, SAI framing, eDMA
98+ channels, and ping-pong buffer geometry.~~
85992 . Identify the converter/codec and prove mute/bypass sequencing.
86- 3 . Implement a bounded passthrough path with DTCM DMA buffers and explicit
87- cache policy.
100+ 3 . ~~ Implement a bounded passthrough path with DTCM DMA buffers and explicit
101+ cache policy.~~ The first image keeps DMA state in uncached DTCM.
881024 . Add a safe target-visible heartbeat that cannot drive an unknown output.
891035 . Review the generated write range and exact BINA hash.
901046 . Keep the byte-identical Metal restore package available before testing.
0 commit comments