Makefile: Make sudo optional for tty access
Being in the proper group is sometimes enough to avoid needing sudo to
access tty devices. If not done by the distro, a udev rule isn't too
hard to tweak to get convenient permissions on the device (using lsusb
to fill in XXXX and YYYY):
SUBSYSTEMS=="usb", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", GROUP="uucp"
This commit is contained in:
parent
fe15fc3b9a
commit
caeff9a3cb
1 changed files with 4 additions and 3 deletions
7
Makefile
7
Makefile
|
|
@ -99,15 +99,16 @@ endif
|
|||
|
||||
BAUD=115200
|
||||
DEV=/dev/ttyUSB0
|
||||
SUDO=sudo
|
||||
|
||||
ocd: gotek
|
||||
python3 scripts/openocd/flash.py `pwd`/FF_Gotek-$(VER).hex
|
||||
|
||||
flash: gotek
|
||||
sudo stm32flash -b $(BAUD) -w FF_Gotek-$(VER).hex $(DEV)
|
||||
$(SUDO) stm32flash -b $(BAUD) -w FF_Gotek-$(VER).hex $(DEV)
|
||||
|
||||
start:
|
||||
sudo stm32flash -b $(BAUD) -g 0 $(DEV)
|
||||
$(SUDO) stm32flash -b $(BAUD) -g 0 $(DEV)
|
||||
|
||||
serial:
|
||||
sudo miniterm.py $(DEV) 3000000
|
||||
$(SUDO) miniterm.py $(DEV) 3000000
|
||||
|
|
|
|||
Loading…
Reference in a new issue