Jump to content
43oh

Open source (BSD-3-Clause) embedded text formatting library released


Recommended Posts

In the tradition of giving 43oh folks first notice when I release something that may be relevant:

 

embtextf is a library of routines supporting text formatting for embedded systems.  Primarily, this is printf(), but done in a way that's agnostic of whether output is to a UART, an LCD, a memory buffer, or whatever.  The implementation is pretty feature-complete with respect to C standard format strings, excepting floating point.  Unwanted features can be disabled at compile-time to reduce memory.

 

There are also functions to convert C integer data types (int, long, long long) to text in any radix from 2 to 36, for when you can't spare the stack space that generic printf has to reserve.  Sure you can write these yourself, but throwing them in along with printf was easy.

 

The bulk of this is extracted and refactored from the implementations in msp430-libc.  The motivation for 43oh would be to get full printf() support in less memory when using Code Composer Studio; I'm using this for the console support of BSP430 (CCS support coming soon).  It's also useful on other microcontrollers: e.g. the CodeSourcery ARM compilers use newlib underneath, and getting newlib's printf() to function properly is a very bad dream if not an outright nightmare (and it's a space hog).

 

Check out the documentation, and provide any feedback/bugs/suggestions issue tracker.

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.

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