From 1a27a584361ca82ae46c30d7fe8f44da98e01226 Mon Sep 17 00:00:00 2001 From: hiveeyes Workbench Date: Wed, 4 Jan 2017 17:51:21 +0100 Subject: [PATCH] prepare RaspIO Makefile --- generic/Makefile-Linux-RaspIO.mk | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 generic/Makefile-Linux-RaspIO.mk diff --git a/generic/Makefile-Linux-RaspIO.mk b/generic/Makefile-Linux-RaspIO.mk new file mode 100644 index 0000000..0efc728 --- /dev/null +++ b/generic/Makefile-Linux-RaspIO.mk @@ -0,0 +1,94 @@ +### DISCLAIMER +### This is an example Makefile and it MUST be configured to suit your needs. +### For detailled explanations about all the avalaible options, +### please refer to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md + +### PROJECT_DIR +### This is the path to where you have created/cloned your project +PROJECT_DIR = ../.. + +### AVR_GCC_VERSION +### Check if the version is equal or higher than 4.9 +AVR_GCC_VERSION := $(shell expr `avr-gcc -dumpversion | cut -f1` \>= 4.9) + +### ARDMK_DIR +### Path to the Arduino-Makefile directory. +ARDMK_DIR = $(PROJECT_DIR)/tools/Arduino-Makefile + +### ARDUINO_DIR +### Path to the Arduino application and ressources directory. +ARDUINO_DIR = /usr/share/arduino + +### USER_LIB_PATH +### Path to where the your project's libraries are stored. +USER_LIB_PATH = $(realpath $(PROJECT_DIR)/libraries) + +### BOARD_TAG & BOARD_SUB +### For Arduino IDE 1.0.x +### Only BOARD_TAG is needed. It must be set to the board you are currently using. (i.e uno, mega2560, etc.) +# BOARD_TAG = mega2560 +#BOARD_TAG = uno +#BOARD_TAG = raspioduino +#BOARD_TAG = gertduino328 + +### For Arduino IDE 1.6.x +### Both BOARD_TAG and BOARD_SUB are needed. They must be set to the board you are currently using. (i.e BOARD_TAG = uno, mega, etc. & BOARD_SUB = atmega2560, etc.) +### Note: for the Arduino Uno, only BOARD_TAG is mandatory and BOARD_SUB can be equal to anything +#BOARD_TAG = pro +#BOARD_TAG = uno +#BOARD_SUB = 8MHzatmega328 + +# RasPIO Hiveeyes, 2016-12-15 +# NOTE: to flash the raspiduino, this avrdude command is needed +# sudo avrdude -P gpio -c gpio -p atmega328p -v -U flash:w:../bin/src/gert328/generic.hex + +BOARD_TAG = gert328 +MCU = atmega328p +F_CPU = 12000000L +ISP_PROG = gpio +FORCE_MONITOR_PORT = true + +### MONITOR_BAUDRATE +### It must be set to Serial baudrate value you are using. +MONITOR_BAUDRATE = 115200 +MONITOR_CMD = picocom +### AVR_TOOLS_DIR +### Path to the AVR tools directory such as avr-gcc, avr-g++, etc. +AVR_TOOLS_DIR = /usr + +### AVRDDUDE +### Path to avrdude directory. +AVRDDUDE = /usr/bin/avrdude + + +AVRDUDE_CONF = /etc/avrdude.conf + +### CFLAGS_STD +CFLAGS_STD = -std=gnu11 + +### CXXFLAGS_STD +CXXFLAGS_STD = -std=gnu++11 + +### CPPFLAGS +### Flags you might want to set for debugging purpose. Comment to stop. +CXXFLAGS = -pedantic -Wall -Wextra -fno-use-cxa-atexit + +### If avr-gcc -v is higher than 4.9, activate coloring of the output +ifeq "$(AVR_GCC_VERSION)" "1" + CXXFLAGS += -fdiagnostics-color +endif + +### MONITOR_PORT +### The port your board is connected to. Using an '*' tries all the ports and finds the right one. + +### don't touch this +CURRENT_DIR = $(shell basename $(CURDIR)) + +### OBJDIR +### This is were you put the binaries you just compile using 'make' +CURRENT_DIR = $(shell basename $(CURDIR)) +OBJDIR = $(PROJECT_DIR)/bin/$(CURRENT_DIR)/$(BOARD_TAG) + + +### path to Arduino.mk, inside the ARDMK_DIR, don't touch. +include $(ARDMK_DIR)/Arduino.mk