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 II Assembler Editor

Altera_Forum
Honored Contributor II
2,028 Views

Hi guys 

I'm gonna state my problem very shortly, the thing is that i'm really not a C/C++ language fan when it comes to programming, i spent my whole life writing assembly codes for a varity of processors. 

with niosii, this turns out to be a seriouse issue as i don't have an assembler to help me writing my applications (i know the reason but still it would be better to have a standard assembler with limited functions) 

anyway, i've tried jniosemu as it's all what uncle google gave me but it sucks, simply because it doesn't support all of the nios II instruction set. i've heard about nios2sim which sounds better but i couldn't find a source to download it. 

So that's it, maybe one of you guys can share a link to nios2sim for us or even any other assembler editor if any. 

Ps/ i don't know if we can use SBT for eclipse to write assembly codes, if yes plz mention the way to do so breifly or post a link to a description regarding this point 

thx folks :-P
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
830 Views

Use any text editor to create a file with a .s extension and feed the file to gcc - as you would with a C file. 

In practise the compiler generated code won't be that much larger/slower than carefully wrtitten C, and it less likely to have obscure bugs. 

You might need to understand the constraints the language puts on the compiler, and modify the C appropriately (especially if trying to get rid of pipeline stalls), but the C generated code will be more maintainable. 

 

It can be worth looking at the generated code to check that nothing silly is happening.
0 Kudos
Altera_Forum
Honored Contributor II
830 Views

thx dsl,  

i'm gonna try gcc and see although i'm using altera monitor program to compile and link codes after writing'em in jniosemu for now (with little modifications regarding directives and special registers and some instructions to match those of nios II). i'm wondering if an application exists to help programmers writing codes in assembly from scratch like in 8085, 8086 or even Z80 as i searched for days with no hopes!
0 Kudos
Altera_Forum
Honored Contributor II
830 Views

These days I write my assembler in C :-)

0 Kudos
Altera_Forum
Honored Contributor II
830 Views

You can used GCC (nios2-elf-gcc.exe) to assemble and pre-process assembly code 

 

There's also nios2-elf-as.exe (GAS).
0 Kudos
Altera_Forum
Honored Contributor II
830 Views

It is often useful to get asm source processed by cpp. 

This is easier if you feed it into gcc.
0 Kudos
Reply