Nios® II Software Developer Handbook

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

8.8.5.3.3. Setting Destination Files

The destination argument of add_sw_setting specifies settings and their assigned values. This argument controls the file to which the setting is saved in the BSP. The BSP generator formats the setting’s assigned value based on the definition file and type of setting.
Table 40.  Destination File Settings
Destination File Setting Value Notes
system.h system_h_define This destination file is recommended in most cases. Your source code must use a #include <system.h> statement to make the setting definitions available. Settings appear as #define statements in system.h.
public.mk public_mk_define Definitions appear as -D statements in public.mk, in the C preprocessor flags assembly. This setting type is passed directly to the compiler during build and is visible during compilation of application and libraries referencing the BSP.
BSP makefile makefile_variable Settings appear as makefile variable assignments in the BSP makefile.
Note: Certain setting types are not compatible with the public.mk or Makefile destination file types.

For more information, refer to the " Nios® II Software Build Tools Reference" chapter.