Specifications

add_sw_property
Usage
add_sw_property <property> <value>
Options
<property>: Name of property.
<value>: Value assigned, or appended to the current value.
Description
This command defines a property for a device driver or software package. A property is a list of values (for
example, a list of file names). The add_sw_property command defines a property if it is not already
defined. The command appends a new value to the list of values if the property is already defined.
In the case of a property consisting of a file name or directory name, use a relative path. Specify the path
relative to the directory containing the Tcl script.
This command supports the following properties:
asm_source
Adds a Nios II assembly language source file (.s or .S) to BSPs containing your package. nios2-bsp-
generate-files copies assembly source files into a BSP and adds them to the source build list in the BSP
makefile. This property is optional.
c_source—Adds a C source file (.c) to BSPs containing your package. nios2-bsp-generate-files copies
C source files into a BSP and adds them to the source build list in the BSP makefile. This property is
optional.
cpp_source—Adds a C++ source file (.cpp, .cc, or .cxx) to BSPs containing your package. nios2-bsp-
generate-files copies the C++ source files into a BSP and adds them to the source build list in the BSP
makefile. This property is optional.
include_source—Adds an include file (typically .h) to BSPs containing your package. nios2-bsp-
generate-files copies include files into a BSP, but does not add them to the generated makefile. This
property is optional.
include_directory—Adds a directory to the ALT_INCLUDE_DIRS variable in the BSP's public.mk file.
Adding a directory to ALT_INCLUDE_DIRS allows all source files to find include files in this directory.
add_sw_property adds the path to the generated public makefile shared by the BSP and applications
or libraries referencing it. add_sw_property compiles all files with the include directory listed in the
compiler arguments. This property is optional.
lib_source—Adds a precompiled library file (typically .a) to each BSP containing the driver or
package. nios2-bsp-generate-files copies the precompiled library file into the BSP directory and adds
both the library file name and the path (required to locate the library file) into to the BSP's public.mk
file. Applications using the BSP link with the library file. The library file name must conform to the
following pattern: lib<name>.a where <name> is a nonempty string. Example: add_sw_property
lib_source HAL/lib/libcomponent.aThis property is optional.
specific_compatible_hw_version—Specifies that the device driver only supports the specified
component hardware version. See the version property of the set_sw_property command for
information about version strings. This property applies only to device drivers (see the create_driver
command), not to software packages. If your driver supports all versions of a peripheral after a specific
release, use the set_property min_compatible_hw_version command instead. This property is
optional. This property is only available for device drivers.
15-100
add_sw_property
NII5V2
2015.05.14
Altera Corporation
Nios II Software Build Tools Reference
Send Feedback