Open cfriedt opened 4 days ago
@cfriedt I get that this is annoying, but I do not think this is a medium priority bug.
@henrikbrixandersen - it affects multiple platforms. That was my main consideration for making it a medium. Currently, I'm looking at ARC, ARM, and RISC-V systems.
The fact that lots of users are also hitting this issue (but did not have a bug to comment on until now) was another consideration.
cc @dkalowsk @pdgendt @topisani
Describe the bug
RTT console support for
openocd
was added towest
in 18f45b5f063 .It wasn't immediately clear how to use it on any board. Luckily some folks on Discord provided some pointers.
There was some concensus that the documentation could be improved.
Aside from that, there are additional technical shortcomings:
west build -t rtt
does not work (requiring separatewest build
andwest rtt
steps)west rtt
by itself does not attempt to see if any available runners support rtt, requiring a runner to be specified (west rtt -r openocd
)west rtt -r openocd
does not actually work due to a race condition (requiring the target to be running so that firmware can executeSEGGER_RTT_Init()
and initialize the RTT control block).To Reproduce
west build -p -S rtt-console -b <board> samples/hello_world
west rtt -r openocd
Expected behavior
west
andopenocd
twister
(I also used JLink for this and it was extremely flakey)To be honest, it would be great if
twister
used a built-in handler for the RTT console. It doesn't make sense to have every user come up with their own--device-serial-pty
script.Impact Showstopper for anyone who does not have a dedicated serial port for seeing RTT console output via
west
or for anyone wishing to use RTT for device testing withtwister
.Logs and console output
No rtt runner available (although openocd is available, it just isn't enabled).
Cannot run
rtt start
before target is running.Environment (please complete the following information):
Additional context Script I used for testing twister with
--device-serial-pty /tmp/rtt.sh
Changes needed to get both
west
andtwister
to workDiscussion on Discord