Skip to content

Add standard stream to CMSIS-Driver USART retarget implementation#74

Merged
VladimirUmek merged 2 commits intomainfrom
stdio_cmsis_uart
Jan 27, 2026
Merged

Add standard stream to CMSIS-Driver USART retarget implementation#74
VladimirUmek merged 2 commits intomainfrom
stdio_cmsis_uart

Conversation

@VladimirUmek
Copy link
Copy Markdown
Contributor

No description provided.

@VladimirUmek VladimirUmek force-pushed the stdio_cmsis_uart branch 3 times, most recently from 27d488e to 1a8e8c9 Compare January 26, 2026 11:44
@VladimirUmek
Copy link
Copy Markdown
Contributor Author

This PR consists of two commits:

  • the first commit only changes the structure of the source directory.
  • the second commit adds components for retargeting to the CMSIS Driver USART.

New components:

  • STDERR:UART&CMSIS
  • STDIN:UART&CMSIS
  • STDOUT:UART&CMSIS

So each stream gets component "UART" and implementation variant "CMSIS" (using CMSIS-Driver USART API).

Files:

  • stdio_cmsis_uart.c is the implementation file (STDIO -> UART) and is part of the CORE component. It is included in the project only if one of the STDERR/IN/OUT:UART components is selected.
  • stdio_cmsis_uart_config.h configured which CMSIS-Driver USART driver instance is selected for STDIO. It automatically selects preconfigured instance from board layer
  • std{err/in/out}_cmsis_uart_config.h are per-stream configuration files and are brought to the project when STD*:UART&CMSIS component is selected.

Defaults:

  • STDIN buffers 64 bytes of incoming UART bytes
  • STDERR/STDOUT are unbuffered

Configuration files offer option to generate CR after each LF for STDERR/STDOUT and offer option to echo STDIN to STDOUT.

@VladimirUmek VladimirUmek marked this pull request as ready for review January 26, 2026 12:08
Copy link
Copy Markdown
Contributor

@RobertRostohar RobertRostohar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VladimirUmek VladimirUmek merged commit 59e2684 into main Jan 27, 2026
3 checks passed
@VladimirUmek VladimirUmek deleted the stdio_cmsis_uart branch January 27, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants