Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spl-uart-printf-simple example, refactor old one #47

Merged
merged 4 commits into from
Mar 25, 2021

Conversation

maxgerhardt
Copy link
Contributor

@maxgerhardt maxgerhardt commented Mar 25, 2021

The old "spl-uart" example was a rather complex UART1 to UART3 loopback and buffer check firmware and utilizes interrupts. The example also wouldn't compile for the boards that do not have a UART1 peripheral, but a UART2 peripheral instead.

This renames the old exapmle to spl-uart-loopback and adds a new, simple, no interrupts, UART printf() example which works for all supported STM8 boards. It outputs a small header text first, then Hello, world! continuously.

Again, the SPL configuration has been stripped down to the bare minimum (CLK, UART1 or UART2) to save flash.

Tested on my STM8S103F3 breakout board.

Build integration for examples has been adapted accordingly.

Environment     Status    Duration
--------------  --------  ------------
stm8sblue       SUCCESS   00:00:01.986
mb208           SUCCESS   00:00:01.934
nucleo_8s207k8  SUCCESS   00:00:01.950
s8uno           SUCCESS   00:00:02.075
stm8s003f3      SUCCESS   00:00:01.969
stm8sblack      SUCCESS   00:00:02.082
stm8sdisco      SUCCESS   00:00:02.085

grafik

The old "spl-uart" example was a rather complex UART1 to UART3
loopback and buffer check firmware, that also doesn't compile for the
boards that do not have a UART1 peripheral.

This renames the old exapmle to spl-uart-loopback and adds a new,
simple UART printf() example which works for all supported STM8 boards.
@maxgerhardt maxgerhardt changed the title Add simple spl-uart-printf example, refactor old one Add spl-uart-printf-simple example, refactor old one Mar 25, 2021
@valeros valeros merged commit 76068b4 into platformio:develop Mar 25, 2021
@valeros
Copy link
Member

valeros commented Mar 25, 2021

Awesome, thanks!

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.

None yet

2 participants