Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Nios Command Line Shell

Altera_Forum
Honored Contributor II
983 Views

Has anyone successfully created their .hex and .qip file for the quartus project from simply the command line? What I would like to do is take my source file (.s), and using only the command line, generate the .hex and .qip.  

 

Thanks, 

 

Matt
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
134 Views

I have currently attempted the following. 

 

 

Generate BSP using nios2-bsp command. 

Generate makefile using nios2-app-generate-makefile command. 

Build project using make all command. This generates a .elf file. 

Generate hex file using elf2 hex command. 

 

The problem is, I am getting a different hex file than what the GUI is giving me. I know the .hex file created in the GUI works, it has been tested successfully. I need to obtain the same result using command line tools.  

 

Thanks, 

Matt
Altera_Forum
Honored Contributor II
134 Views

Any recommendations?

Altera_Forum
Honored Contributor II
134 Views

I will go ahead and post my success story for anyone interested in the future. 

 

As stated above, I was able to generate a hex file from 4 commands listed above and only my source file (.c in this case), and .sopcinfo file. I was concerned about this hex files functionality because it was different from what the make targets option gave me in the GUI. I ended up including this new hex file in my project and it worked as expected! 

 

One thing I would like to note.  

 

When using make targets in the GUI, you are given a hex file along with a meminit.qip. This .qip is to be added to your quartus project in order for the tools to find the proper initialization files. In my case, using the command line method did not produce this .qip file. I ended up including the .hex file in the project and the Nios "found it" no problem. I am guessing that the "include memory initialization file" option for the Nios memory in Qsys allowed for no need of the meminit.qip. 

 

Hope this helps. 

Matt
Reply