summaryrefslogtreecommitdiffstats
path: root/tmk_core/avr.mk
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-11-28 05:08:21 +0100
committerGitHub <noreply@github.com>2017-11-28 05:08:21 +0100
commit9fdc27626097ae03b767a09427efc90475d90955 (patch)
treea555c38f1b714af6e2c2c96187552757d08224b9 /tmk_core/avr.mk
parent9113f3387a670373919fe62899b0ab27e9d89eba (diff)
downloadqmk_firmware-9fdc27626097ae03b767a09427efc90475d90955.tar.gz
qmk_firmware-9fdc27626097ae03b767a09427efc90475d90955.tar.xz
Updates bootloader settings, adds file size check (#2029)
* pull fuse settings for bootloader jump * fix 32a chips * make automatic bootloader selection optional * quantify bootloaders * fixs #164, speeds up dfu reset * fix for chips w/o usb * missing an n * fix bootloader sizes, use words for addresses * fix bmini, pearl, and [[ issue, make things quiet * ignore avr errors on arm for now * update settings for the light * document bootloader stuff * add bootloader title
Diffstat (limited to 'tmk_core/avr.mk')
-rw-r--r--tmk_core/avr.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 94e9a7bdb..c083f6b72 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -121,22 +121,22 @@ qmk: $(BUILD_DIR)/$(TARGET).hex
printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk
# Program the device.
-program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
+program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size
$(PROGRAM_CMD)
-teensy: $(BUILD_DIR)/$(TARGET).hex
+teensy: $(BUILD_DIR)/$(TARGET).hex check-size
$(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
BATCHISP ?= batchisp
-flip: $(BUILD_DIR)/$(TARGET).hex
+flip: $(BUILD_DIR)/$(TARGET).hex check-size
$(BATCHISP) -hardware usb -device $(MCU) -operation erase f
$(BATCHISP) -hardware usb -device $(MCU) -operation loadbuffer $(BUILD_DIR)/$(TARGET).hex program
$(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0
DFU_PROGRAMMER ?= dfu-programmer
-dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter
+dfu: $(BUILD_DIR)/$(TARGET).hex check-size
until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\
echo "Error: Bootloader not found. Trying again in 5s." ;\
sleep 5 ;\
@@ -168,7 +168,7 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
fi
$(DFU_PROGRAMMER) $(MCU) reset
-avrdude: $(BUILD_DIR)/$(TARGET).hex
+avrdude: $(BUILD_DIR)/$(TARGET).hex check-size
if grep -q -s Microsoft /proc/version; then \
echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
else \