- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm a beginner in Nios II software development. I used the Quartus 13.0, the Qsys and the Nios II EDS for Eclipse to create the count_binary example for the CycloneIII_3c25 Starter Kit. Everything is OK if "Run As -> Nios II Hardware" is used. But I cannot create an Internal Boot Memory Initialization (.hex) File. I follow the steps to create memory initialization files in the Nios II Software Developer's Handbook. 1. Right-click the application project. 2. Point to Make targets and click Build to open the Make Targets dialog box. 3. Select mem_init_generate. 4. Click Build. 5. Add the .qip (meminit.qip) file to the Quartus II project. But I cannot find the .hex files 6. Recompile the Quartus II project. After it I see the warning "Can't find design file <Project name>_mem.hex" There is another way to create memory initialization file - to use the mem_init.mk But how one can include this file in the application makefile and how a target can be set properly is unknown. Any idea? Regards, tdutyLink Copied
- « Previous
-
- 1
- 2
- Next »
30 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me try and explain a bit more how the Jtag UART works.
The Jtag UART IP inside the FPGA has a small fifo (I think it's 32 bytes by default) and is connected to a virtual JTAG target. When you open a Nios terminal, it connects to that virtual JTAG target through the USB blaster. When your application wants to print something, the JTAG UART driver will write the characters into the hardware fifo, and the Nios terminalwill read them through the JTAG connection, and display them for you. When you use the "Run as..." function in Eclipse, it will automatically open a Nios terminaland connect it for you. But if you just upload a .sof file to the FPGA with Quartus, then there isn't any Nios terminalconnecting to the virtual JTAG target. When this happens and if you try to print anything, the driver will start filling up the fifo, but nothing on the other side will read from it. After a short while, the fifo is full (and with only 32 bytes, this happens very quickly). What to do then? Some drivers choose in that case to throw away the characters and return immediately. The text is lost, but the application still runs. Some drivers, on the other hand, choose to wait for the fifo to have some space again. In that case, your software will stop, at least until you open a Nios terminal. I don't know if it's possible to only open a Nios terminal in Eclipse, without downloading a new software image, but if you open a Nios console (start menu, Altera, Nios II EDS, Nios II command shell) and type "nios2-terminal" then you'll get a terminal.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Daixiwen!
I will take your explanation in account. But now I cannot create the BSP project - the Software Developer's Handbook gives such advices that I can't use for I don't know the sintax of the Bash Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Daixiwen!
I knew you are the skilful expert and could make sure it was right. I recompiled my projects using the jtag uart, created the .hex file, included it and the .qip file into the hardware project, recompiled it and downloaded the new .sof. Of course my application did not start as you warned about. But after I started the nios2-terminal in the command shell - leds began blinking and the Nios console window began to display numbers from the counter used in my application. That is you've been quite right. Thank you. But now another issue pursues me. I cannot create my own BSP project. The Nios II Software Developer's Handbook and the Embedded Design Handbook give cross references to each other. More over one can find a list of steps to create the BSP project but no advice how to fulfill them. One is advised to start with the Nios II BSP Editor - I do it but all its tabs are grey. Another way - use the command line but where to learn the commands syntax? One way more - use the old project but I get a message that the project already exists and cannot modify it. Could not you advise where one may read the rules how to create a BSP project (and then the software application project) not from the template but - from the very beginning, - from the existing project. Regards, tduty- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Daixiwen!
Many various attempts to create my own software project were unsuccessful. And at last the following was successful. According to the ch.2 of the Nios II Software Developer's Handbook I followed "Creating a Project" and "Nios II Application and BSP from Template". Many details are described there but one must guess to choose "Blank Project" if he wants to create his own. Then on the second page you are suggested to create a new BSP. But how to do it? Be patient! Read some new items of the Handbook and learn to click FINISH to create the projects. Though when you select an existing project there is the "Create" button for it. Then you must build the Project (the only one or may be both?). Every time I tried to build the application project and got the error message. But today I chose the BSP project building first and only then the application building. That was the reason I could not get the compiled project. Though it's written in the Handbook that SBT builds the dependency (i.e. BSP) project first. But it does not do it itself! So I could create all the projects. Everything is OK. One my question remains. I would like to become acquainted with the bash commands and command-line commands syntax. Where to learn it? Thank you for your help. I thank benc for his help too. Regards, tduty- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't use Eclipse that much, but IIRC when you create a new project, one of the options is "Nios 2 application with BSP". Then you can select the .sopcinfo file to use to generate the BSP and everything should be done automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately I don't know what is the IIRC.
By the way is there the bash commands and the command-line commands collector with their syntax explanation? Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, IIRC just means "If I Remember Correctly" ;)
You'll find a list and description of the command line tools here: http://www.altera.com/literature/hb/nios2/edh_ed51004.pdf- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Daixiwen!
I found the 4-th chapter of unknown document - ch.4 "Nios II Command-Line Tools". There are many interesting items in it. But though the document was revised in 2011 it contains the SOPC builder commands and no commands for the Qsys. I believe the SOPC builder is already obsolete? There are examples how to use commands. But I would like to have an opportunity to learn somehow what does a specific command mean. For example where can I learn how to unterprit a command - set_global_assignment -name SEARCH_PATH $::quartus(qip_path) (This is contained in the meminit.qip) I found the Bash Reference Manual in the Inet but not such a command yet. If you can influence on the Altera support it is desirable for them not to hide the list and syntax of the bash commands and command-line commands. Regards, tduty- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The QSys commands are probably described somewhere in the QSys chapters of the Quartus user manual.
As for you other question, set_global_assignment is a TCL command and not a command line utility. You will find more information about TCL in this chapter: http://www.altera.com/literature/hb/qts/qts_qii52003.pdf- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Daixiwen!
Regards, tduty
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »