Skip to content

Commit

Permalink
Merge pull request #85 from xeonxu/wsl
Browse files Browse the repository at this point in the history
Use a variable named DFU_PROG to identify dfu-programmer.
  • Loading branch information
iceman1001 authored Jun 28, 2022
2 parents 1132f71 + 93ce945 commit 4de793f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Firmware/Chameleon-Mini/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ AVRDUDE_FLAGS = -p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_WRITE_APP_LATEST = -U application:w:Latest/Chameleon-RevG.hex
AVRDUDE_WRITE_EEPROM_LATEST = -U eeprom:w:Latest/Chameleon-RevG.eep

WSLENV ?= notwsl
ifndef WSLENV
DFU_PROG = ./dfu-programmer.exe
else
DFU_PROG = dfu-programmer
endif

.PHONY: program program-latest dfu-flip dfu-prog dfu-reset check_size style

# Default target
Expand Down Expand Up @@ -184,10 +191,10 @@ dfu-flip: $(TARGET).hex $(TARGET).eep check_size

# Program the device using dfu-programmer
dfu-prog: $(TARGET).hex $(TARGET).eep check_size
dfu-programmer $(MCU) erase
dfu-programmer $(MCU) flash-eeprom $(TARGET).eep
dfu-programmer $(MCU) flash $(TARGET).hex
dfu-programmer $(MCU) reset
$(DFU_PROG) $(MCU) erase
$(DFU_PROG) $(MCU) flash-eeprom $(TARGET).eep
$(DFU_PROG) $(MCU) flash $(TARGET).hex
$(DFU_PROG) $(MCU) reset

# Reset the device after firmware upgrade
dfu-reset:
Expand Down

0 comments on commit 4de793f

Please sign in to comment.