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>8. Press any of the pushbuttons SW0 through SW3 on the <strong>Nios</strong>development board and watch the LCD screen display the followingmessage:The time is now Download, Run& Debug theProgram Usingthe <strong>Nios</strong> OCIDebug Console9. Close the Insight debugger to continue with the rest of the tutorial.The <strong>Nios</strong> SDK Shell returns to command mode. Leave both <strong>Nios</strong>SDK Shell windows open to perform the steps in the followingsection.1 If you wish to reload the program and restart the debuggingsession, you should exit Insight and use the nios-debugcommand again from the <strong>Nios</strong> SDK Shell prompt. See Step 4 onpage 23.In this section, you will download the lcd_demo1.srec to the developmentboard, launch the <strong>Nios</strong> OCI Debug Console (debug console), and performbasic debugging from the debug console. The <strong>Nios</strong> OCI Debug Consoleallows you to perform basic debugging using a command-line interface,similar to a debug monitor interface.In addition to performing basic debugging, <strong>Nios</strong> Development Kit, StratixProfessional Edition users can also set complex data breakpoint triggerslike breaking execution when a specific data value is stored to a specificaddress. See the First Silicon Solutions’ Getting Started: System Analyzer for<strong>Nios</strong> Processor Core for details.2<strong>Tutorial</strong>The design files for this section use the serial port for basic hostcommunication and the JTAG port for debugging communication. Youmust use the JTAG port to communicate with the <strong>Nios</strong> OCI DebugModule. You will use the <strong>Nios</strong> SDK Shell you opened in “Open the <strong>Nios</strong>SDK Shell” on page 20, which is in command mode to launch the debugconsole. You will open a second <strong>Nios</strong> SDK Shell for host communication.1 You should have two <strong>Nios</strong> SDK Shell windows open. If you donot, choose Programs > Altera > <strong>Nios</strong> > <strong>Nios</strong> SDKShell (Windows Start menu) twice to open two <strong>Nios</strong> SDK shells.Perform the following steps to download, run, and debug the program.1. Type the following command in the shell to enter terminal mode andconnect to the serial port on the host PC:nios-run –t -r rAltera Corporation 29

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

Saved successfully!

Ooh no, something went wrong!