Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
Actually 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. - Altera_Forum
Honored Contributor
Hi sabertooth
I copy here the comment to alt_main() definition /* * alt_main is the C entry point for the HAL. It is called by the assembler * startup code in the processor specific crt0.S. It is responsible for: * completing the C runtime configuration; configuring all the * devices/filesystems/components in the system; and call the entry point for * the users application, i.e. main(). */ Regards - Altera_Forum
Honored Contributor
Many thanks to Cris72.