Merge branch 'master' into fork/HiFiPhile/h7rs

This commit is contained in:
hathach
2025-06-11 16:23:54 +07:00
133 changed files with 6375 additions and 2644 deletions

View File

@@ -23,6 +23,7 @@ build_separator = '-' * 95
build_status = [STATUS_OK, STATUS_FAILED, STATUS_SKIPPED]
verbose = False
parallel_jobs = os.cpu_count()
# -----------------------------
# Helper
@@ -100,23 +101,27 @@ def cmake_board(board, toolchain, build_flags_on):
if build_utils.skip_example(example, board):
ret[2] += 1
else:
rcmd = run_cmd(f'cmake examples/{example} -B {build_dir}/{example} -G "Ninja" '
rcmd = run_cmd(f'cmake examples/{example} -B {build_dir}/{example} -G Ninja '
f'-DBOARD={board} {build_flags}')
if rcmd.returncode == 0:
rcmd = run_cmd(f'cmake --build {build_dir}/{example}')
ret[0 if rcmd.returncode == 0 else 1] += 1
else:
rcmd = run_cmd(f'cmake examples -B {build_dir} -G "Ninja" -DBOARD={board} -DCMAKE_BUILD_TYPE=MinSizeRel '
rcmd = run_cmd(f'cmake examples -B {build_dir} -G Ninja -DBOARD={board} -DCMAKE_BUILD_TYPE=MinSizeRel '
f'-DTOOLCHAIN={toolchain} {build_flags}')
if rcmd.returncode == 0:
cmd = f"cmake --build {build_dir}"
# circleci docker return $nproc as 36 core, limit parallel according to resource class. Required for IAR, also prevent crashed/killed by docker
njobs = parallel_jobs
# circleci docker return $nproc as 36 core, limit parallel according to resource class.
# Required for IAR, also prevent crashed/killed by docker
if os.getenv('CIRCLECI'):
resource_class = { 'small': 1, 'medium': 2, 'medium+': 3, 'large': 4 }
for rc in resource_class:
if rc in os.getenv('CIRCLE_JOB'):
cmd += f' --parallel {resource_class[rc]}'
njobs = resource_class[rc]
break
cmd += f' --parallel {njobs}'
rcmd = run_cmd(cmd)
ret[0 if rcmd.returncode == 0 else 1] += 1
@@ -211,6 +216,7 @@ def build_family(family, toolchain, build_system, build_flags_on, one_per_family
# -----------------------------
def main():
global verbose
global parallel_jobs
parser = argparse.ArgumentParser()
parser.add_argument('families', nargs='*', default=[], help='Families to build')
@@ -219,6 +225,7 @@ def main():
parser.add_argument('-s', '--build-system', default='cmake', help='Build system to use, default is cmake')
parser.add_argument('-f1', '--build-flags-on', action='append', default=[], help='Build flag to pass to build system')
parser.add_argument('-1', '--one-per-family', action='store_true', default=False, help='Build only one random board inside a family')
parser.add_argument('-j', '--jobs', type=int, default=os.cpu_count(), help='Number of jobs to run in parallel')
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output')
args = parser.parse_args()
@@ -229,6 +236,7 @@ def main():
build_flags_on = args.build_flags_on
one_per_family = args.one_per_family
verbose = args.verbose
parallel_jobs = args.jobs
if len(families) == 0 and len(boards) == 0:
print("Please specify families or board to build")

View File

@@ -25,9 +25,9 @@ deps_optional = {
'hw/mcu/allwinner': ['https://github.com/hathach/allwinner_driver.git',
'8e5e89e8e132c0fd90e72d5422e5d3d68232b756',
'fc100s'],
'hw/mcu/analog/max32' : ['https://github.com/analogdevicesinc/msdk.git',
'hw/mcu/analog/msdk' : ['https://github.com/analogdevicesinc/msdk.git',
'b20b398d3e5e2007594e54a74ba3d2a2e50ddd75',
'max32650 max32666 max32690 max78002'],
'maxim'],
'hw/mcu/bridgetek/ft9xx/ft90x-sdk': ['https://github.com/BRTSG-FOSS/ft90x-sdk.git',
'91060164afe239fcb394122e8bf9eb24d3194eb1',
'brtmm90x'],
@@ -55,8 +55,8 @@ deps_optional = {
'hw/mcu/nxp/lpcopen': ['https://github.com/hathach/nxp_lpcopen.git',
'b41cf930e65c734d8ec6de04f1d57d46787c76ae',
'lpc11 lpc13 lpc15 lpc17 lpc18 lpc40 lpc43'],
'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git',
'144f1eb7ea8c06512e12f12b27383601c0272410',
'hw/mcu/nxp/mcux-sdk': ['https://github.com/nxp-mcuxpresso/mcux-sdk',
'a1bdae309a14ec95a4f64a96d3315a4f89c397c6',
'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/hathach/Pico-PIO-USB.git',
'032a469e79f6a4ba40760d7868e6db26e15002d7',