Keil Logo Arm Logo

Libraries and Floating Point Support Guide

Entering and exiting programs linked with microlib

Entering and exiting programs linked with microlib

Use main() to begin your program. Do not declare main() to take arguments.

Your program must not return from main(). This is because microlib does not contain any code to handle exit from main(). You can ensure that your main() function does not return, by inserting an endless loop at the end of the function. For example:

void main()
{
  ...
  while (1); // endless loop to prevent return from main()
}

Microlib does not support:

  • command-line arguments from an operating system

  • programs that call exit().

Copyright © 2007-2008, 2011-2012 ARM. All rights reserved.ARM DUI 0378D
Non-ConfidentialID062912

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.