Skip to main content
added 4 characters in body
Source Link
Majenko
  • 105.9k
  • 5
  • 82
  • 139

The IDE should be able to accept .S files (not .s - the difference is very important: .S will be preprocessed, .s won't).

Just create a new sketch, and create a new tab called whatever.S (obviously rename the whatever to whatever you want to call it.

Then in the main sketch .ino file put something like:

extern "C" void myAssemblyMain();

void setup() {
    myAssemblyMain();
}
void loop() {
}

That will then call the function myAssemblyMain: in your assembly file and not much else.

(Note: I haven't tested this since I don't use the Arduino IDE).

The IDE should be able to accept .S files (not .s - the difference is very important: .S will be preprocessed, .s won't).

Just create a new sketch, and create a new tab called whatever.S (obviously rename the whatever to whatever you want to call it.

Then in the main sketch .ino file put something like:

extern void myAssemblyMain();

void setup() {
    myAssemblyMain();
}
void loop() {
}

That will then call the function myAssemblyMain: in your assembly file and not much else.

(Note: I haven't tested this since I don't use the Arduino IDE).

The IDE should be able to accept .S files (not .s - the difference is very important: .S will be preprocessed, .s won't).

Just create a new sketch, and create a new tab called whatever.S (obviously rename the whatever to whatever you want to call it.

Then in the main sketch .ino file put something like:

extern "C" void myAssemblyMain();

void setup() {
    myAssemblyMain();
}
void loop() {
}

That will then call the function myAssemblyMain: in your assembly file and not much else.

(Note: I haven't tested this since I don't use the Arduino IDE).

Source Link
Majenko
  • 105.9k
  • 5
  • 82
  • 139

The IDE should be able to accept .S files (not .s - the difference is very important: .S will be preprocessed, .s won't).

Just create a new sketch, and create a new tab called whatever.S (obviously rename the whatever to whatever you want to call it.

Then in the main sketch .ino file put something like:

extern void myAssemblyMain();

void setup() {
    myAssemblyMain();
}
void loop() {
}

That will then call the function myAssemblyMain: in your assembly file and not much else.

(Note: I haven't tested this since I don't use the Arduino IDE).