This is a simple makefile setup for Arduino development.
- Have the Arduino software installed on your device.
- Have the
make
build system installed on your device. - Have knowledge and skills on:
- Using and creating Makefiles.
- Using the command line/terminal.
- Programming in C/C++.
- Have an Arduino Board (OPTIONAL).
- Have
rm
andmv
commands available on your system. (OPTIONAL).
- At the start of the Makefile, change the
ARDUINO_DIR
value to the topmost directory of the Arduino installation. - Change the value of
MAIN_SKETCH
to be the name of your sketch. - Change the
COM
port number in theupload
target to the port in which the Arduino is connected to your device. - If the
rm
andmv
commands are not available on your system, make sure to replace all occurences ofrm
with the command that deletes files andmv
with the command that moves files. - Use one of the 4 basic
make
depending on the need:
make
: creates certain directories, compiles the core library, compiles your code, and cleans some stuff up (not to be confused withmake clean
).make upload
: uploads the compiled sketch to your Arduino board (which is located at COM3 if the default settings are preserved).make clean
: removes the generated files bymake
except for the core library and the directories created by it (not to be confused withmake full_clean
).make full_clean
: removes generated files bymake
, including the core library and the directories created by it as well (not to be confused withmake clean
).
- Implement support for the other Arduino libraries.
- Implement support for other Arduino variants.
- Clean up the code and improve it in some places.