Quick makefile for flashing on Linux using the Atmel ICE programmer. master
authorPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 21 Oct 2015 11:32:43 +0000 (12:32 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 21 Oct 2015 11:32:43 +0000 (12:32 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..2e3b480
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+AVRDUDE    ?= avrdude
+AVR_PART   ?= atmega328p
+PROGRAMMER ?= atmelice_isp
+
+PROJECT    = nRF24_BLE_Temperature
+BUILD_DIR  ?= /tmp/build5895373284071051029.tmp
+
+
+flash: flash_prog flash_eeprom
+
+flash_prog:
+       $(AVRDUDE) -p $(AVR_PART) -c $(PROGRAMMER) -U flash:w:$(BUILD_DIR)/$(PROJECT).cpp.hex:i
+
+flash_eeprom:
+       $(AVRDUDE) -p $(AVR_PART) -c $(PROGRAMMER) -U eeprom:w:$(BUILD_DIR)/$(PROJECT).cpp.eep:i
+
+dump_eeprom:
+       $(AVRDUDE) -p $(AVR_PART) -c $(PROGRAMMER) -U eeprom:r:-:i
+
+.PHONY: flash_prog flash_eeprom dump_eeprom