Content originally posted in LPCWare by starblue on Thu Jun 26 00:54:13 MST 2014
Quote: TheFallGuy
Hint 3. Printf in an embedded system is not normally a good idea...
I disagree, as it is very useful for debugging and generally interacting with the system.
But you have to be aware that it is slow (only use it in those parts of your code that aren't time-critical) and it uses quite a bit of memory (several kB flash, stack memory, possibly heap). So it may not be a good idea on the smallest controllers.
On the other hand, an LPC43xx is more than big enough. (To put that into perspective, in the eighties our UNIX system for six students had 512KB of RAM. Turbo Pascal 1.0 used about 16KB on a 64KB Z80 system, together with an EPROM programmer + 32KB buffer + CP/M OS it fit into 64KB.)
Jürgen