Specifications

Table 7-5: 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.
Related Information
Nios II Software Build Tools Reference on page 15-1
Setting Display Name
The setting displayName controls what the end user of the driver or package (the BSP developer) types to
control the setting in their BSP. BSPs append the displayName text after a . (dot) separator to your driver
or software package’s name (as defined in the create_driver or create_sw_package command). For
example, if your driver is named my_peripheral_driver and your setting’s displayName is
small_driver, BSPs with your driver have a setting my_peripheral_driver.small_driver. Thus each
driver and software package has its own settings namespace.
Setting Generation Name
The setting generationName of add_sw_setting controls the physical name of the setting in the
generated BSP files. The physical name corresponds to the definition being created in public.mk and
system.h, or the make variable created in the BSP Makefile. The generationName is commonly the text
that your software uses in conditionally-compiled code. For example, suppose your software creates a
buffer as follows:
unsigned int driver_buffer[MY_DRIVER_BUFFER_SIZE];
You can enter the exact text, MY_DRIVER_BUFFER_SIZE, in the generationName argument.
Setting Default Value
The value argument of add_sw_setting holds the default value of your setting. This value propagates to
the generated BSP unless the end user of the driver or package (the BSP developer) changes the setting’s
assignment before BSP generation.
Note:
The value assigned to any setting, whether it is the default value in the driver or software package
Tcl script, or entered by the user configuring the BSP, must be compatible with the selected setting.
For more information, refer to the "Nios II Software Build Tools Reference" chapter.
7-26
Setting Display Name
NII5V2
2015.05.14
Altera Corporation
Developing Device Drivers for the Hardware Abstraction Layer
Send Feedback