Article ID: 000081256 Content Type: Product Information & Documentation Last Reviewed: 09/11/2012

How do I run a Nios II software application from flash?

Environment

  • Nios® II Processor
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    Description

    In order to run Nios® II software from flash, you must provide at least a small bit of volatile memory (RAM) for the .rwdata section, the stack, and the heap.  These sections cannot be located in flash because they need to be writeable at runtime.

    You can run a Nios II software application from flash by following these steps:

    1. Ensure your SOPC Builder system contains at least a small amount of RAM (on or off-chip).  The amount of RAM required depends on the application.  2 Kbytes should be sufficient for most small C programs.
    2. Create your software project in the Nios II IDE
    3. In the System Library Properties, set the following sections to flash
      • .text
      • .rodata
    4. In the System Library Properties, set the following sections to RAM
      • .rwdata
      • stack
      • heap
    5. Build the project in the Nios II IDE
    6. Program the development board with the hardware image (SOF) using the Quartus® II Programmer
    7. Program the software project into flash using the Flash Programmer in Nios II IDE (Tools menu)
    8. Once that has completed, press the CPU reset button to run the software program stored in flash.

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices