Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12596 Discussions

Installation and configuration problems

Altera_Forum
Honored Contributor II
1,192 Views

Hi All 

 

I've downloaded and installed the uClinux ver 1.4 on my machine. I have Quartus 5.0 with SP1 and Nios 5.0 installed. Towards the end of the installation I received a message saying that the cygwin extensions were not installe correctly and that I should look at the Readme file to see how this should be done manually. I read that file but saw no reference to this problem. 

I've ignored this error and moved on, but after starting a new project (a kernel project) and trying to run the configure kernel script, but got the following output from it: 

 

------------------------------------------------ 

Microtronix Linux Extensions 

Version 1.4, Built June 20, 2005 

------------------------------------------------ 

make: Entering directory `/cygdrive/c/Altera/kits/nios2/bin/eclipse/plugins/com. 

microtronix.nios2linux.kernel_1.4.0/linux-2.6.x' 

no emulation specific options. 

HOSTCC scripts/basic/fixdep 

/usr/local/bin/ld: cannot open crt0.o: No such file or directory 

collect2: ld returned 1 exit status 

make[2]: *** [scripts/basic/fixdep] Error 1 

make[1]: *** [scripts_basic] Error 2 

make: *** [menuconfig] Error 2 

make: Leaving directory `/cygdrive/c/Altera/kits/nios2/bin/eclipse/plugins/com.m 

icrotronix.nios2linux.kernel_1.4.0/linux-2.6.x' 

 

Where should the crt0.o file be located ? when does it get installed ? 

Does this have to do anything with the cygwin extensions not being installed correctly ? 

 

After reading the posts in this forum I've tried performing the following steps: 

1. Uninstalled nios2linux. 

2. uninstalled Nios II 

3. Reboot 

4. Installed nios II 

5. Reboot 

6. Installed nios2linux. 

 

The same problems repeat themselves. 

 

Any ideas, anyone ? 

 

Nir
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
404 Views

Maybe your nios2linux and Nios2IDE rar packages are damaged? Try to get the lost file from these RAR package directly.

0 Kudos
Altera_Forum
Honored Contributor II
404 Views

Hi 

 

The uClinux zip file contains a crt0.o file in two locations: 

c:\Altera\nios2linux-1.4\cygwin\usr\lib\crt0.o 

c:\Altera\nios2linux-1.4\plugins\com.microtronix.nios2linux.uClibc_1.4.0\lib\crt0.o 

 

When I look under c:\Altera\quartus50\bin\cygwin\usr\lib I do find a crt0.o file there. 

 

So, is the problem with the path for finding this file ? 

 

Nir
0 Kudos
Altera_Forum
Honored Contributor II
404 Views

Nir, 

 

The crt0.o is your startup file. There are a couple of different ones on your machine. There should be one in your /usr/llib directory. This one is for your host machine and looks like it is the one your linker is complaining about. 

 

From your comment: 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

When I look under c:\Altera\quartus50\bin\cygwin\usr\lib I do find a crt0.o file there.[/b] 

--- Quote End ---  

 

I would say your Nios II installation is not complete, and has nothing to do with your uClinux installation. Try something simple, pick a full-featured Nios II design in one of the altera example directories. Compile a hello_world.c file against it, then go back and try your uClinux stuff. 

 

There should also be several located in your nios2 directories; however, I&#39;m pretty sure these are all the same. Link against these when your building code to execute in a single threaded environment (no uClinux).  

 

There will also be be one in your uClibc directory. This is the one you want to link against when building your Linux applicatoins. You can link against the ones in your nios2 directories; however, your applications will bomb when you try to execute them on uClinux. 

 

Doug
0 Kudos
Altera_Forum
Honored Contributor II
404 Views

Hi dcurry 

 

Thanks for the advice, but it didn&#39;t work. I tried using a simple hello_world prgram and that compiled ok. Also, I use the IDE to write dome other software projects and never have I seen any error like this.  

When I try to search for crt0.o files on my computer I find many of them in the projects&#39; directories. I&#39;m not really sure what&#39;s wrong. Can it be some paths that should be defined ? 

 

Any help would be appreciated on this. 

 

Nir
0 Kudos
Altera_Forum
Honored Contributor II
404 Views

Nir, 

 

Let&#39;s skip the ones in your project directories. For your uClinux development work, you should only need 2 of them. A crt0.o in your /usr/lib directory for any binaries needed by your host platform to do the kernel build, and one located in your /......../**uClibc_1.4.0/lib directory for your Nios II Linux exacutables. 

 

A crt0.o file should be found in your Altera installed cygwin environment. From the shell, you should find one in the /usr/lib directory (actual path is something like: /cygdrive/c/altera/quartus50/bin/cygwin/usr/lib). 

 

Do you have one in any of your Quartus cygwin directories? 

 

In the shell do: 

cd / 

find . -name crt0.o 

 

Based on your previous post. It looks like you have the one in your uClibc directory. 

 

Doug
0 Kudos
Altera_Forum
Honored Contributor II
404 Views

dcurry 

 

Funny thing. I ran the find command and got the following output: 

 

[SOPC Builder]$ cd / 

[SOPC Builder]$ find . -name crt0.o 

find: ./usr/lib: No such file or directory 

 

 

However, when I go to the path you&#39;ve suggested (/cygdrive/..../usr/lib), the path does exists and contains a crt0.o file. 

 

Am I doing something wrong here ? 

 

Nir
0 Kudos
Altera_Forum
Honored Contributor II
404 Views

Nir, 

 

Hmmm, I would guess your cygwin environment is not set up correctly. A cheesy fix would be to create the /usr/lib directory, then copy the contents of /cygdrive/...../usr/lib into this directory. 

 

Doug
0 Kudos
Reply