@ -115,11 +115,11 @@ dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter
echo "Error: Bootloader not found. Trying again in 5s." ; \
echo "Error: Bootloader not found. Trying again in 5s." ; \
sleep 5 ; \
sleep 5 ; \
done
done
i f n e q ( , $( findstring 0.7, $ ( shell $ ( DFU_PROGRAMMER ) --version 2>&1) ) )
if $( DFU_PROGRAMMER) --version 2>& 1 | grep -q 0.7 ; then \
$( DFU_PROGRAMMER) $( MCU) erase --force
$( DFU_PROGRAMMER) $( MCU) erase --force; \
e l s e
else \
$( DFU_PROGRAMMER) $( MCU) erase
$( DFU_PROGRAMMER) $( MCU) erase; \
e n d i f
fi
$( DFU_PROGRAMMER) $( MCU) flash $( BUILD_DIR) /$( TARGET) .hex
$( DFU_PROGRAMMER) $( MCU) flash $( BUILD_DIR) /$( TARGET) .hex
$( DFU_PROGRAMMER) $( MCU) reset
$( DFU_PROGRAMMER) $( MCU) reset
@ -135,11 +135,11 @@ flip-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
$( REMOVE) $( BUILD_DIR) /$( TARGET) eep.hex
$( REMOVE) $( BUILD_DIR) /$( TARGET) eep.hex
dfu-ee : $( BUILD_DIR ) /$( TARGET ) .hex $( BUILD_DIR ) /$( TARGET ) .eep
dfu-ee : $( BUILD_DIR ) /$( TARGET ) .hex $( BUILD_DIR ) /$( TARGET ) .eep
i f n e q ( , $( findstring 0.7, $ ( shell dfu -programmer --version 2>&1) ) )
if $( DFU_PROGRAMMER) --version 2>& 1 | grep -q 0.7 ; then \
$( DFU_PROGRAMMER) $( MCU) flash --eeprom $( BUILD_DIR) /$( TARGET) .eep
$( DFU_PROGRAMMER) $( MCU) flash --eeprom $( BUILD_DIR) /$( TARGET) .eep; \
e l s e
else \
$( DFU_PROGRAMMER) $( MCU) flash-eeprom $( BUILD_DIR) /$( TARGET) .eep
$( DFU_PROGRAMMER) $( MCU) flash-eeprom $( BUILD_DIR) /$( TARGET) .eep; \
e n d i f
fi
$( DFU_PROGRAMMER) $( MCU) reset
$( DFU_PROGRAMMER) $( MCU) reset
# Convert hex to bin.
# Convert hex to bin.