User guide

Tutorials
Info: (tutorial_project.elf) 78 KBytes program size (code + initialized
data).
Note: The program size you see might differ depending on your target SOPC
Builder system.
Next, change the system library settings to reduce code size. Perform the following steps:
1. Right-click the tutorial project in the Nios II C/C++ Project view, and click
System Library Properties. The Properties dialog box appears.
2. Click System Library in the left-hand pane. The System Library page appears.
3. Turn off Clean exit (flush buffers)—This option affects how the program
behaves after main() returns. This example program, similar to most embedded
programs, never returns from main(). Therefore, the program has no need for any
post-main() code.
4. Turn on Reduced device drivers—This option causes each device driver in the
system library to link in a reduced foot-print version of its driver, if it has one. In
this example, the JTAG UART switches to a smaller, polled-operation driver (by
default it is interrupt-driven), which executes slower but has a smaller code foot-
print. The LCD driver's response to this option is to include no driver, and
therefore the LCD will stop functioning.
5. Click OK to accept these settings. You return to the Nios II IDE workbench.
6. Right-click the tutorial project in the Nios II C/C++ Projects view, and click Build
Project.
7.
When the build completes, you can see the size of the resulting executable code, displayed
in the Console view:
Info: (tutorial_project.elf) 53 KBytes program size (code + initialized
data).
Note: The program size you see might differ depending on your target SOPC
Builder system.
Congratulations! You have completed the Software Development Tutorial.
You can learn more about the Nios II IDE in the Nios II IDE Help, and by reading the Nios II
documentation located at <Nios II EDS install path>/documents/index.htm. On Windows,
you can click Start, point to Programs, Altera, Nios II EDS <version>, and then click
Nios II <version> Documentation.
Previous: Debugging the Project
Related Nios II IDE Help Topics
Properties Dialog Box
System Library Page (Properties Dialog Box)
27