Nios II Classic Software Developer’s Handbook

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

4.5. Details of BSP Creation

BSP creation is the same in the Nios II SBT for Eclipse as at the command line. The nios2-bsp-create-settings utility creates a new BSP settings file.

For more information about BSP settings files, refer to the “BSP Settings File Creation” chapter.

nios2-bsp-generate-files creates the BSP files. The nios2-bsp-generate-files utility places all source files in your BSP directory. It copies some files from the Nios II EDS installation directory. Others, such as system.h and Makefile, it generates dynamically.

The SBT manages copied files slightly differently from generated files. If a copied file (such as a HAL source file) already exists, the tools check the file timestamp against the timestamp of the file in the Nios II EDS installation. The tools do not replace the BSP file unless it differs from the distribution file. The tools normally overwrite generated files, such as the BSP Makefile, system.h, and linker.x, unless you have disabled generation of the individual file with the set_ignore_file Tcl command or the Enable File Generation tab in the BSP Editor. A comment at the top of each generated file warns you not to edit it.

For more information about set_ignore_file and other SBT Tcl commands, refer to Software Build Tools Tcl Commands in the "Nios II Software Build Tools Reference" chapter.

Note: Avoid modifying BSP files. Use BSP settings, or custom device drivers or software packages, to customize your BSP.
Figure 7. Default Tcl Script and nios2-bsp-generate-files Both Using the .sopcinfo file
Note: Nothing prevents you from modifying a BSP generated file. However, after you do so, it becomes difficult to update your BSP to match changes in your hardware system. If you regenerate your BSP, your previous changes to the generated file are destroyed.

For more information about regenerating your BSP, refer to the “Revising Your BSP” chapter.