Altera_Forum
Honored Contributor
20 years agoAssembly code
i would like to see the assembly code generate after building project
but i think it's not possible I tryed to search everywhere but witout result what do you think about ? ciaoi would like to see the assembly code generate after building project
but i think it's not possible I tryed to search everywhere but witout result what do you think about ? ciaonios2-elf-objdump -d your_program_elf
elf filw is the executable code
i try to open but inside there are cripted caracters . Anyway there are strange letters ciaoHi,
the easiest way to view the disassembly of your programm is: - start the Nios2 IDE. - make sure the generation of a objdump file is enabled. (In Nios2 IDE check Window->Preferences->Nios II->Generate objdump file) - compile your project - after that in the folder <your project directory>/Debug there should be a file called <your_program>.elf.objdump. This file contains (among other things) a disassembly of your executable Note that this call disassembles ALL your sections, including the sections containing your initialized data. Don't be confused by this. I hope this helps.yes now i see
uncredible, it's better C/C++ language http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif but i think that for the future will be good to write some function called in Nios II ide , written in assembly code The problem is understand how to do , because in the documentation there are not examples. for example if i'd like write something about this i have to declare asm(" instruction " instruction ); end_asm or something about this thanks ciao walter<div class='quotetop'>QUOTE </div>
--- Quote Start --- yes now i see uncredible, it's better C/C++ language[/b] --- Quote End --- Note that the disassembly is intermixed with your c code. The objdump utility makes use of the debugging information in your .elf file and prints your code at the appropriate places. <div class='quotetop'>QUOTE </div> --- Quote Start --- for example if i'd like write something about this i have to declare asm(" instruction " instruction ); end_asm[/b] --- Quote End --- If you want to write inline assembly code (assembly embedded into c code), you should check the gcc documentation at http://gcc.gnu.org/onlinedocs (http://gcc.gnu.org/onlinedocs) , as the Nios2 IDE is a "frontend" for the gcc compiler.thanks
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif