Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds STM32L4 debug output support for selecting UART5 in addition to the existing LPUART1 path, wiring up the necessary RCC clock and GPIO AF configuration in the STM32L4xx UART interface.
Changes:
- Extend
debug.uartconfiguration option to allow selectingUART5. - Add UART5-specific MSP init (clock selection + GPIOC/ GPIOD pin configuration) in the STM32L4xx UART interface.
- Update UART interface includes to pull in additional STM32/HAL headers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| options.toml | Expands the debug UART selection to include UART5. |
| machine/arm/stm32l4xx/interface/uart.c | Implements UART5 clock + GPIO init path for debug UART output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
LCOV of commit
|
thomasw04
approved these changes
Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This MR basically just resurrects some code I've written quite some time ago. It's also integrated with the config system, so a user can just select UART5 and it'll work.
Tested output using the hello-world example on cave and that works, but didn't really test the UART5_RX part, but that should be the correct pin. But tbh we probably don't care.
One thing that would be a bit nicer is if we did the comparison of
huart->Instanceat compile time / only compiled in the relevant code, but didn't really get that working nicely with preprocessor macros - any opinion on that?