Nios® V Processor Software Developer Handbook

ID 743810
Date 5/26/2023
Public

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

Document Table of Contents

4.4.1. Calling a Custom BSP Tcl Script

From the Nios V Command Shell, you can call a custom BSP Tcl script with the niosv-bsp utilities using the option --script=<custom BSP Tcl script>. In the BSP editor, you can execute a Tcl script when generating a BSP, through the Create New BSP Settings File dialog box.

An example of Tcl script to set stdio to my_uart:

set default_stdio my_uart
set_setting hal.stdin $default_stdio
set_setting hal.stdout $default_stdio
set_setting hal.stderr $default_stdio

Any settings you specify in your script override the BSP default values. When you update an existing BSP, you must include any scripts originally used to create it. Otherwise, your project’s settings revert to the defaults.

When you use a custom Tcl script to create your BSP, you must include the script in the set of files archived in your version control system.