diff options
| author | Ha Thach <[email protected]> | 2024-11-09 00:10:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-09 00:10:32 +0700 |
| commit | 9d86ca1777c77feeae86289097a0811d058ee532 (patch) | |
| tree | 82db2bce7cd33ce045edb58ee969547909f30cd1 /tools | |
| parent | 038be21e4d94c958043eb54d179948cd9e52fe18 (diff) | |
| parent | 3831786ede034c9cf52a1dbae5b84f7d4449ace6 (diff) | |
Merge pull request #2870 from hathach/hcd-dwc2
Implement Host Driver support for synopsys dwc2
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/build_utils.py | 29 | ||||
| -rwxr-xr-x | tools/get_deps.py | 3 |
2 files changed, 19 insertions, 13 deletions
diff --git a/tools/build_utils.py b/tools/build_utils.py index 5462829e2..b4a1dc096 100755 --- a/tools/build_utils.py +++ b/tools/build_utils.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import subprocess import pathlib -import time +import re build_format = '| {:29} | {:30} | {:18} | {:7} | {:6} | {:6} |' @@ -36,18 +36,21 @@ def skip_example(example, board): mk_contents = board_mk.read_text() mcu = "NONE" - for token in mk_contents.split(): - if "CFG_TUSB_MCU=OPT_MCU_" in token: - # Strip " because cmake files has them. - token = token.strip("\"") - _, opt_mcu = token.split("=") - mcu = opt_mcu[len("OPT_MCU_"):] - if "esp32s2" in token: - mcu = "ESP32S2" - if "esp32s3" in token: - mcu = "ESP32S3" - if mcu != "NONE": - break + if family == "espressif": + for line in mk_contents.splitlines(): + match = re.search(r'set\(IDF_TARGET\s+"([^"]+)"\)', line) + if match: + mcu = match.group(1) + break + else: + for token in mk_contents.split(): + if "CFG_TUSB_MCU=OPT_MCU_" in token: + # Strip " because cmake files has them. + token = token.strip("\"") + _, opt_mcu = token.split("=") + mcu = opt_mcu[len("OPT_MCU_"):] + if mcu != "NONE": + break # Skip all OPT_MCU_NONE these are WIP port if mcu == "NONE": diff --git a/tools/get_deps.py b/tools/get_deps.py index 519cb1d53..6d0ef9d0c 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -121,6 +121,9 @@ deps_optional = { 'hw/mcu/st/cmsis_device_wb': ['https://github.com/STMicroelectronics/cmsis_device_wb.git', '9c5d1920dd9fabbe2548e10561d63db829bb744f', 'stm32wb'], + 'hw/mcu/st/stm32-mfxstm32l152': ['https://github.com/STMicroelectronics/stm32-mfxstm32l152.git', + '7f4389efee9c6a655b55e5df3fceef5586b35f9b', + 'stm32h7'], 'hw/mcu/st/stm32f0xx_hal_driver': ['https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git', '0e95cd88657030f640a11e690a8a5186c7712ea5', 'stm32f0'], |
