Skip to content

[board] Add RTT for boards without on-board serial logger - #1281

Merged
salkinium merged 0 commit into
modm-io:developfrom
salkinium:feat/boards-rtt
Aug 11, 2025
Merged

[board] Add RTT for boards without on-board serial logger#1281
salkinium merged 0 commit into
modm-io:developfrom
salkinium:feat/boards-rtt

Conversation

@salkinium

@salkinium salkinium commented Aug 10, 2025

Copy link
Copy Markdown
Member

A lot of older STM32 discovery boards have an STLinkv2 on board, but did not route the serial link to it.
Smaller boards off Aliexpress do not even have an on-board debug probe or a serial port.

This adds a RTT based version of the board logger by default.
Contrary to board loggers backed by serial devices, the RTT may never be read, therefore it cannot be blocking, otherwise any fiber that logs would eventually always halt. Therefore these board loggers discard data on overflow.

I did not add a RTT logger to devices with a USB bootloader, as they are not expected to be used with an external debug probe.

  • Tested in as much hardware as possible.
  • Fixed wrong default of RTT receiver buffer. Unlike the UART drivers, which can store at least one byte (often more) in hardware without software buffer, a RTT buffer size of zero means nothing can be sent.
  • Fixed deprecated use of hla_swd for STLinks.
  • Remove conflicting logger examples.

@salkinium salkinium added this to the 2025q3 milestone Aug 10, 2025
@salkinium
salkinium force-pushed the feat/boards-rtt branch 2 times, most recently from 7f2b653 to 273364f Compare August 10, 2025 21:48
@salkinium
salkinium marked this pull request as ready for review August 10, 2025 21:59
@salkinium
salkinium merged commit 89f387f into modm-io:develop Aug 11, 2025
12 checks passed
@salkinium
salkinium deleted the feat/boards-rtt branch August 11, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant