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

How to enable printf with float argument? #4

Closed
profOnno opened this issue Mar 8, 2019 · 1 comment
Closed

How to enable printf with float argument? #4

profOnno opened this issue Mar 8, 2019 · 1 comment

Comments

@profOnno
Copy link

profOnno commented Mar 8, 2019

In the libopencm3-examples repository there is a usart_printf example. When compiling the examples this printf("float: %f", 3.21f); works as expected.

Using this repository (libopencm3-template), the printf("float: %f", 3.21f); doesn't do anything (skips the line). Some searching did reveal you should add LDFLAGS += -u _printf_float to the make file. This didn't
work for me. Any pointers on how to make this work?

update:
Got it working, added LDFLAGS += -u _printf_float to the Makefile. Not sure what went wrong the first time.

@karlp
Copy link
Member

karlp commented Jun 14, 2019

Doesn't appear to be anything else needed here :)

@karlp karlp closed this as completed Jun 14, 2019
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

No branches or pull requests

2 participants