Skip to content

Commit

Permalink
src/Makefile: remove condition from flash target by setting related v…
Browse files Browse the repository at this point in the history
…ariable (#157)
  • Loading branch information
ia committed Jan 10, 2024
1 parent 3eceaa9 commit d89c61d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ ULIBDIR =
# List all user libraries here
ULIBS =

# Flash tool with arguments depending on platform
ifeq ($(OS), Windows_NT)
FLASH_CMD = ../utils/windows_dfu_util/DfuSeCommand.exe -c --de 0 -d --fn
else
FLASH_CMD = dfu-util -d 0483:df11 -a 0 -R -D
endif

#
# End of user defines
##############################################################################
Expand Down Expand Up @@ -348,8 +355,4 @@ CLEAN_RULE_HOOK: $(shell rm -f ./common/hydrafw_version.hdr)
# Custom rule to flash firmware when hydrabus is connected in dfu mode
flash: $(BUILDDIR)/$(PROJECT).dfu
$(OUT_LOG) echo Flashing $^
ifeq ($(OS), Windows_NT)
$(OUT_CMD) ../utils/windows_dfu_util/DfuSeCommand.exe -c --de 0 -d --fn $^
else
$(OUT_CMD) dfu-util -d 0483:df11 -a 0 -R -D $^
endif
$(OUT_CMD) $(FLASH_CMD) $^

0 comments on commit d89c61d

Please sign in to comment.