From b7c6e58516c7fb9389742d9567db8d8c08069a4c Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Wed, 4 Nov 2020 00:29:18 +0300 Subject: [PATCH] Changing the board was made to be more convenient. --- Makefile | 24 +++++------------------- Idris2.mk => aux-makefiles/Idris2.mk | 0 aux-makefiles/board-due.mk | 5 +++++ aux-makefiles/board-mega2560.mk | 5 +++++ aux-makefiles/board-uno.mk | 4 ++++ aux-makefiles/proc-avr.mk | 4 ++++ aux-makefiles/proc-sam.mk | 2 ++ 7 files changed, 25 insertions(+), 19 deletions(-) rename Idris2.mk => aux-makefiles/Idris2.mk (100%) create mode 100644 aux-makefiles/board-due.mk create mode 100644 aux-makefiles/board-mega2560.mk create mode 100644 aux-makefiles/board-uno.mk create mode 100644 aux-makefiles/proc-avr.mk create mode 100644 aux-makefiles/proc-sam.mk diff --git a/Makefile b/Makefile index c2a4e0d..e83a488 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,13 @@ ARDUINO_PACKAGE_DIR := $(HOME)/.arduino15/packages ADRUINO_DIR=/usr/share/arduino -# For AVR-based boards -AVR_TOOLS_DIR=/usr -AVRDUDE_CONF=/etc/avrdude.conf -ARDUINO_MAKEFILE_PATH=arduino-makefile/Arduino.mk - -# For ARM SAM-based boards -#ARDUINO_MAKEFILE_PATH=arduino-makefile/Sam.mk - IDRIS_SUPPORT_SRC_PATH=rts IDRIS_MAIN=Blink.idr -# For Arduino Uno -BOARD_TAG=uno - -# For Arduino Mega 2560 -#BOARD_TAG=mega -#BOARD_SUB=atmega2560 - -# For Arduino Due -#BOARD_TAG=arduino_due_x -#ARCHITECTURE=sam +# Choose the board you have +include aux-makefiles/board-uno.mk +#include aux-makefiles/board-mega2560.mk +#include aux-makefiles/board-due.mk -include Idris2.mk +include aux-makefiles/Idris2.mk diff --git a/Idris2.mk b/aux-makefiles/Idris2.mk similarity index 100% rename from Idris2.mk rename to aux-makefiles/Idris2.mk diff --git a/aux-makefiles/board-due.mk b/aux-makefiles/board-due.mk new file mode 100644 index 0000000..760c85c --- /dev/null +++ b/aux-makefiles/board-due.mk @@ -0,0 +1,5 @@ +include aux-makefiles/proc-sam.mk + +# For Arduino Due +BOARD_TAG=arduino_due_x +ARCHITECTURE=sam diff --git a/aux-makefiles/board-mega2560.mk b/aux-makefiles/board-mega2560.mk new file mode 100644 index 0000000..33ed9ef --- /dev/null +++ b/aux-makefiles/board-mega2560.mk @@ -0,0 +1,5 @@ +include aux-makefiles/proc-avr.mk + +# For Arduino Mega 2560 +BOARD_TAG=mega +BOARD_SUB=atmega2560 diff --git a/aux-makefiles/board-uno.mk b/aux-makefiles/board-uno.mk new file mode 100644 index 0000000..f951688 --- /dev/null +++ b/aux-makefiles/board-uno.mk @@ -0,0 +1,4 @@ +include aux-makefiles/proc-avr.mk + +# For Arduino Uno +BOARD_TAG=uno diff --git a/aux-makefiles/proc-avr.mk b/aux-makefiles/proc-avr.mk new file mode 100644 index 0000000..9d268a4 --- /dev/null +++ b/aux-makefiles/proc-avr.mk @@ -0,0 +1,4 @@ +# For AVR-based boards +AVR_TOOLS_DIR=/usr +AVRDUDE_CONF=/etc/avrdude.conf +ARDUINO_MAKEFILE_PATH=arduino-makefile/Arduino.mk diff --git a/aux-makefiles/proc-sam.mk b/aux-makefiles/proc-sam.mk new file mode 100644 index 0000000..62ec43d --- /dev/null +++ b/aux-makefiles/proc-sam.mk @@ -0,0 +1,2 @@ +# For ARM SAM-based boards +ARDUINO_MAKEFILE_PATH=arduino-makefile/Sam.mk