I'm trying to use an Arduino UNO board with Assembly on MacOS, but I couldn't find any documentation about it.
How can I compile and upload Assembly files to the Arduino with MacOS?
You can add source code to the sketch in the Arduino IDE. When adding a new source code file make sure the extension is uppercase
.S extension will be compiled as Assembly.
There is an Arduino IDE for the mac but if you want to use an external editor you have many options.
The simplest is to switch on
File>Preferences>External Editor in the Arduino IDE. This makes the IDE work in "read-only/auto-reload" mode allowing edit in a different code editor but compile and upload (without reopening the code) in the Arduino IDE.
There are also the
Verbose Compile and
Verbose Upload options in the Arduino IDE. These options will show you the commands used to compile, link and upload. You will see that the IDE runs other programs, outside of the IDE, such as
g++. Therefore a small script file can be created to call the same commands from a different IDE if the external editor doesn't have a facility to run external commands.
The verbose output will show where the tools and sources for build and upload are located. Normally for
Uno (avr) they are below