make load target more robust

Two safety nets are added here:

  * PYTHON variable that can be set to the interpreter path (defaults to
    "python3"), so that the system default can be overriden
  * the PORT arg to usb-bootloader.py is passed as an empty string if
    unset, to produce an explicit error
parent c117db54
......@@ -278,6 +278,7 @@ $(addprefix $(DEFCONFIG_NAME),$(MAKEALL_COPY_LIST)):
makeall_copy: $(addprefix $(DEFCONFIG_NAME),$(MAKEALL_COPY_LIST))
load: all
PYTHON ?= python3
load:
- killall -9 usb-bootloader.py
- ./tools/uart-bootloader/usb-bootloader.py -t -p $(PORT) wrc.bin
- ./tools/uart-bootloader/usb-bootloader.py -t -p "$(PORT)" wrc.bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment