From 5d6d21787db3f0da5f4d48ba1dd57e201e8604c8 Mon Sep 17 00:00:00 2001 From: ugrnm Date: Sat, 21 Sep 2019 12:03:16 +0200 Subject: [PATCH] makefile clarifications --- templates/arduino-make/README | 14 ++++++++++++++ templates/{no-ide => bare-make}/.gitignore | 0 templates/{no-ide => bare-make}/Makefile | 0 templates/bare-make/README | 11 +++++++++++ templates/{no-ide => bare-make}/hello.c | 0 templates/no-ide/README | 6 ------ 6 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 templates/arduino-make/README rename templates/{no-ide => bare-make}/.gitignore (100%) rename templates/{no-ide => bare-make}/Makefile (100%) create mode 100644 templates/bare-make/README rename templates/{no-ide => bare-make}/hello.c (100%) delete mode 100644 templates/no-ide/README diff --git a/templates/arduino-make/README b/templates/arduino-make/README new file mode 100644 index 0000000..3ff862e --- /dev/null +++ b/templates/arduino-make/README @@ -0,0 +1,14 @@ +This is a bare Makefile project sample to work with ino files, and makes use +of the arduino-make/arduino-mk Makefile framework that aims to provide all of +the IDE functionalities but via a Makefile. + +See https://github.com/sudar/Arduino-Makefile + +Once installed you need to set at least these two env variables to be able to +use the Makefile: + + export ARDUINO_DIR=/usr/share/arduino + export ARDMK_DIR=/usr/share/arduino + +Adjust to reflect your own paths! Put that in your shell rc! + diff --git a/templates/no-ide/.gitignore b/templates/bare-make/.gitignore similarity index 100% rename from templates/no-ide/.gitignore rename to templates/bare-make/.gitignore diff --git a/templates/no-ide/Makefile b/templates/bare-make/Makefile similarity index 100% rename from templates/no-ide/Makefile rename to templates/bare-make/Makefile diff --git a/templates/bare-make/README b/templates/bare-make/README new file mode 100644 index 0000000..d59ea08 --- /dev/null +++ b/templates/bare-make/README @@ -0,0 +1,11 @@ +You don't need the Arduino IDE, you can simply use a Makefile and write your +C code as long as you have avr-gcc, avr-libc and avrdude installed! + +make # compile and generate main.hex +make flash # flash it to the Arduino nano + +CAUTION: This makefile is for getting started with bare/from-scratch +development, you still need to link extra stuff yourself and take into +account header files if you want to make use of some of Arduino's +libs and whatnot. If you want a Makefile that comes with batteries included +check the arduino-make folder. diff --git a/templates/no-ide/hello.c b/templates/bare-make/hello.c similarity index 100% rename from templates/no-ide/hello.c rename to templates/bare-make/hello.c diff --git a/templates/no-ide/README b/templates/no-ide/README deleted file mode 100644 index 1d5fb84..0000000 --- a/templates/no-ide/README +++ /dev/null @@ -1,6 +0,0 @@ -You don't need the Arduino IDE, you can simply use a Makefile and write your -C code as long as you have avr-gcc, avr-libc and avrdude installed! - -make # compile and generate main.hex -make flash # flash it to the Arduino nano -