mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-04 12:34:08 -06:00
flash_usb: use sudo for rp2040 flashing
The rp2040 can be flashed without sudo when using udev rules to give the user permission, but in a standard configuration sudo is required. Here we make it possible for flash_usb to use sudo for the rp2040 target, and make it the default when using `make flash` for the rp2040. As for other targets, one can set `NOSUDO=1` to not call through sudo. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
This commit is contained in:
parent
15ffa85954
commit
a7b01857f5
2 changed files with 6 additions and 4 deletions
|
@ -51,4 +51,4 @@ lib/rp2040_flash/rp2040_flash:
|
|||
# Flash rules
|
||||
flash: $(OUT)klipper.uf2 lib/rp2040_flash/rp2040_flash
|
||||
@echo " Flashing $< to $(FLASH_DEVICE)"
|
||||
$(Q)$(PYTHON) ./scripts/flash_usb.py -t $(CONFIG_MCU) -d "$(FLASH_DEVICE)" $(OUT)klipper.uf2
|
||||
$(Q)$(PYTHON) ./scripts/flash_usb.py -t $(CONFIG_MCU) -d "$(FLASH_DEVICE)" $(if $(NOSUDO),--no-sudo) $(OUT)klipper.uf2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue