This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Undefined behaviour if probe-run initializes RTT before target #351
Labels
status: needs design
This feature needs design work to move forward
type: bug
Something isn't working
Describe the bug
The target writes the control block to memory at init (
defmt-rtt
does this automatically,rtt-target
requires calling an init macro).probe-run
will load this control block from memory after flashing and starting the application.From what I can see, the only thing stopping
probe-run
from reading this control block before the target writes it is a read for the RTT ID at the top of the memory space (written last by the target), however, if there is a control block written to memory from a previous run,probe-run
might read this old control block before or while the target writes the new control block.This can cause unexpected behaviour like corrupted control block message during init or when trying to read from the RTT up channel, or outputting corrupted data (only seen when using defmt). Some examples are below.
To Reproduce
Steps to reproduce the behaviour:
cargo run
Expected and observed behaviour
Should output
Started
after flashingconfig.toml
The contents of your project's
.cargo/config.toml
fileProbe details
[0]: J-Link (J-Link) (VID: 1366, PID: 0101, Serial: 000821011390, JLink)
Operating System:
Windows 10
The text was updated successfully, but these errors were encountered: