RAM metadata attachment
RAM metadata is enabled by default for direct RAM_BUFFER in DROP mode, without a snapshot tee. It lets ViewAlyzer-RS attach to running firmware with task names, trace definitions and recorder configuration available at the start of the recording. Supply the ELF that matches the loaded firmware.
Capture
- Build and flash your firmware with the RAM-buffer transport. No metadata setting is needed for the supported default configuration.
- Select that build's ELF in ViewAlyzer-RS under ELF / Symbols > ELF File. Select the RAM-buffer connection and turn Reset on Connect off to attach without restarting the application.
- Press Record, or use the CLI:
viewalyzer-cli capture --config board.vacf --elf firmware.elf --no-reset --duration 10 --output attached.vadb
The host reads the current definitions from target RAM and requests a stream checkpoint. Later registrations arrive through the event stream. Saved .vadb and .va recordings include the definitions and can be replayed without the ELF or target. Attachment starts at the checkpoint; it does not recover events that occurred before attachment.
Configuration
| SETTING | DEFAULT | USAGE |
|---|---|---|
VA_METADATA | 1 for the supported RAM configuration; 0 otherwise | Set 0 for setup-bundle capture |
VA_METADATA_SIZE | 2048u | Capacity of the metadata table, in bytes |
VA_RAMBUF_ATTRIBUTES | empty | Placement attributes for the ring, control blocks and metadata table |
On Zephyr, CONFIG_VIEWALYZER_METADATA defaults to y for the supported configuration. Set CONFIG_VIEWALYZER_METADATA_SIZE to change the capacity.
The table reserves its configured capacity plus a 64-byte descriptor and a small amount of service state, in addition to the existing registries and event ring. More tasks, objects, channels or longer names require more table space. An overflow is reported as an attachment error: increase the capacity and rebuild. Changing the table size does not require a larger event ring.
On cached cores, place all recorder shared memory in probe-visible, non-cacheable RAM using VA_RAMBUF_ATTRIBUTES and the corresponding linker and MPU configuration. This includes the metadata table, descriptors and event ring. Use one consuming host and the exact ELF loaded on the target.
Periodic service
Do not schedule VA_EmitSetupBundle() for metadata attachment. VA_AUTO_SETUP_INTERVAL_MS and VA_RAMBUF_SETUP_ON_ATTACH are ignored in this mode. The host requests a small synchronization checkpoint when attaching or recovering from lost or corrupt data.
Keep calling VA_TickOverflowCheck() periodically from your main loop or an application thread. Timestamped events handle counter rollover automatically; the periodic call covers quiet periods, services attachment requests when no events are emitted, and sends small time/sequence checkpoints. The recorder and RTOS adapters do not install a background service task.
A 100 ms service interval suits typical 32-bit timer configurations. A 16-bit timer at 1 MHz needs a shorter interval, such as 10 ms. The longest gap between calls must remain below the underlying timer's wrap period. See the API reference.
Setup-bundle capture
Set VA_METADATA=0, or CONFIG_VIEWALYZER_METADATA=n on Zephyr, when using a viewer without RAM metadata support, recording without an ELF, or reducing RAM usage. Full setup retransmission then uses VA_AUTO_SETUP_INTERVAL_MS and VA_RAMBUF_SETUP_ON_ATTACH; retain periodic VA_TickOverflowCheck().
Metadata defaults off for SWO, RTT, custom transports, buffered output, BLOCK/WRAP RAM modes and snapshot tees. Those configurations use setup bundles. Explicitly enabling metadata with an unsupported configuration is a build error.