Add message to avrdude script that it can't used within WSL currently
This commit is contained in:
parent
4e73b0b8d7
commit
71d1c02a9b
@ -145,6 +145,9 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
|
||||
$(DFU_PROGRAMMER) $(MCU) reset
|
||||
|
||||
avrdude: $(BUILD_DIR)/$(TARGET).hex
|
||||
if grep -q -s Microsoft /proc/version; then \
|
||||
echo 'ERROR: Pro Micros can not be flashed within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
|
||||
else \
|
||||
ls /dev/tty* > /tmp/1; \
|
||||
echo "Detecting Pro Micro port, reset your Pro Micro now.\c"; \
|
||||
while [ -z $$USB ]; do \
|
||||
@ -156,7 +159,8 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex
|
||||
echo ""; \
|
||||
echo "Detected Pro Micro port at $$USB"; \
|
||||
sleep 1; \
|
||||
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
|
||||
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
|
||||
fi
|
||||
|
||||
# Convert hex to bin.
|
||||
flashbin: $(BUILD_DIR)/$(TARGET).hex
|
||||
|
Loading…
Reference in New Issue
Block a user