12.07.2015 Views

Nios Software Tutorial - Faculty.lasierra.edu

Nios Software Tutorial - Faculty.lasierra.edu

Nios Software Tutorial - Faculty.lasierra.edu

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Nios</strong> <strong>Software</strong> Development <strong>Tutorial</strong><strong>Tutorial</strong>Figure 3. <strong>Nios</strong> SDK Shell2<strong>Tutorial</strong>Compile aProgramIn this section you will compile a program using the <strong>Nios</strong> SDK Shell. Tocompile your program, perform the following steps.1. Change to the software tutorial source directory, /tutorials/<strong>Nios</strong>_SW_<strong>Tutorial</strong>__/cpu_sdk/src, by typing the following command at the <strong>Nios</strong> SDKShell prompt:cd ../tutorials/<strong>Nios</strong>_SW_<strong>Tutorial</strong>__/cpu_sdk/src r2. Compile lcd_demo1.c by typing the following command:nios-build lcd_demo1.c rThe nios-build command compiles and links the source code inlcd_demo1.c, creates an executable S-record file (.srec), and createsthe files shown in Table 6. The nios-build command is an alternativeto the makefile, which is fully supported in <strong>Nios</strong> development kit.For more information on makefiles, refer to the <strong>Nios</strong> EmbeddedProcessor <strong>Software</strong> Development Reference Manual.1 You can use the abbreviated command nb instead of niosbuild.Altera Corporation 21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!