Prepare the connection
- Install the SEGGER J-Link Software and Documentation Pack on the computer running Embedder.
- Connect the J-Trace to the target with the fine-pitch CoreSight-20 trace cable. The wide 0.1-inch debug ribbon carries no trace signals.
- Confirm the board routes the target’s ETM trace pins to that connector, and that the target drives
TRACECLK. - Find the exact SEGGER device name for your MCU, such as
STM32F407VE. - Build the firmware and keep the ELF of the build you’ll run.
Tell Embedder the device and clock
Every capture needs the SEGGER device name. The CPU clock is optional: it gives the instruction timeline an estimated time axis. Where Embedder reads them depends on how you start the capture:- Select the J-Link Device in a Serial Monitor tab’s RTT settings or in the Trace tab’s source settings. Captures from the Monitor connect over the Interface selected with it, SWD unless you choose JTAG.
Target MCUmust hold one exact SEGGER device name. Don’t guess it. A wrong name makes the connection fail.- The time axis is an estimate based on instruction count, not a measurement.
Capture instructions and coverage
You can start each workflow from the Monitor or from chat:
For example:
Choose a longer stream carefully
A streamed capture starts at reset and keeps a rolling window of recent instructions, so it can include startup that a bounded capture misses. To read the trace, it halts the target between short slices, and the firmware runs far slower than normal. Interrupts, timeouts, and handshakes can behave differently. Use a logic analyzer, oscilloscope, or target timer for timing measurements. Instruction order and estimated time axes don’t establish elapsed time.Script a custom capture
If the built-in captures don’t fit your test, ask Embedder to write a hardware script. Scripts can import thejtrace Python package for capture, coverage, and direct target control. Embedder makes it available to hardware scripts automatically, so there’s nothing to install.
.embedder/hardware/coverage_check.py
- Run scripts through Embedder’s hardware-script runner. It holds the probe for the script so other hardware workflows don’t compete for it.
- When a script controls the target directly, open the probe with
with JLink(...)so it closes even when the script fails. A probe left open blocks later flashing, debugging, and RTT until it’s closed.
Troubleshoot
SEGGER J-Link software not found: install the J-Link Software and Documentation Pack, then try again.No SEGGER probe detected: connect the J-Trace over the fine-pitch CoreSight-20 cable.- The message says a plain J-Link can’t stream trace: only a J-Link is connected. Use GDB or RTT with it, or connect a J-Trace for ETM.
No target device configured: select the J-Link Device in a Serial Monitor tab, or addTarget MCU = <name>toEMBEDDER.md.No .elf firmware binary found in the project: build the firmware, or name the ELF in your request.Trace start failed, or no instructions: check the trace cable, target power, the device name, routed trace pins, andTRACECLK.- Function or source names are wrong: capture again with the ELF of the build that’s running.
- Behavior changes during a capture: a streamed capture slows the target. Compare with a bounded capture or an external measurement.
Hardware is busy in another workflow.: Embedder or a hardware script holds the probe. Wait for it to finish or stop it.- The probe stays busy: stop active captures and scripts, and disconnect unused debugger sessions.