Specifications

Device drivers (but not software packages) can use the min_compatible_hw_version and
specific_compatible_hw_version arguments to establish compatibility with their associated hardware
class, as follows:
set_sw_property min_compatible_hw_version 5.0.1
add_sw_property specific_compatible_hw_version 6.1sp1
You can add multiple specific compatible versions. This functionality allows you to roll out a new version
of a device driver that tracks changes supporting a hardware peripheral change.
For device drivers, if no compatible version information is specified, the version of the device driver must
be equal to the associated hardware class. Thus, if you do not wish to use this feature, Altera recommends
setting the min_compatible_hw_version of your driver to the lowest version of the associated hardware
class your driver is compatible with.
Creating Settings for Device Drivers and Software Packages
The BSP generator allows you to publish settings for individual device drivers and software packages.
These settings are visible and can be modified by the BSP user, if the BSP includes your driver or software
package. Use the Tcl command interface to create settings.
The Tcl command that publishes settings is especially useful if your driver or software package has build
or runtime options that are normally specified with #define statements or makefile definitions at
software build time. Settings can also add custom variable declarations to the BSP Makefile.
How Settings Affect the Generated BSP
Settings affect the generated BSP in several ways:
Settings are added either to the BSP system.h or public.mk, or to the BSP makefile as a variable.
Settings are stored in the BSP settings file, named with hierarchy information to prevent namespace
collision.
A default value of your choice is assigned to the setting so that the end user of the driver or package
does not need to explicitly specify the setting when creating or updating a BSP.
Settings are displayed in the BSP summary.html document, along with description text of your choice.
Arguments for add_sw_setting
Use the add_sw_setting Tcl command to add a setting. To specify the details, add_sw_setting requires
each of the following arguments, in the order shown:
type - The data type, which controls formatting of the setting’s value assignment in the appropriate
generated file.
destination - The destination file in the BSP.
displayName - The name that is used to identify the setting when changing BSP settings or viewing the
BSP summary.html document.
identifier - Conceptually, this argument is the macro defined in a C language definition (the text
immediately following #define), or the name of a variable in a makefile.
value - A default value assigned to the setting if the BSP user does not manually change it.
description - Descriptive text, shown in the BSP summary.html document.
Data Types
Several setting data types are available, controlled by the type argument to add_sw_setting. They
correspond to the data types you can express as #define statements or values concatenated to makefile
variables. The specific setting type depends on your software’s structure or BSP build needs.
7-24
Creating Settings for Device Drivers and Software Packages
NII5V2
2015.05.14
Altera Corporation
Developing Device Drivers for the Hardware Abstraction Layer
Send Feedback