Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

3.2.2.1. nios2-bsp

Usage

nios2-bsp <bsp-type> <bsp-dir> [<sopc>] [<override>]...

Options

  • <bsp-type>: hal or ucosii .
  • <bsp-dir>: Path to the BSP directory.
  • <sopc>: The path to the .sopcinfo file or its directory.
  • <override>: Options to override defaults.

Description

The nios2-bsp script calls nios2-bsp-create-settings or nios2-bsp-update-settings to create or update a BSP settings file, and the nios2-bsp-generate-files command to create the BSP files. The Nios II Embedded Design Suite (EDS) supports the following BSP types:

  • hal
  • ucosii

BSP type names are case-insensitive.

This utility produces a BSP of <bsp-type> in <bsp-dir>. If the BSP does not exist, it is created. If the BSP already exists, it is updated to be consistent with the associated hardware system.

The default Tcl script is used to set the following system-dependent settings:

  • stdio character device
  • System timer device
  • Default linker memory
  • Boot loader status (enabled or disabled)

If the BSP already exists, nios2-bsp overwrites these system-dependent settings.

The default Tcl script is installed at <Nios II EDS install path>/sdk2/bin/bsp-set-defaults.tcl

When creating a new BSP, this utility runs nios2-bsp-create-settings, which creates settings.bsp in <bsp-dir>.

When updating an existing BSP, this utility runs nios2-bsp-update-settings, which updates settings.bsp in <bsp-dir>.

After creating or updating the settings.bsp file, this utility runs nios2-bsp-generate-files, which generates files in <bsp-dir>

Required arguments:

  • <bsp-type>: Specifies the type of BSP. This argument is ignored when updating a BSP. This argument is case-insensitive. The nios2-bsp script supports the following values of <bsp-type>:
    • hal
    • ucosii
  • <bsp-dir>: Path to the BSP directory. Use "." to specify the current directory.

Optional arguments:

  • <sopc>: The path name of the .sopcinfo file. Alternatively, specify a directory containing a .sopcinfo file. In the latter case, the tool finds a file with the extension .sopcinfo. This argument is ignored when updating a BSP. If you omit this argument, it defaults to the current directory.
  • <override>: Options to override defaults. The nios2-bsp script passes most overrides to nios2-bsp-create-settings or nios2-bsp-update-settings. It also passes the --silent, --verbose, --debug, and --log options to nios2-bsp-generate-files.

    nios2-bsp passes the following overrides to the default Tcl script:

    • --default_stdio <device>|none|DONT_CHANGE

      Specifies stdio device.

    • --default_sys_timer <device>|none|DONT_CHANGE

      Specifies system timer device.

    • --default_memory_regions DONT_CHANGE

      Suppresses creation of new default memory regions when updating a BSP. Do not use this option when creating a new BSP.

    • --default_sections_mapping <region>|DONT_CHANGE

      Specifies the memory region for the default sections.

    • --use_bootloader 0|1|DONT_CHANGE

      Specifies whether a boot loader is required.

      On a preexisting BSP, the value DONT_CHANGE prevents associated settings from changing their current value.

Note: The "--" prefix is stripped when the option is passed to the underlying utility.

If no command-line arguments are specified, this command returns an exit value of 1 and sends a help message to stderr.