Showing results for 
Search instead for 
Did you mean: 
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Hello LED Freestanding Example

Hello LED Freestanding Example

Last Updated:

May 19, 2008. Nios II EDS v8.0


This program is an example of a "free-standing" C application. A free-standing program "owns" the hardware, and cannot rely on system-services or device-drivers being initialized for hardware devices, device drivers and system services. This freestanding program has its entry point at alt_main, as such if you modify this example and try to call C library functions such as printf, they will not work unless you explicitly initialize the system.

This program simply shifts an 8-bit variable back and forth, writing the variables value to the system's LED PIO peripheral on every iteration.


  • Source code for example application
  • readme.txt
  • Create-this scripts for app and bsp


  • NOTE: If you are using Nios II EDS v7.2 or earlier then this design example is already contained in the example folder of your installation.
  • The following steps are for Nios II EDS v8.0 and later.
  1. Download the zip file.
    1. Copy the hardware example design for your board from the Nios II EDS installation (c:\altera\<version_number>\nios2eds\examples\<verilog or vhdl>) to your working directory.
    2. Extract the contents of the zip file to the software application directory for the hardware project in your working directory. For example if you are using the standard verilog hardware design in the Nios II Development Kit, Cylcone II Edition, extract the zip file to \<work_directory>\niosII_cycloneII_2c35\standard\software_examples\app.
    3. Refer to the introduction of the Nios II Software Build Tools chapter for instructions on building and running this example:

Hardware Requirements:

This example requires the following devices to be present in the target hardware design: 

  • PIO peripheral named "led_pio".

You can run this software design example on the following Nios II hardware design examples:

Nios II Development Board, Stratix® II Edition:

  • Standard
  • Small
  • Full Featured

Nios II Development Board, Stratix Professional Edition:

  • Standard
  • Small 
  • Full Featured

Nios II Development Board, Stratix Edition:

  • Standard
  • Small 
  • Full Featured

Nios II Development Board, Cyclone® II Edition:

  • Standard
  • Small 
  • Full Featured

Nios II Development Board, Cyclone Edition:

  • Standard
  • Small
  • Low Cost 
  • Full Featured



Version history
Last update:
‎06-27-2019 03:54 PM
Updated by: