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

How to make the gcc source files for nios2 cpu

Altera_Forum
Honored Contributor II
1,601 Views

I want to modify the gcc source files along with the nios2 development board. How to make the gcc source files to executable? Are there some documents availble for achieving that? 

 

Thanks!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
490 Views

I'm a little confused by your question. I don't see why changing the board would mean you have to change the compiler. You would only need to modify the compiler if you were changing the processor. 

 

You can modify the compiler to change the linker defaults, but all these options can either be changed at the command line or in a linker script. 

 

The only documents for how to build the compiler are the Gnu documents and we would very much advise you against doing this, unless you've done it before.
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

 

--- Quote Start ---  

originally posted by rugbybloke@Dec 2 2004, 10:11 AM 

i'm a little confused by your question. i don't see why changing the board would mean you have to change the compiler. you would only need to modify the compiler if you were changing the processor. 

 

you can modify the compiler to change the linker defaults, but all these options can either be changed at the command line or in a linker script. 

 

the only documents for how to build the compiler are the gnu documents and we would very much advise you against doing this, unless you've done it before. 

--- Quote End ---  

 

thanks! 

Yes, I would like to build some special hardware components in the nios2 system and thus the compile should support the software for the hardware architecture. 

 

I want to add some special assembly instructions(machine instructions) by myself. The compile need to be able to recognize the assembly instructions and generate the machine codes correspondingly.  

 

I could use some existing instructions to make use of the new hardware components, but this method is not very flexible. 

 

By the way, are you familiar with nios2 architecture? I want someone could discuss the nios2 architecture implimentation since I am trying to add some new components in it. Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

Try to use the built in system for custom instructions. Great chance it wil do the job you want to do. If not, please explain a bit more in detail. 

 

Stefaan
0 Kudos
Altera_Forum
Honored Contributor II
490 Views

Hi Cloud, 

 

> I want to add some special assembly instructions(machine instructions) 

> by myself. The compile need to be able to recognize the assembly instructions 

> and generate the machine codes correspondingly. 

 

If you can make do using a macro and inline assembly, it'll save you lots of 

work ... both now and in the future ;-) 

 

--Scott
0 Kudos
Reply