Open Nios II (Quartus Prime) and provide the workspace location.
Create a new Application Project: go to File → New → Nios II Application and BSP from Template
Add a new Hardware Platform: click … from the Target Hardware information section.
Specify the already generated Hardware Platform Specification File (more details about the generation: https://wiki.analog.com/resources/fpga/docs/build): in the SOPC Information File name section and browse the desired file.
Give a name to the project and select the Blank Project template and click Finish
The new Blank project should look like:
Create a new folder called src under sw folder
Copy all the source code files into the src directory.
The SDK should automatically build the projects and the Console window will display the result of the build. If the build is not done automatically select the Project → Build Automatically menu option.
At this point the software project setup is complete, the FPGA can be programmed and the software can be downloaded into the system.
You can program the FPGA by opening Programmer (Quartus Prime) provided by the Quartus Prime Software Suite. Click the Auto Detect button. The detected devices should be displayed now in the device list.
Double-click the first device under the File column and browser for the .sof file required for the project. Make sure the Program/Configure column is checked. Press the Start button to program the FPGA.
After the FPGA was programmed, we need to create a new Run configuration in the Nios II project, by selecting Run → Run Configurations…, in the Run Configuration windows select the Nios II Hardware and click at the New Configuration button at the upper left corner.
At the Project tab define your current project name and application executable. (.elf)
On the Target Connection tab, press the Refresh Connections button. You may need to expand the window or scroll to the right to see this button.
Check the Ignore mismatched system ID option.
Check the Ignore mismatched system timestamp option.
The output of the example program can be viewed in the Console Window.
When the run configuration is done, the software can be started by clicking the Run button.
Your new bare metal application should run
resources/fpga/altera/software_setup.txt · Last modified: 02 Oct 2019 14:08 by Antoniu Miclaus