A Modality Reflector plugin suite for barectf-generated CTF trace data
Lowercase names are the config keys which may be used in a reflector config toml file. Uppercase names are environment variables which may be used for the same configuration.
These options are used by both the collectors and the importers.
-
config/MODALITY_BARECTF_CONFIGThe barectf effective-configuration yaml file. -
start-event/MODALITY_BARECTF_START_EVENTAn event name to consider as the trace-start signal. Used to detect system restarts. -
MODALITY_RUN_IDThe run id to value to use in timeline metadata (timeline.run_id). This is used as the basis for the segmentation method used in the default Modality workspace. Defaults to a randomly generated uuid. -
MODALITY_AUTH_TOKENThe content of the auth token to use when connecting to Modality. If this is not set, the auth token used by the Modality CLI is read from~/.config/modality_cli/.user_auth_token -
MODALITY_HOSTThe hostname where the modality server is running.
These options are used by the TCP collector.
-
connect-timeout/MODALITY_BARECTF_CONNECT_TIMEOUTSpecify a connection timeout. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
remote/MODALITY_BARECTF_REMOTEThe remote TCP server URL or address:port to connect to. The default is127.0.0.1:8888.
These options are used by the RTT Proxy collector.
-
attach-timeout/MODALITY_BARECTF_CONNECT_TIMEOUTSpecify a target attach timeout. When provided, the plugin will continually attempt to attach and search for a valid RTT control block anywhere in the target RAM. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
control-block-address/MODALITY_BARECTF_CONTROL_BLOCK_ADDRESSUse the provided RTT control block address instead of scanning the target memory for it. -
elf-file/MODALITY_BARECTF_ELF_FILEExtract the location in memory of the RTT control block debug symbol from an ELF file. -
thumb/MODALITY_BARECTF_THUMBAssume thumb mode when resolving symbols from the ELF file for breakpoint addresses. -
breakpoint/MODALITY_BARECTF_BREAKPOINTSet a breakpoint on the address of the given symbol used to signal when to optionally configure the channel mode and start reading. Can be an absolute address or symbol name. -
stop-on-breakpoint/MODALITY_BARECTF_STOP_ON_BREAKPOINTSet a breakpoint on the address of the given symbol to signal a stopping condition. Can be an absolute address (decimal or hex) or symbol name. -
bootloader/MODALITY_BARECTF_BOOTLOADERThis session will have exclusive access to the core's control functionality (i.e. hardware breakpoints, reset, etc). If another session (i.e. the application to be booted by the bootloader) is requested on this core, it will be suspended until this session signals completion. -
bootloader-companion-application/MODALITY_BARECTF_BOOTLOADER_COMPANION_APPLICATIONThis session will not drive any of the core's control functionality (i.e. hardware breakpoints, reset, etc). -
up-channel/MODALITY_BARECTF_UP_CHANNELThe RTT up (target to host) channel number to poll on (defaults to 2). -
probe/MODALITY_BARECTF_PROBESelect a specific probe instead of opening the first available one. Use '--probe VID:PID' or '--probe VID:PID:Serial' if you have more than one probe with the same VID:PID. -
chip/MODALITY_BARECTF_CHIPThe target chip to attach to (e.g. S32K344). -
protocol/MODALITY_BARECTF_PROTOCOLProtocol used to connect to chip. Possible options: [swd, jtag]. The default value is swd. -
speed/MODALITY_BARECTF_SPEEDThe protocol speed in kHz. The default value is 4000. -
core/MODALITY_BARECTF_COREThe selected core to target. The default value is 0. -
reset/MODALITY_BARECTF_RESETReset the target on startup. -
attach-under-reset/MODALITY_BARECTF_ATTACH_UNDER_RESETAttach to the chip under hard-reset. -
rtt-read-buffer-size/MODALITY_BARECTF_RTT_READ_BUFFER_SIZESize of the host-side RTT buffer used to store data read off the target. The default value is 1024. -
rtt-poll-interval/MODALITY_BARECTF_RTT_POLL_INTERVALThe host-side RTT polling interval. Note that when the interface returns no data, we delay longer than this interval to prevent USB connection instability. The default value is 1ms. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
rtt-idle-poll-interval/MODALITY_BARECTF_RTT_IDLE_POLL_INTERVALThe host-side RTT idle polling interval. The default value is 100ms. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
force-exclusive/MODALITY_BARECTF_FORCE_EXCLUSIVEForce exclusive access to the probe. Any existing sessions using this probe will be shut down. -
auto-recover/MODALITY_BARECTF_AUTO_RECOVERAutomatically attempt to recover the debug probe connection when an error is encountered. -
no-data-timeout/MODALITY_BARECTF_NO_DATA_TIMEOUTAutomatically stop the RTT session if no data is received within specified timeout duration. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
connect-timeout/MODALITY_BARECTF_CONNECT_TIMEOUTSpecify a connection timeout. Accepts durations like "10ms" or "1minute 2seconds 22ms". -
remote/MODALITY_BARECTF_REMOTEThe remote RTT proxy server URL or address:port to connect to. The default is127.0.0.1:8888.
These options are used by the importer.
file/MODALITY_BARECTF_FILEThe binary CTF stream(s) file.
The following describes the default mapping between barectf concepts and Modality's concepts.
- Timelines are created for each CTF stream class
- Event names are the CTF event class names
- Event structure fields are provided as event attributes
- Array field types are truncated to a maximum of 10 elements
Raw event count and timestamp timer ticks are provided alongside the rollover-tracked values. If the default CTF stream clock contains the frequency, we additionally convert timestamp ticks to nanoseconds.
- Raw timestamp clock cycles are available on the
event.internal.barectf.clock.cyclesattribute - Rollover tracking timestamp cycles are available on the
event.internal.barectf.timestamp.cyclesattribute - Raw event count is available on the
event.internal.barectf.event.countattribute - When discarded events are present in
event.packet_context.events_discarded, a warning message is logged.