Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

7.13.9. 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 C++ functions registered with atexit(). In particular, exit() is called on return from main(). Two HAL options allow you to minimize or eliminate this exit code.