Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

4.3.4.2. Download Executable Code and Start the Debugger

  1. Right-click the hello_world project, point to Debug As, and click Nios® II Hardware.
  2. If the Confirm Perspective Switch dialog box appears, click Yes.

    After a moment, the main() function appears in the editor. There is a blue arrow next to the first line of code, indicating that execution has stopped on this line.

    Note: When targeting Nios® II hardware, the Debug As command does the following tasks:
    • Creates a default debug configuration for the target board
    • Establishes communication with the target board
    • Downloads the .elf file to memory on the target board
    • Sets a breakpoint at main()
    • Instructs the Nios® II processor to begin executing the code
  3. In the Run menu, click Resume to resume execution. You can also resume execution by pressing F8.
    Note: When debugging a project in Eclipse, you can also pause, stop, and single-step the program, set breakpoints, examine variables, and perform many other common debugging tasks.