Altera Nios II Specifications Page 85

  • Download
  • Add to my manuals
  • Print
  • Page
    / 468
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 84
Creating BSP by Manually Running nios2-bsp
If you create a BSP by running nios2-bsp manually on the command line or by running your own script
that calls nios2-bsp-generate-files, you can put your BSP settings file (typically named settings.bsp) under
version control. As in the scripted nios2-bsp case, if you install a new release of Nios II EDS and recreate
your BSP, the internal implementation might change slightly.
Creating BSP before Running Make
If you want the exact same BSP after installing a new release of Nios II EDS, create your BSP and then put
the entire BSP directory under version control before running make. If you have already run make, run
make clean to remove all built files before adding the directory contents to your version control database.
The SBT places all the files required to build a BSP in the BSP directory. If you install a new release of
Nios II EDS and run make on your BSP, the implementation is the same, but the binary output might not
be identical.
Creating a Script that Uses the Command-Line Tools
If you create a script that uses the command-line tools nios2-bsp-create-settings and nios2-bsp-
generate-files explicitly, or you use these tools directly on the command line, it is possible to create the
BSP settings file in a directory different from the directory where the generated BSP files reside. However,
in most cases, when you want to store a BSP’s generated files directory under source control, you also
want to store the BSP settings file. Therefore, it is best to keep the settings file with the other BSP files. You
can rebuild the project without the BSP settings file, but the settings file allows you to update and query
the BSP.
Note:
Because the BSP depends on a .sopcinfo file, you must usually store the .sopcinfo file in source
control along with the BSP. The BSP settings file stores the .sopcinfo file path as a relative or
absolute path, according to the definition on the nios2-bsp or nios2-bsp-create-settings command
line. You must take the path into account when retrieving the BSP and the .sopcinfo file from
source control.
Copying, Moving, or Renaming a BSP
BSP makefiles have only relative path references to project source files. Therefore you are free to copy,
move, or rename the entire BSP. If you specify a relative path to the SOPC system file when you create the
BSP, you must ensure that the .sopcinfo file is still accessible from the new location of the BSP.
This .sopcinfo file path is stored in the BSP settings file.
Run make clean when you copy, move, or rename a BSP. The make dependency files (.d) have absolute
path references. make clean removes the .d files, as well as linker object files (.o) and .a files. You must
rebuild the BSP before linking an application with it. You can use the make clean_bsp command to
combine these two operations.
For more information about .d files, refer to the GNU make documentation, available from the Free
Software Foundation, Inc. website.
Another way to copy a BSP is to run the nios2-bsp-generate-files command to populate a BSP directory
and pass it the path to the BSP settings file of the BSP that you wish to copy.
If you rename or move a BSP, you must manually revise any references to the BSP name or location in
application or user library makefiles.
NII5V2
2015.05.14
Creating BSP by Manually Running nios2-bsp
4-9
Nios II Software Build Tools
Altera Corporation
Send Feedback
Page view 84
1 ... 84 85 86 ... 468

Comments to this Manuals

No comments