Forum Discussion
NIOS II Tutorial Problems
Hi, I did some searching on my problem but could not track down an answer hence the need to post here,
I have been working through the Nios II Hardware Development tutorial and have run into two snags. I am using Quartus II 10.1Sp1 and Nios II Eds 10.1 On page 1-28 NiosII EDS the tutorial tells me to use the Create New NiosII Application and BSP from template option to create the source code. In the dialog box I enter the name 'count_binary', and select the template file 'count_binary' as instructed. However when I click finish, only the bsp project appears in the left hand column, not the actual count_binary application. If I inspect the design files folder, then a 'software' directory has been created and both the count_binary and count_binary_bsp directories have been created. I don't know why the 'count_binary' project is not being added automatically. To fix this problem I added the 'count_binary' application manually. When I then try to proceed with the tutorial by right clicking on the the count_binary application and selecting build project I get two errors: 1)make:***[count_binary.elf] Error 1 count_binary line 0 2)undefined reference to 'main' alt_main.c line 154 I suspect that this might be related to the fact that the NiosII EDS did not correctly create the project in the first step, but I have not found much help on the situation. Hopefully someone here knows what might be going on. Thanks13 Replies
- Altera_Forum
Honored Contributor
The first issue you described could be caused by the directory path of your project. I've seen the same issue and I believe in my case it was a directory naming issue. If that isn't the issue ensure the file permissions are set correctly for your project directory.
- Altera_Forum
Honored Contributor
Hi,
I have the same problem! "In the dialog box I enter the name 'count_binary', and select the template file 'count_binary' as instructed. However when I click finish, only the bsp project appears in the left hand column, not the actual count_binary application." I can't import count_binary to the project. Anyone suggest what to do? Would be a license problem? best regards - Altera_Forum
Honored Contributor
I also have this problem and I am sure that this is a limitation of the free edition. I have a full license for Quartus/Nios 9.0 and everything works fine. I also installed Web-edition 10.1 to play with Bemicro (waist of time and money). If I generate any template-based *.c file, like hello_world.c, it is not readable at all, probably encrypted. If I add my own file with the same name, I can not compile either, because of the errors like "undefined reference to 'main' alt_main.c". I've never seen such problems with fully licensed version.
- Altera_Forum
Honored Contributor
I didn't get add the folder count_binary to the project (it was created in a default directory by the SBT).
I don't have a full license, too. And now, do you suggest me anything? - Altera_Forum
Honored Contributor
I fixed my first problem, which also fixed the compilation errors as suspected, by doing this:
I have a two drive laptop. My program files were on the C: drive and my design files were on the D: drive. I tried putting the design files on the C:drive in the Documents folder, instead of on the D: drive and now it seems to correctly generate both the projects in the NiosII IDE correctly. It also compiles without errors now too. So it does seem like it is some kind of naming issue. However now I have another problem. I download the .sof file to the FPGA from Quartus II, and when I build the project in the NIOS II system all is fine. However if I go to run the system as NiosII hardware I get the following message: [Target Connection]: No Nios II target connection paths were located. Check connections and that a Nios II .sof is downloaded. Searching the forums, I tried downloading the .elf file manually from the Nios Shell and it worked fine, no problems at all and the LEDs are counting along with the shell JTAG UART output. Any ideas why the interface is not detecting the connection? It does seem to find the connection when I bring up the System Console window. It would be much simpler to download using the interface than having to constantly switch to the shell. - Altera_Forum
Honored Contributor
simono71,
Are you testing your project with a full license or a free version of Quartus? Best Regards - Altera_Forum
Honored Contributor
With the free version, so I have to leave the little confirm dialog running once I have downloaded the .sof file to the FPGA (which incidentally is the Altera cyclone II starter board that is basically equivalent to a DE1).
- Altera_Forum
Honored Contributor
I have a free version and it is happen with me, too. I'm using a DE2 (Cyclone II). I checked my laptop drives and put all archives (program files and project files) in D: drive. The error still happen. I will try execute the project with a full license. AFter of it I post the result and i'm waiting for news.
- Altera_Forum
Honored Contributor
Hi all,
I also had the same problem in the starting.I dont know why it happens, but I could remove it in this way. Delete the .metadata folder created in your workspace and the software folder created in the folder of the sample project and try to do it again.It did that for 2 to 3 times and i could get both the count_binary and the bsp file in the proj explorer window. I think it happens because there is some problem in linking when we try to use the .sopcinfo file in the template. I dont think it has any license issues as I am also using the free web edition from the altera site. Also dont forget to run it as an admin / have full admin control rights while running the code. My files also got corrupted at a point when I could not open the count_binary files. I tried by deleting the previous files in the software folder and the metadata and it worked.I downloaded the elf file in my board and got results. - Altera_Forum
Honored Contributor
Hi,
So, I'm trying do that, but i think I'm commiting a bizarre error. When a try remove the .metadata folder from directory, the project archives don't appear in the current workspace on de SBT. If I am working with the SBT in the moment, it isn't possible remove the .metadata folder. If I close the SBT and remove the folder, when I open again, the files project won't appear there.