Arduino printf/fprintf/sprintf prints question mark instead of float

3 ビュー (過去 30 日間)
Kenelm McKinney
Kenelm McKinney 2015 年 5 月 27 日
Using embedded coder to build an ArduinoMEGA2560 target. I need to do "sprintf" manipulations. I used "custom sfunction builder" to add sprintf. That works great for formatting integer arguments but I get "?" when I attempt to use "%f" format.
Found this general issue "question mark instead of float" discussed on StackOverflow: http://stackoverflow.com/questions/14146850/arduino-printf-fprintf-prints-question-mark-instead-of-float
Problem can be solved by passing the -lprintf_flt option to the avr linker.
Does anyone know how to add linker flags to an Arduino embedded coder target?

回答 (0 件)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by