Forum Discussion
Altera_Forum
Honored Contributor
22 years agodifference between main() and alt_main() ?
My customer NIOS2 config is : cyclone 1C20, SDRAM, EPCS4. And SDRAM memory base is locked at 0x0. Reset address and Exception address is set to SDRAM. When I debug hello_led.c in my board, progr...
Altera_Forum
Honored Contributor
22 years agoIn short the difference is that main() does initialization for you then calls alt_main() (if you have the compiler spit out an object dump file you'll see both if you use main).
So if you're confident enought to do any initialization yourself then you can speed up your time to live of the NIOS II by using alt_main(). I think alt_main() is a unix thing if I'm not mistaken (I'm not used to them cause I'm just a windows programmer). Cheers