comparison target-utils/libprintf/README @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
1 The present libprintf is a very light printf implementation that is well-suited
2 for simple bare-metal programs like loadagent; in the present case it overrides
3 the much heavier printf implementation in newlib. Programs like the present
4 loadagent only need printf in order to scribble on the serial console port,
5 and the most sensible implementation is to have the "character output" function
6 from the guts of printf point directly to the physical UART output routine, or
7 a trivial wrapper that turns \n into \r\n. In contrast, newlib's version would
8 pull in the complete FILE table infrastructure and malloc etc - maybe OK for
9 more complex embedded programs that use those facilities for other things under
10 a bona fide RTOS, but it would be disgusting to pull that stuff in for a
11 minimal program like ours.
12
13 The present printf implementation has been used earlier by the same author
14 (Michael Spacefalcon) in the StarMON family of PowerPC bootloaders, and in my
15 MC68x302-based SDSL CPE devices (Hack-o-Rocket and OSDCU).