Nios ii--Experiment 1--hello_world software part

Source: Internet
Author: User

Hello_world

Software development
    1. First, create a new software folder inside the hardware Engineering folder to place the software part; open toolsàNios II 11.0 software Build Tools for Eclipse, need to workspace Launcher (Workspace) path settings, it is important to note that the path does not contain spaces, etc., and then click OK.

?

  1. New project. Click File--New->? Nios II application and BSP from template, pops up Nios II application and BSP from Template dialog box. Select the corresponding SOPC system first, click the browse button after Sopc information file name, select the soft core file that was previously done by the hardware section, The suffix name is. Sopcinfo, it is important to note that the selected files must correspond, otherwise the system will fail because of a soft and hard mismatch. Here Select the Hello_world.sopcinfo, then the system will automatically read the CPU name, no more settings, the following fill out project name, here to fill in the Lab1_hello_world, Project template (Project Template) using the default. Then click Finish to finish. This will generate two project files in the Project Explorer on the left.

  2. Right click Helloword Project, select Nios II, BSP editor, enter the Nios II BSP editor configuration interface. It is configured primarily under the Main tab in Hall. Then click Generate to generate the BSP library. When the build is complete, click Exit to quit.

  3. Compile the project. Right-click to select Build Project. The first compile, the time will be more frequent, wait patiently.
  4. When the compilation is complete, download the. sof file to the FPGA first

  5. Right-click the project, select Run as--Nios II Hardware, pop Up the Run Configurations dialog box, the Default Project tab, project name and project ELF file name should all have content, Not a choice. Then go to the Target Connection tab, and if there is nothing in connections, click on the Refresh connection on the right to find the downloader, then click System ID prroperties ..., Check if the ID number was set before, click Apply, then click Run, this is the program will be downloaded automatically, and finally in the Nios II Console tab will show the results of the program run after the download is complete.

  6. Running the results in the Debug window output Hello from Nios ii! indicates the test was successful!

Experiment Code

#include <stdio.h>

?

int Main ()

{

printf ("Hello from Nios ii!\n");

printf ("Hello daxigua fpga!\n");

?

return0;

}

?

Nios ii--Experiment 1--hello_world software part

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.