agaelema 39 Posted April 10, 2016 Share Posted April 10, 2016 I would like to share with you this library. Is an embedded version of the famous "printf ( )". - https://github.com/agaelema/Embedded_Printf The start point was this post in the e2e where an user share a code. - http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/30479/107146 I modified the code inserting new functions as binary notation, float notation, scientific notation, functions to convert numbers into strings and strings into numbers. The user can enable some #define enabling/disabling functions to use just what is useful. This is an resume comparison between the CCS native "printf" and this library (using th Launchpad EXP430FR6989 at 1MHz). - http://processors.wiki.ti.com/index.php/Printf_support_for_MSP430_CCSTUDIO_compiler To facilitate the port to other devices there is a separated file. Currently there are two ports: MSP430G2553 and MSP430FR6989. I hope it is useful. Fmilburn, bluehash and tripwire 3 Quote Link to post Share on other sites
yyrkoon 250 Posted April 10, 2016 Share Posted April 10, 2016 I would like to point out that there has been extensive talk about printf() on these forums, and there is a version that compiled down into 106 bytes if I remember correctly. Which can grow even more rapidly the more functionality you require. http://forum.43oh.com/topic/1289-tiny-printf-c-version/ I was rather fond of a version Rickta59 wrote, but I think it was based on the original code from the above post. tripwire 1 Quote Link to post Share on other sites
agaelema 39 Posted April 11, 2016 Author Share Posted April 11, 2016 My initial objective is not create the smaller or better code, is just learn more things related to embedded world. This code has a lot to improve in size and performance, but anyway, can be useful for someone, even though there are many others. Thanks for the link, I will study it. The approach to convert the number seems to be more efficient. tripwire 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.