Nios® V Processor Software Developer Handbook

ID 743810
Date 7/20/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.2.1.2. niosv-bsp

Synopsis

niosv-bsp <FUNCTIONS> [OPTIONS] <BSP FILE>

Description

Create, update, generate, or query a BSP. You must specify one of the following commands.
  • create (-c)
  • update (-u)
  • generate (-g)
  • query (-q)
A .bsp settings file is always required. When creating a BSP, specify a .qsys file (-s) and type (-t) . Intel recommends specifying a .qpf file (-p) so that settings used are from the Intel® Quartus® Prime project.

Outputs the files CMakeLists.txt and toolchain.cmake.

A BSP CMakeLists.txt is created to compile the BSP library file. A toolchain.cmake file is also created which contained toolchain options like C compiler, C++ compiler, and link flags required for Nios V processor. The app CMakeLists.txt uses both files. The default BSP TCL scripts run unless specified for create.

By default, the settings file used is <bsp directory>/settings.bsp. You can change the setting by using -s flag.

Usage

# create settings 
niosv-bsp -c -p=<.qpf> -s=<.qsys> -t=<bsp-type> [OPTIONS] settings_file 	
# update settings 	
niosv-bsp -u [OPTIONS] <BSP FILE>                          	
# generate settings 
niosv-bsp -g [OPTIONS] <BSP FILE>                          
# query settings 
niosv-bsp -q [OPTIONS] <BSP FILE>    
                      
Example: niosv-bsp -c --quartus-project=top.qpf --qsys=sys.qsys --type=<hal or ucosii> software/bsp/settings.bsp

Functions

Table 50.  Functions and Descriptions
Functions Description
-c, --create
  • Optional.
  • Creates the BSP settings.
  • Generates BSP files.
-u, --update
  • Optional.
  • Updates the BSP settings.
  • Regenerates BSP files.
-g, --generate
  • Optional.
  • Generates the BSP files.
-q, --query
  • Optional.
  • Queries the BSP files.
  • Allows exporting of BSP as TCL script by specifying option -E=bsp.tcl.

Options

Options Description
<1st arg value>
  • Required.
  • The .bsp settings file.
-s, --qsys=<value>
  • Optional.
  • The .qsys file.
-p, --quartus-project=<value>
  • Optional.
  • The Intel® Quartus® Prime project file.
-r, --rev=<value>
  • Optional.
  • The Intel® Quartus® Prime project revision.
-t, --type=<value>
  • Optional.
  • The BSP type.
  • For use with -c/--create.
  • Use ? as the value to list available types.
-T, --type-version=<value>
  • Optional.
  • The BSP software element version.
  • For use with -c/--create. By default the latest version is used.
  • Use ? as the value to list available types and versions.
-i, --cpu-instance=<value>
  • Optional.
  • The CPU IP instance name to use.
  • Required if there are multiple CPUs in the system.
-n, --no-default
  • Optional.
  • Disable the BSP set defaults TCL script which automatically chooses sane defaults for stdout, code section mappings, and etc.
-E, --export-as-tcl=<value>
  • Optional.
  • The TCL script file name that imports the BSP.
  • For use with q/--query.
-x, --script=<value>
  • Optional.
  • Repeatable.
  • A BSP TCL script to evaluate the software packages.
  • May be specified multiple times.
-e, --cmd=<value>
  • Optional.
  • Repeatable.
  • The BSP TCL command to evaluate the software packages.
  • May be specified multiple times.
-b, --bsp-dir=<value>
  • Optional.
  • The BSP directory. If omitted, the parent directory of the settings file is used by default.
-l, --search-path=<value>
  • Optional.
  • If omitted, a standard default path is used.
  • If provided, a comma-separated list of paths is searched.
  • To include the standard path in your replacement, use "$", like /extra/dir/**/*,$.
--jvm-max-heap-size=<value>
  • Optional.
  • The maximum memory size to be used for allocations when running this tool.
  • This value is specified as <size><unit> where unit can be m (or M) for multiples of megabytes or g (or G) for multiples of gigabytes.
  • The default value is 512m.
--help
  • Optional.
  • Display help for this tool.