FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5281 Discussions

what is the difference between function main() and alt_main()??

AKAYA
Novice
1,272 Views

hello,

 

i need to create a customized boot code for my application.

so, according to the software manual i can make use of alt_main() for implementation of my own coding..

 

can someone please explain me how exactly does the alt_main() function works..

 

0 Kudos
3 Replies
KhaiChein_Y_Intel
124 Views
Hi AKAYA, Normally, your program’s entry point is the function main(). There is an alternate entry point, alt_main(), that you can use to gain greater control of the boot sequence. The difference between entering at main() and entering at alt_main() is the difference between hosted and free-standing applications. Reference: https://www.intel.com/content/www/us/en/programmable/documentation/mwh1416947091611/mwh1416946758774... Thanks.
AKAYA
Novice
124 Views

thanks for the reply....

 

can we use both alt_main() and main() in same project?

if its possible then will the alt_main() fuction calls the main() function by default or we need to call the function explicitly

KhaiChein_Y_Intel
124 Views

Hi AKAYA,

 

Kindly refer to 'Customizing the Boot Sequence' section in https://www.intel.com/content/www/us/en/programmable/documentation/mwh1416947091611/mwh1416946758774...

 

Thanks

 

Reply