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

NIOS Starter Info

Altera_Forum
Honored Contributor II
894 Views

Hello guys, 

I'm a total NEWBIE with NIOS. I'm just a 2nd yr undergrad student trying to compile some C++/C code to the assembly code for NIOS. I need to do some other analysis with the assembly language. Could someone instruct me, step by step, how I get that assembly language? Btw, I installed the NIOSII IDE & SOPC Builder (from the Altera website) but I couldn't get things to work out the way I wanted! :-( 

 

Thanks a bunch in advance~! 

 

Nahid
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
204 Views

I have to assume you installed Quartus II from the web site? Not just Sopc Builder? 

Sopc Builder has not been an installable product for a long time. 

 

Have you followed the tutorials that come with Nios II? 

If you haven't then try them, they are well done and should help you in general.
0 Kudos
Altera_Forum
Honored Contributor II
204 Views

The Nios II compiler is GCC, therefore you ought to try looking at the output of 'nios2-elf-gcc --help'... It should point you towards the "-S" switch (compile only, don't assemble or link). This will allow you to get the intermediate assembly language representation of the C/C++ code that (I think) you're trying to get. 

 

If this is not what you want, then you need to post more details of what you're trying to do... 

 

Hope this helps! 

 

Cheers, 

 

- Brendan
0 Kudos
Altera_Forum
Honored Contributor II
204 Views

If you create your project in the IDE then the HAL makefiles will already contain the correct rules to make assembler files. 

 

Just type `make obj/<filename>.s` from a shell. 

 

You can get preprocessed files (.i files) in a similar way.
0 Kudos
Reply