Specifications
To support this functionality in Nios II 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.
Related Information
Provide *INSTANCE and *INIT Macros on page 7-14
Adding Include Paths
By default, the generated BSP Makefile and public.mk add include paths to find header files in /inc or
<BSP type>/inc folders.
You might need to set up a header file directory hierarchy to logically organize your code. You can add
additional include paths to your driver or software package using the add_sw_property command’s
include_directory argument as follows:
add_sw_property include_directory UCOSII/inc/protocol/h
Note:
If the path begins with the BSP type (e.g HAL or UCOSII), the BSP type is removed and replaced
with the value of the bsp_subdirectory property.
Additional include paths are added to the preprocessor flags in the BSP public.mk file. These preprocessor
flags allow BSP source files, as well as application and user library source files that reference the BSP, to
find the include path while each source file is compiled.
Note:
Adding additional include paths is not required if your source code includes header files with
explicit path names. You can also specify the location of the header files with a #include directive
similar to the following:
#include "protocol/h/<filename>"
Version Compatibility
Your device driver or software package can optionally specify versioning information through the Tcl
command interface. The driver and software package Tcl commands specifying versioning information
allow the following functionality:
• You can request a specific version of your driver or software package with BSP settings.
• You can make updates to your device driver and specify that the driver is still compatible with a
minimum hardware class version, or specific hardware class versions. This facility is especially useful
in situations in which a hardware design is stable and you foresee making software updates over time.
The <version> argument in each of the following versioning-related commands can be a string containing
numbers and characters. Examples of version strings are 8.0, 5.1.1, 6.1, and 6.1sp1. The “.” character is
a separator. The BSP generator compares versions against each other to determine if one is more recent
than the other, or if two are equal, by successively comparing the strings between each separator. Thus,
2.1 is greater than 2.0, and 2.1sp1 is greater than 2.1. Two versions are equal if their version assignment
strings are identical.
Use the version argument of set_sw_property to assign a version to your driver or software package. If
you do not assign a version to your software or device driver, the version of the Nios II EDS installation
(containing the Nios II BSP commands being executed) is set for your driver or software package:
set_sw_property version 7.1
NII5V2
2015.05.14
Adding Include Paths
7-23
Developing Device Drivers for the Hardware Abstraction Layer
Altera Corporation
Send Feedback