This source replaces the standard printf() and sprintf() functions in the compiler C library with low resource version with a limited set of features and output types.
Features of miniprintf include:
• %c character
• %d,%i signed integer (- sign added if needed)
• %s character string
• %u unsigned integer as decimal
• %x or %X unsigned integer as hexadecimal (uppercase)
• %% to write %
• Padding with 0 or space, up to 9 digits
• #define to allow for additional padding characters ._?
• #define to allow %f floating point representation up to 2 decimals
Normal printf()/sprintf() implementations on ARM have been measure at ~25K of flash space, using miniprintf can restore ~22K of flas...
Sign Up For Full Access
Members gain full access to the Prosource library with dozens of source files for ARM Cortex, ATMega, PIC processors
as well as desktop and embedded Linux systems. Solutions for bootloaders, Buildroot and Yocto targets as well as guided articles
on embedded development to gain critical knowledge in new systems and speed up development.