STM32F3, IAR6.4 how to printf() floating point?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-11-22 8:08 PM
Posted on November 23, 2012 at 05:08
Or, in general, how to printf() numbers with decimal point?
Thanks #floating-point---just-say-no
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-11-22 8:37 PM
Posted on November 23, 2012 at 05:37
Pretty much the same as any other C compiler. With IAR you'd need to link against a suitable library with the level of support you need.
''Choosing formatters for printf and scanf'' might be worth a reviewhttp://supp.iar.com/FilesPublic/UPDINFO/004916/arm/doc/EWARM_DevelopmentGuide.ENU.pdf
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-11-23 12:54 AM
Posted on November 23, 2012 at 09:54
''With IAR you'd need to link against a suitable library with the level of support you need''
And similarly for other embedded toolsets. Using floating-point brings very large burdens in terms of execution speed and code size - which is why most embedded toolsets will not enable floating-point support unless you specifically request it. Many (most?) calculations in embedded systems can be done perfectly well - and at vastly reduced overhead - with integer arithmetic and a little thought. Or, perhaps, with fixed-point. So a more fundamental question migth be: why do you feel the need for floating point...?
A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
A complex system designed from scratch never works and cannot be patched up to make it work.
