- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear NIOS2 Users,
My last post seems to be not in the forum anymore. That's why I post it one more time. I would like to write code for NIOS2 processor in sheer assembler. Having the code compiled I can store it easily in my on-chip memory. However, when I try compiling example code: .section .reset, "ax" .section .exceptions, "ax" .global exception_handler .text .global _start _start: /* start function */ br _start .data .end instead of receiving only one jmp opcode (a few bytes) in my output file I receive around 900 bytes. I compile my code using: nios2-elf-as -ad %1.s -o a.out nios2-elf-ld a.out --strip-all --strip-debug -o %1.elf -b binary For x86 users: I would like to get the same result like using /t with tasm assembler. Please help me solving the problem. Thank you for your help in advance, MichałLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE (Koza @ Jul 3 2009, 09:03 AM) <{post_snapback}> (index.php?act=findpost&pid=22998)</div>
--- Quote Start --- Please help me solving the problem. Thank you for your help in advance,[/b] --- Quote End --- Really no help with the issue? If something is not clear, please let me know. Altera support up to date is helpless... Best regards, Michał- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does nios2-elf-size <your ELF> return? In this case, the size of the ELF (itself) is not really relevant since it contains more than what would be stored in memory.
Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will need to use nios2-elf-objcopy tool to convert the ELF formatted file into raw machine code. Set the target format to raw. The help and manual for that tool probably contains an example, because that is a common operation.
Reply if you have problems and the manual doesn't help enough.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page