Forum Discussion
Altera_Forum
Honored Contributor
21 years agoI haven't looked at those two sample codes, but the led one probably uses alt_main since it's pretty simple to write to leds, hello world would use main since it need to set up a lot more (Jtag UART).
If you have ever done assembly programming in NIOS I think of alt_main as the assembly version you would do without all the extra overhead involved, and the main version as what the C compiler would spit out (with all kinds of overhead). If you need a fast start out of reset and want to save memory then alt_main is the way to go (if you know what you are doing with the setup of other devices attached to the NIOS II)