Forum Discussion
Altera_Forum
Honored Contributor
13 years agoBasically printf() pulls in a large amount of library code from libc.
There is a 'small BSP' template which will give a much smaller image, I think you than have to use alt_printf(). If you look carefully at the generated program, you'll find that the actual entry point is alt_main() - which does a load of setup (of stdio etc) before calling your main() function. You can avoid most of it by calling your code alt_main() ! A C program to read switches and change LEDs can be very small indeed - but last I looked (some time ago) Altera don't make that one easy to generate.