From 4718f39b2f8ef326dc671aa936c509e98fd6cf9f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 11 Mar 2019 22:13:20 -0400 Subject: flash_usb: Run dfu-util via sudo Default to running dfu-util via sudo as most machines will not have the user setup with permissions to access the raw usb device. Signed-off-by: Kevin O'Connor --- src/lpc176x/Makefile | 2 +- src/stm32f1/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lpc176x/Makefile b/src/lpc176x/Makefile index 1f0e55e2..2e932b84 100644 --- a/src/lpc176x/Makefile +++ b/src/lpc176x/Makefile @@ -46,4 +46,4 @@ $(OUT)klipper.bin: $(OUT)klipper.elf flash: $(OUT)klipper.bin @echo " Flashing $< to $(FLASH_DEVICE)" - $(Q)$(PYTHON) ./scripts/flash_usb.py -t lpc176x -d "$(FLASH_DEVICE)" $(OUT)klipper.bin + $(Q)$(PYTHON) ./scripts/flash_usb.py -t lpc176x -d "$(FLASH_DEVICE)" $(if $(NOSUDO),--no-sudo) $(OUT)klipper.bin diff --git a/src/stm32f1/Makefile b/src/stm32f1/Makefile index 28662a01..3d92b6df 100644 --- a/src/stm32f1/Makefile +++ b/src/stm32f1/Makefile @@ -48,7 +48,7 @@ $(OUT)klipper.bin: $(OUT)klipper.elf flash: $(OUT)klipper.bin @echo " Flashing $< to $(FLASH_DEVICE)" - $(Q)$(PYTHON) ./scripts/flash_usb.py -t stm32f1 -d "$(FLASH_DEVICE)" $(OUT)klipper.bin + $(Q)$(PYTHON) ./scripts/flash_usb.py -t stm32f1 -d "$(FLASH_DEVICE)" $(if $(NOSUDO),--no-sudo) $(OUT)klipper.bin serialflash: $(OUT)klipper.bin @echo " Flashing $< to $(FLASH_DEVICE) via stm32flash" -- cgit v1.2.3-70-g09d2