comparison target-utils/libprintf/README @ 11:40f607bb0a2c

target-utils refactored
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 01 May 2013 07:39:35 +0000
parents loadagent/libprintf/README@45bf8af5f061
children
comparison
equal deleted inserted replaced
10:e2e80a09338e 11:40f607bb0a2c
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).