Specifications

In the Windows operating system, on the Start menu, point to Programs > Altera > Nios II EDS
<version>,and click Nios II <version> Command Shell:.
In the Linux operating system, in a command shell, change directories to <Nios II EDS install path>,
and type the command nios2_command_shell.sh.
Auto-Executing a Command in the Nios II Command Shell
In certain situations, you might need to run a command or a script automatically after the Nios II
Command Shell is initialized. When you start the Nios II Command Shell environment, to automatically
execute a command perform one of the following steps, depending on your environment:
In the Windows operating system, execute the following command:
“<Nios II EDS install path>/Nios II Command Shell.bat“ <command>r
In the Linux operating system, execute the following command:
<Nios II EDS install path>/nios2_command_shell.sh <command>r
For example, in Windows, to run an automated build, you might execute the following command:
“<Nios II EDS install path>/Nios II Command Shell.bat custom_build.shr
The Nios II Command Shell startup script (Nios II Command Shell.bat or nios2_command_shell.sh)
makes no special assumptions about its initial environment. You can use the Nios II Command Shell with
auto-execution from any environment that accepts commands native to your host operating system. For
example, in Linux you can use crontab to schedule a job to run in the Nios II Command Shell at a later
time.
Getting Started in the SBT Command Line
Using the Nios II SBT on the command line is the best way to learn about it. The following tutorial guides
you through the process of creating, building, running, and debugging a “Hello World” program with a
minimal number of steps. Later chapters provide more of the underlying details, allowing you to take
more control of the process. The goal of this chapter is to show you that the basic process is simple and
straightforward.
The Nios II SBT includes a number of scripts that demonstrate how to combine command utilities to
obtain the results you need. This tutorial uses a create-this-app script as an example.
Prerequisites
To complete this tutorial, you must have the following:
Altera Quartus II development software, version 8.0 or later. The software must be installed on a
Windows or Linux computer that meets the Quartus II minimum requirements.
The Altera Nios II Embedded Design Suite (EDS), version 8.0 or later.
An Altera development board.
A download cable such as the Altera USB-Blaster
cable.
You run the Nios II SBT commands from the Nios II Command Shell.
Related Information
The Nios II Command Shell on page 3-4
NII5V2
2015.05.14
Auto-Executing a Command in the Nios II Command Shell
3-5
Getting Started from the Command Line
Altera Corporation
Send Feedback