Recent Changes - Search:

References

Notes

edit SideBar

AssemblyMods

Notes.AssemblyMods History

Show minor edits - Show changes to output

2011-02-18 23:49 by Jonathan Cook -
Changed lines 39-41 from:
That's it! Rebuild the arduino environment and it will support Assembly files!
to:
That's it! Rebuild the arduino environment and it will support Assembly files! Note that
these files must be in gcc-syntax assembly code, which might have slight differences
to official Atmel AVR assembly code.
2011-02-18 23:47 by Jonathan Cook -
Changed lines 9-12 from:
the changes should be easily found in later distributions.
to:
the changes should be easily found in later distributions. The actual modified files
can be grabbed here:
[[http://www.cs.nmsu.edu/~jcook/arduino/mods/Sketch.java | Sketch.java]] and
[[http://www.cs.nmsu.edu/~jcook/arduino/mods/Compiler.java | Compiler.java]]
2011-02-18 21:59 by Jonathan Cook -
Added lines 1-36:
The Arduino environment can easily be modified to allow assembly source files to be used
in the IDE. In fact, the back-end compiler invocation code already supports it, and what
is needed is simply to allow the IDE to recognize and support the Assembly files.

The existing back-end code assumes a capital-S file extension, but in keeping with the
gcc conventions, we support a lowercase .s extension to indicate an assembly file.

This page describes the changes to the arduino-0022 distribution, but the locations of
the changes should be easily found in later distributions.

In the file app/src/processing/app/Sketch.java, near line 1343, add support for
recognizing the .s extension by adding a clause to the if-condition, as:

[@
for (SketchCode sc : code) {
if (sc.isExtension("c") || sc.isExtension("cpp") ||
sc.isExtension("h") || sc.isExtension("s")) {
// no pre-processing services necessary for java files
@]

Then in the same file around line 1802, add "s" to the list of extensions, as:

[@
public String[] getExtensions() {
return new String[] { "pde", "c", "cpp", "h", "s" };
}
@]

I have no idea why the code around line 1343 does not use the getExtensions() method,
but it should. I am trying to make minimal changes so I'm not fixing existing code ;-)

Then in the file app/src/processing/app/debug/Compiler.java, starting around line 108
you will see four calls to ''compileFiles()'' that include a search for files with a
capital-S extension. Change these to a lowercase s.

That's it! Rebuild the arduino environment and it will support Assembly files!
Edit - History - Print - Recent Changes - Search
Page last modified on 2011-02-18 23:49