Nios® V Processor Software Developer Handbook

ID 743810
Date 7/08/2024
Public
Document Table of Contents

8.8.5.3.1. How Settings Affect the Generated BSP

Settings affect the generated BSP in several ways:
  • Settings are added either to the BSP system.h or toolchain.cmake as a preprocessor macro.
  • 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 toolchain.cmake.
  • 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