diff --git a/board/build.mk b/board/build.mk index 534d423..c53f886 100644 --- a/board/build.mk +++ b/board/build.mk @@ -4,13 +4,19 @@ CFLAGS += -Tstm32_flash.ld DFU_UTIL = "dfu-util" -# Compile fast charge (DCP) only not on EON +PC = 0 + ifeq (,$(wildcard /EON)) + ifeq (,$(wildcard /TICI)) + PC = 1 + endif +endif + +ifeq (1, $(PC)) BUILDER = DEV else CFLAGS += "-DEON" BUILDER = EON - DFU_UTIL = "tools/dfu-util-aarch64" endif #COMPILER_PATH = /home/batman/Downloads/gcc-arm-none-eabi-9-2020-q2-update/bin/ diff --git a/board/tools/dfu-util-aarch64 b/board/tools/dfu-util-aarch64 deleted file mode 100755 index 250c592..0000000 Binary files a/board/tools/dfu-util-aarch64 and /dev/null differ diff --git a/board/tools/dfu-util-aarch64-linux b/board/tools/dfu-util-aarch64-linux deleted file mode 100755 index b366f86..0000000 Binary files a/board/tools/dfu-util-aarch64-linux and /dev/null differ diff --git a/board/tools/dfu-util-x86_64-linux b/board/tools/dfu-util-x86_64-linux deleted file mode 100755 index 7be3dc3..0000000 Binary files a/board/tools/dfu-util-x86_64-linux and /dev/null differ diff --git a/board/tools/enter_download_mode.py b/board/tools/enter_download_mode.py deleted file mode 100755 index 4e6a2b4..0000000 --- a/board/tools/enter_download_mode.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 - - -import sys -import time -import usb1 - -def enter_download_mode(device): - handle = device.open() - handle.claimInterface(0) - - try: - handle.controlWrite(usb1.TYPE_VENDOR | usb1.RECIPIENT_DEVICE, 0xd1, 0, 0, b'') - except (usb1.USBErrorIO, usb1.USBErrorPipe): - print("Device download mode enabled.") - time.sleep(1) - else: - print("Device failed to enter download mode.") - sys.exit(1) - -def find_first_panda(context=None): - context = context or usb1.USBContext() - for device in context.getDeviceList(skip_on_error=True): - if device.getVendorID() == 0xbbaa and device.getProductID() & 0xFF00 == 0xdd00: - return device - -if __name__ == "__main__": - panda_dev = find_first_panda() - if panda_dev is None: - print("no device found") - sys.exit(0) - print("found device") - enter_download_mode(panda_dev)