Specifications
• supported_bsp_type—Adds a specific BSP type (operating system) to the list of supported operating
systems that the driver or software package supports. Specify HAL if the software supports the Altera
HAL, or operating systems that extend it. If your software is operating system-neutral and works on
multiple HAL-based operating systems, state HAL only. If your software or driver contains code that
depends on a particular operating system, state compatibility with that operating system only, but not
HAL.
The name of another operating system to support must match the name of the operating system
exactly. This operating system name string is the same as that used to create a BSP with the nios2-
bsp-* commands, as well as in the .tcl script that describes the operating system, in its create_os
command.
When you create a BSP with an operating system that extends HAL, such as UCOSII, and the BSP tools
select a driver for a particular hardware module, precedence is given to drivers which state compati‐
bility with a that specific operating system (OS) before a more generic driver stating HAL compatibility.
This property is only available for device drivers and software packages. This property must be set to at
least one operating system.
• alt_cppflags_addition—Adds a line of arbitrary text to the ALT_CPPFLAGS variable in the BSP
public.mk file. This technique can be useful if you wish to have a static compilation flag or definition
that all BSP, application, and library files receive during software build. This property is optional.
• excluded_hal_source—Specifies a file to exclude from the a BSP generated with an operating system
that extends HAL. The value is the path to a BSP file to exclude, with respect to the BSP root. This
property is optional.
• systemh_generation_script—Specifies a .tcl script to execute during generation of the BSP system.h
file. This script runs with the tcl commands available to other BSP settings tcl scripts, and allow you to
influence the contents of the system.h file. This property is available only to operating systems, created
with the create_os command. This property is optional.
add_sw_setting
Usage
add_sw_setting <type> <destination> <displayName> <identifier> <value> <description>
Options
• <type>: Setting type - Boolean, QuotedString, UnquotedString.
• <destination>: The destination BSP file associated with the setting, or the module generator that
processes this setting.
• <displayName>: Setting name.
• <identifier>: Name of the macro created for a generated destination file.
• <value>: Default value of the setting.
• <description>: Setting description.
Description
This command creates a BSP setting associated with a software package or device driver. The setting is
available whenever the software package or device driver is present in the BSP. nios2-bsp-generate-files
converts the setting and its value into either a C preprocessor macro or BSP makefile variable.
add_sw_setting passes macro definitions to the compiler using the -D command-line option, or adds
them to the system.h file as #define statements.
The setting only exists once even if there are multiple instances of a software package. Set or get the
setting with the --set and --get command-line options of the nios2-bsp, nios2-bsp-create-settings,
nios2-bsp-query-settings, and nios2-bsp-update-settings commands. You can also use the BSP Tcl
NII5V2
2015.05.14
add_sw_setting
15-101
Nios II Software Build Tools Reference
Altera Corporation
Send Feedback