Nios® V Processor Software Developer Handbook

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

4.3.2.8. Importing Tcl Script to Create a New BSP

The following example illustrates how to configure a new BSP with an imported Tcl script. You import the Tcl script with the BSP Editor when you create a new BSP settings file.

In this example, you create the Tcl script by hand, with a text editor. You can also use a Tcl script exported from another BSP, as described in Exporting a Tcl Script.

To configure a new BSP with a Tcl script, follow these steps:

  1. With any text editor, create a new file called example.tcl.
  2. Insert the below contents in the file.
    set_setting hal.enable_reduced_device_drivers true 
    set_setting hal.enable_sim_optimize true
    
  3. In the Platform Designer, in the File menu, click New BSP.
  4. In the BSP Settings File Name box, select a folder in which to save your new BSP settings file. Accept the default settings file name, settings.bsp.
  5. In the Operating System list, select Intel HAL.
  6. In the Additional Tcl script box, navigate to example.tcl.
  7. In the Platform Designer Information File Name box, select the .qsys file.
  8. Click OK. The BSP Editor creates the new BSP. The settings modified by example.tcl appear as in the following figure.
Figure 6.  Nios® V Processor BSP Settings (Configured with example.tcl)
Note: Do not attempt to import an Intel HAL Tcl script to a RTOS BSP or vice versa. Doing so can result in errors. Some BSP settings are OS-specific, making scripts from different OSes incompatible.

For more information about commands that can appear in BSP Tcl scripts, refer to Board Support Package Tcl Commands.