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++
12652 Discussions

How to use nios2-corss compile tool in command line

Altera_Forum
Honored Contributor II
1,225 Views

Hello, 

I want to use the nios2-corss compile tool in command line (my operating system is Ubuntu 11.10). I want use this tool to compile some source files into ".so" files. 

In command line terminal, I inputted "nios2-", and hit key Tab twice. 

After thar I got this: 

nios2-build-project nios2-gdb-server-wrapped nios2-configure-sof nios2-ide nios2-console nios2-import-project nios2-create-application-project nios2-iss nios2-create-system-library nios2-srec2flash nios2-debug nios2-stackreport nios2-delete-project nios2-stackreport.pl nios2-download nios2-studio nios2-flash-programmer nios2-terminal nios2-flash-programmer-wrapped nios2-terminal.sh nios2-gdb-server nios2-terminal-wrapped  

None of them seemed like tool I need. 

Can anyone give me some advice?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
542 Views

Are you trying to compile shared libraries for linux running on the nios2? 

If so you'll need the cross compiler & tool chain for the target linux - not the toolchain released as part of the Altera IDE (etc). 

(There will be subtle differences in the object file headers.) 

 

Search likely parts of the disk for nios2-elf-*
0 Kudos
Altera_Forum
Honored Contributor II
542 Views

 

--- Quote Start ---  

Are you trying to compile shared libraries for linux running on the nios2? 

If so you'll need the cross compiler & tool chain for the target linux - not the toolchain released as part of the Altera IDE (etc). 

(There will be subtle differences in the object file headers.) 

 

Search likely parts of the disk for nios2-elf-* 

--- Quote End ---  

 

 

What do you mean by shared libraries? 

 

I'm trying to use the toolchain released as part of the Altera IDE. 

I want to know the command line instruction to call the compiler inside nios II IDE 

in order to change the makefile to generate library files that can be used with nios II. Will this be possible without uclinux system?
0 Kudos
Altera_Forum
Honored Contributor II
542 Views

You said you wanted to generate a .so - they are shared (dynamically loaded) libraries, and only apply to operating systems. 

 

If you want to run compiler the IDE runs - in order to use your own makefiles (etc) - then just search for the directory they are in. 

Something like: 

find / -name '*nios2-elf-*' 2>/dev/null 

is rather brutal, but should work. 

Possibly they aren't installed with that prefix, so try looking for '*objdump*' instead. 

 

Another alternative is to download the compiler and toolchain sources and build it youself. Details (and some compiler patches) are on the wiki.
0 Kudos
Reply