mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-19 19:21:05 +00:00
add get-dependencies.py
This commit is contained in:
parent
5323472afd
commit
53db23142a
3
.github/workflows/build_aarch64.yml
vendored
3
.github/workflows/build_aarch64.yml
vendored
@ -55,6 +55,9 @@ jobs:
|
||||
- name: Set Toolchain Path
|
||||
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
||||
|
||||
- name: Get Dependencies
|
||||
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||
|
||||
|
15
.github/workflows/build_arm.yml
vendored
15
.github/workflows/build_arm.yml
vendored
@ -89,12 +89,9 @@ jobs:
|
||||
run: |
|
||||
git clone --depth 1 -b develop https://github.com/raspberrypi/pico-sdk ~/pico-sdk
|
||||
echo >> $GITHUB_ENV PICO_SDK_PATH=~/pico-sdk
|
||||
git submodule update --init hw/mcu/raspberry_pi/Pico-PIO-USB
|
||||
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
b=`find hw/bsp/${{ matrix.family }}/boards -depth -maxdepth 1 -type d -name '[^.]?*' -printf %f -quit`
|
||||
make -C examples/device/board_test BOARD=${b} get-deps
|
||||
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||
@ -127,16 +124,16 @@ jobs:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v3
|
||||
|
||||
- name: Install ARM GCC
|
||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
release: '11.2-2022.02'
|
||||
|
||||
- name: Checkout TinyUSB
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Checkout common submodules in lib
|
||||
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip
|
||||
|
||||
- name: Install ARM GCC
|
||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
release: '11.2-2022.02'
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_board.py ${{ matrix.example }}
|
||||
|
3
.github/workflows/build_msp430.yml
vendored
3
.github/workflows/build_msp430.yml
vendored
@ -52,6 +52,9 @@ jobs:
|
||||
- name: Set Toolchain Path
|
||||
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
||||
|
||||
- name: Get Dependencies
|
||||
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||
|
||||
|
3
.github/workflows/build_renesas.yml
vendored
3
.github/workflows/build_renesas.yml
vendored
@ -53,6 +53,9 @@ jobs:
|
||||
- name: Set Toolchain Path
|
||||
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
||||
|
||||
- name: Get Dependencies
|
||||
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||
|
||||
|
3
.github/workflows/build_riscv.yml
vendored
3
.github/workflows/build_riscv.yml
vendored
@ -53,6 +53,9 @@ jobs:
|
||||
- name: Set Toolchain Path
|
||||
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
||||
|
||||
- name: Get Dependencies
|
||||
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
||||
|
||||
- name: Build
|
||||
run: python3 tools/build_family.py ${{ matrix.family }}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
JLINK_DEVICE = rp2040_m0_0
|
||||
PYOCD_TARGET = rp2040
|
||||
|
||||
DEPS_SUBMODULES += hw/mcu/raspberry_pi/Pico-PIO-USB
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug
|
||||
endif
|
||||
|
25
tools/get_dependencies.py
Normal file
25
tools/get_dependencies.py
Normal file
@ -0,0 +1,25 @@
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
# dependency lookup (ABC sorted)
|
||||
# deps = {
|
||||
# 'LPC11UXX' : [ [] ]
|
||||
# }
|
||||
|
||||
|
||||
def get_family_dep(family):
|
||||
for entry in os.scandir("hw/bsp/{}/boards".format(family)):
|
||||
if entry.is_dir():
|
||||
result = subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(entry.name),
|
||||
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
print(result.stdout.decode("utf-8"))
|
||||
return result.returncode
|
||||
|
||||
status = 0
|
||||
all_family = sys.argv[1:]
|
||||
for f in all_family:
|
||||
status += get_family_dep(f)
|
||||
|
||||
sys.exit(status)
|
Loading…
x
Reference in New Issue
Block a user