Nios® II Software Developer Handbook

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

8.9.1. Header Files and alt_sys_init.c

At the heart of the HAL is the autogenerated source file, alt_sys_init.c. This file contains the source code that the HAL uses to initialize the device drivers for all supported devices in the system. In particular, this file defines the alt_sys_init() function, which is called before main() to initialize device drivers software packages, and make them available to the program.

When you create the driver or software package, you specify in a Tcl script whether you want the alt_sys_init() function to invoke your INSTANCE and INIT macros.

For more information, refer to the “Enabling Software Initialization” chapter.

Note: The remainder of this section assumes that you are using the alt_sys_init() HAL initialization mechanism.