Nios® V Processor Software Developer Handbook

ID 743810
Date 4/01/2024
Public
Document Table of Contents

6.11.10. Eliminate Unneeded Exit Code

The HAL calls the exit() function at system shutdown to provide a clean exit from the program. exit() flushes all of the C library internal I/O buffers and calls any functions registered with atexit(). In particular, exit() is called on return from main().

You can eliminate unneeded exit code, if your application fulfils the requirements below:
  • The application main() runs in an infinite loop
  • No plan to return from main()

Two HAL options allow you to minimize or eliminate this exit code.