- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I feel like a complete idiot because this should be easy. But I've spent a ton of time looking everywhere for the answer and am drawing blanks.
How do you add an assembly file (.asm) to a Nios project and get it to compile? Any .asm files I add are completely ignored when I build the project. I can inject complete gibberish in them and I don't get so much as a peep from the builder. What is strange is that in my preferences, under file types, it shows an entry for .asm as being hooked up for assembly. But nothing happens to those files. Thanks for any help, -todd-Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you have to use .s files instead of .asm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- I think you have to use .s files instead of .asm[/b] --- Quote End --- I tried that, but then it complains that the .c file is missing. For example. "file.s" will result in the makefile complaining that it doesn't know how to make "file.c". That's because it only expects "file.s" *after* it has compiled "file.c" (.s is the intermediate filename for C/C++ code that's been converted to assembly).- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NiosII uses a stock (for the most part) GCC toolchain. Just doing a quick hunt on Google yields the answer. GCC is expecting .S, not .s.
Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- GCC is expecting .S, not .s.[/b] --- Quote End --- Ahhh, that's it! Thank you very much. I was going crazy because the IDE has references to .asm in the preferences section. I now know those are red herrings. VisualDSP from Analog Devices and VisualStudio from Microsoft both take .asm files, so I thought that's how you do it here. Now I know why none of my googles involving Nios and asm brought up any answers. Thanks again, -todd-
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