Specifications

Advantages of Command-Line Software Development.........................................................................3-1
Outline of the Nios II SBT Command-Line Interface............................................................................3-1
Utilities.............................................................................................................................................. 3-1
Scripts................................................................................................................................................ 3-2
Tcl Commands.................................................................................................................................3-4
Tcl Scripts..........................................................................................................................................3-4
The Nios II Command Shell...........................................................................................................3-4
Getting Started in the SBT Command Line............................................................................................. 3-5
Prerequisites......................................................................................................................................3-5
Creating Hello_World for an Altera Development Board.........................................................3-6
Running Hello_World on an Altera Development Board.........................................................3-6
Debugging hello_world...................................................................................................................3-7
Software Build Tools Scripting Basics.......................................................................................................3-8
Creating a BSP with a Script...........................................................................................................3-9
Creating an Application Project with a Script...........................................................................3-11
Running make............................................................................................................................................3-12
Creating Memory Initialization Files..........................................................................................3-12
Document Revision History for Getting Started from the Command Line......................................3-12
Nios II Software Build Tools...............................................................................4-1
Road Map for the SBT.................................................................................................................................4-2
What the Build Tools Create..........................................................................................................4-2
Comparing the Command Line with Eclipse...............................................................................4-2
Makefiles....................................................................................................................................................... 4-2
Modifying Makefiles........................................................................................................................4-3
Makefile Targets...............................................................................................................................4-3
Nios II Embedded Software Projects.........................................................................................................4-4
Applications and Libraries..............................................................................................................4-4
Board Support Packages..................................................................................................................4-5
Software Build Process.................................................................................................................... 4-7
Common BSP Tasks.................................................................................................................................... 4-7
Adding the Nios II SBT to Your Tool Flow................................................................................. 4-8
Linking and Locating.....................................................................................................................4-10
Other BSP Tasks.............................................................................................................................4-15
Details of BSP Creation.............................................................................................................................4-19
BSP Settings File Creation............................................................................................................ 4-21
Generated and Copied Files......................................................................................................... 4-21
HAL BSP Files and Folders...........................................................................................................4-21
Linker Map Validation..................................................................................................................4-26
Tcl Scripts for BSP Settings...................................................................................................................... 4-26
Calling a Custom BSP Tcl Script..................................................................................................4-26
Revising Your BSP.....................................................................................................................................4-29
Rebuilding Your BSP.....................................................................................................................4-29
Regenerating Your BSP.................................................................................................................4-30
Updating Your BSP....................................................................................................................... 4-32
Recreating Your BSP..................................................................................................................... 4-33
Specifying BSP Defaults............................................................................................................................4-34
Top Level Tcl Script for BSP Defaults.........................................................................................4-35
TOC-4
Altera Corporation