Jump to content

Recommended Posts

I would like to share with you this library. Is an embedded version of the famous "printf ( )".




The start point was this post in the e2e where an user share a code.


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).




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.

Link to post
Share on other sites

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.




I was rather fond of a version Rickta59 wrote, but I think it was based on the original code from the above post.

Link to post
Share on other sites
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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...