Specifications
* This example prints 'Hello from Nios II' to the STDOUT stream. It also
* tests inclusion of a user software package.
*/
#include <stdio.h>
#include "example_sw_package.h"
int main()
{
printf("Hello from Nios II!\n");
example_sw_package();
return 0;
}
8. Delete hello_world.c from the hello_example_sw_package application project.
9. In the File menu, point to New and click Nios II Library
10.Set the project name to example_sw_package_library.
11.For Location, browse to <example package>\EXAMPLE_SW_PACKAGE\lib
Note: Building the library here is required, because the resulting .a is referenced here by example_sw_
package_sw.tcl.
12.Click Finish.
13.Build the example_sw_package_library project to create the libexample_sw_package_library.a library
archive file.
14.Right-click the BSP project, point to Nios II, and click BSP Editor to open the BSP Editor.
15.In the Software Packages tab, find example_sw_package in the software package table, and enable it.
If there are any errors in a software package's *_sw.tcl file, such as an incorrect path that causes a file to
not be found, the software package does not appear in the BSP Editor.
16.Click the Generate button to regenerate the BSP. On the File menu, click Save to save your changes to
settings.bsp.
17.In the File menu, click Exit to exit the BSP Editor.
18.Build the hello_example_sw_package_bsp BSP project.
19.Build the hello_example_sw_package application project.
hello_example_sw_package.elf is ready to download and execute.
Programming Flash in Altera Embedded Systems
Many Nios II processor systems use external flash memory to store one or more of the following items:
• Program code
• Program data
• FPGA configuration data
• File systems
The Nios II SBT for Eclipse provides flash programmer utilities to help you manage and program the
contents of flash memory. The flash programmer allows you to program any combination of software,
hardware, and binary data into flash memory in one operation.
Starting the Flash Programmer
You start the flash programmer by clicking Flash Programmer in the Nios II menu.
2-28
Programming Flash in Altera Embedded Systems
NII5V2
2015.05.14
Altera Corporation
Getting Started with the Graphical User Interface
Send Feedback