Forum Discussion
Altera_Forum
Honored Contributor
12 years agoMost of the memory is needed for the libc functions that Altera support by default.
In particular printf() drags in about 70k of code because it is built on top of the standard stdio library code which also pulls in malloc(). Even if you don't actually call printf() there is code to close the fds after main returns. There is a 'small' version (that uses alt_printf() etc), but even that isn't as small as it could be. It really ought to be possible to write a 'hello world' program in less than a 100 instructions, and use that as a base for simple embedded systems.