Arduino Forum

Forum 2005-2010 (read only) => Software => Bugs & Suggestions => Topic started by: jims on Apr 15, 2007, 08:16 pm

Title: Support assembly language source files
Post by: jims on Apr 15, 2007, 08:16 pm
For those of us who might be writing a misguided library that requires a fair amount of assembly code, it would be nice if we could have assembly files in our libraries and sketches.

I'm not sure about sketches, but for libraries this little patch works on the principle that gcc knows what to do with a ".S" file. It may have unintended side effects, I'm not sure what the app does in the way of scanning or parsing files.

Index: Library.java
===================================================================
--- Library.java        (revision 252)
+++ Library.java        (working copy)
@@ -260,7 +260,7 @@
  {
    FileFilter onlyCFiles = new FileFilter() {
      public boolean accept(File file) {
-        return (file.getName()).endsWith(".c");
+        return (file.getName()).endsWith(".c") || (file.getName()).endsWith(".S");
      }
    };
    return folder.listFiles(onlyCFiles);