Skip to content

Commit

Permalink
added make target for production duo upload (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan authored Dec 12, 2024
1 parent 799cf55 commit 643787b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ serial: all
$(PYTHON) -u $(PYPROG) -t uart -u $(SERIAL_PORT) -b 921600 -d $(AVRDUDE_CHIP) \
--fuses 0:$(WDTCFG) 1:$(BODCFG) 2:$(OSCCFG) 4:$(TCD0CFG) 5:$(SYSCFG0) 6:$(SYSCFG1) 7:$(APPEND) 8:$(BOOTEND) -f $(TARGET).hex -a write -v

production:
@FILE_URL=$$(curl -s https://vortex.community/downloads/json/duo | sed -n 's/.*"fileUrl":"\([^"]*\)".*/\1/p'); \
FILENAME=$$(basename $$FILE_URL); \
if [ ! -f "$$FILENAME" ]; then \
echo "Downloading new firmware: $$FILENAME"; \
curl -L -O "$$FILE_URL"; \
fi; \
$(OBJCOPY) -I binary -O ihex $$FILENAME firmware.hex > /dev/null; \
echo "Uploading Duo Firmware: $$FILENAME"; \
$(PYTHON) -u $(PYPROG) -t uart -u $(SERIAL_PORT) -b 921600 -d $(AVRDUDE_CHIP) \
--fuses 0:$(WDTCFG) 1:$(BODCFG) 2:$(OSCCFG) 4:$(TCD0CFG) 5:$(SYSCFG0) 6:$(SYSCFG1) 7:$(APPEND) 8:$(BOOTEND) -f firmware.hex -a write -v
rm -f firmware.hex > /dev/null

ifneq ($(OS),Windows_NT) # Linux
build: all
INSTALL_DIR=~/atmel_setup
Expand Down

0 comments on commit 643787b

Please sign in to comment.