|
| 1 | +# Set default python interpreters |
| 2 | +PYTHON2 ?= $(which python2 || which python2.7) |
| 3 | +PYTHON3 ?= python3 |
| 4 | + |
1 | 5 | # Select the board to build for: if not given on the command line, |
2 | 6 | # then default to PYBV10. |
3 | 7 | BOARD ?= metro_m0_express |
@@ -395,23 +399,23 @@ all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 |
395 | 399 | $(BUILD)/firmware.elf: $(OBJ) |
396 | 400 | $(STEPECHO) "LINK $@" |
397 | 401 | $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group |
398 | | - $(Q)$(SIZE) $@ | python3 $(TOP)/tools/build_memory_info.py $(LD_FILE) |
| 402 | + $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(LD_FILE) |
399 | 403 |
|
400 | 404 | $(BUILD)/firmware.bin: $(BUILD)/firmware.elf |
401 | 405 | $(ECHO) "Create $@" |
402 | 406 | $(Q)$(OBJCOPY) -O binary -j .vectors -j .text -j .data $^ $@ |
403 | 407 |
|
404 | 408 | $(BUILD)/firmware.uf2: $(BUILD)/firmware.bin |
405 | 409 | $(ECHO) "Create $@" |
406 | | - python2 $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $^ |
| 410 | + $(PYTHON2) $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -c -o $@ $^ |
407 | 411 |
|
408 | 412 | $(BUILD)/autogen_usb_descriptor.c $(BUILD)/genhdr/autogen_usb_descriptor.h: autogen_usb_descriptor.intermediate |
409 | 413 |
|
410 | 414 | .INTERMEDIATE: autogen_usb_descriptor.intermediate |
411 | 415 |
|
412 | 416 | autogen_usb_descriptor.intermediate: tools/gen_usb_descriptor.py Makefile |
413 | 417 | install -d $(BUILD)/genhdr |
414 | | - python3 tools/gen_usb_descriptor.py \ |
| 418 | + $(PYTHON3) tools/gen_usb_descriptor.py \ |
415 | 419 | --manufacturer $(USB_MANUFACTURER)\ |
416 | 420 | --product $(USB_PRODUCT)\ |
417 | 421 | --vid $(USB_VID)\ |
|
0 commit comments