Nios® V Processor Software Developer Handbook

ID 743810
Date 7/08/2024
Public
Document Table of Contents

8.8.5.2.7. Enabling Software Initialization

If your driver or software package uses the HAL auto-initialization mechanism, your source code includes INSTANCE and INIT macros, to create storage for each driver instance, and to call any initialization routines. The generated alt_sys_init.c file invokes these macros, which must be defined in a header file named <hardware component class>.h.

To support this functionality in Nios® V processor BSPs, you must set the set_sw_property command’s auto_initialize argument to true using the following Tcl command:

set_sw_property auto_initialize true

If you do not turn on this attribute, alt_sys_init.c does not invoke the INIT and INSTANCE macros.