Forum Discussion
Altera_Forum
Honored Contributor
16 years agoWhat is the difference between main() and alt_main()?
I write a very simple program, driving LED through PIO. Both function can work. If using main() , the code size is 1940 bytes. If alt_main(), the code size is 472 bytes. It seems that main() include ...
Altera_Forum
Honored Contributor
16 years agoActually it is the default alt_main() that contains the extra code - either side of the call to main().
Largely this is code for initialising stdio for printf() - which pulls in a lot of library code.