Hi!
I'm currently trying to implement a Segger RTT library in Rust for - in my case a bbc micro:bit (Cortex M0+) flashed with the JLink OB.
It looks like it could work because the JLinkRTTLogger automatically finds the RTT control block and also correctly detects the buffer size of the first up buffer:
Display All
But from this point, nothing happens. No bytes are received after this point.
I used the gdb to ensure that the buffer is correctly filled with chars and the write offset is updated as expected, this is the printed data structure of the control block:
Display All
It seems like the JLinkRTTLogger doesn't pick up on the write offset, reads the bytes and updates the read offset.
Finally, to make sure I ported the RTT C structs correctly, this is the memory layout of both, the control block and the buffer (assuming one up and one down channel):
I'm thankful for any hint or help on this topic!
Thanks a lot!
I'm currently trying to implement a Segger RTT library in Rust for - in my case a bbc micro:bit (Cortex M0+) flashed with the JLink OB.
It looks like it could work because the JLinkRTTLogger automatically finds the RTT control block and also correctly detects the buffer size of the first up buffer:
Brainfuck Source Code
- Device name. Default: NRF51822_XXAA >
- Target interface. >
- Interface speed [kHz]. Default: 4000 kHz >
- RTT Control Block address. Default: auto-detection >
- RTT Channel name or index. Default: channel 1 > 0
- Output file. Default: RTT_<ChannelName>_<Time>.log >
- ------------------------------------------------------------
- Connected to:
- J-Link OB-BBC-microbit compiled Mar 24 2017 09:33:30
- S/N: 782463927
- Searching for RTT Control Block...OK. 1 up-channels found.
- RTT Channel description:
- Index: 0
- Name: Terminal
- Size: 128 bytes.
- Output file: RTT_Terminal_201802021931.log
- Getting RTT data from target. Press any key to quit.
- ------------------------------------------------------------
- Transfer rate: 0 KByte/s Bytes written: 0 Byte
But from this point, nothing happens. No bytes are received after this point.
I used the gdb to ensure that the buffer is correctly filled with chars and the write offset is updated as expected, this is the printed data structure of the control block:
Source Code
It seems like the JLinkRTTLogger doesn't pick up on the write offset, reads the bytes and updates the read offset.
Finally, to make sure I ported the RTT C structs correctly, this is the memory layout of both, the control block and the buffer (assuming one up and one down channel):
I'm thankful for any hint or help on this topic!
Thanks a lot!