2024-09-17 12:17:12 -07:00
|
|
|
#!/usr/bin/env python3
|
2024-05-09 20:43:46 +07:00
|
|
|
import json
|
|
|
|
|
|
|
|
# toolchain, url
|
2024-08-09 22:45:35 +07:00
|
|
|
toolchain_list = [
|
|
|
|
"aarch64-gcc",
|
|
|
|
"arm-clang",
|
|
|
|
"arm-iar",
|
|
|
|
"arm-gcc",
|
2024-08-21 19:09:37 +07:00
|
|
|
"esp-idf",
|
2024-08-09 22:45:35 +07:00
|
|
|
"msp430-gcc",
|
|
|
|
"riscv-gcc",
|
|
|
|
"rx-gcc"
|
|
|
|
]
|
2024-05-09 20:43:46 +07:00
|
|
|
|
|
|
|
# family: [supported toolchain]
|
|
|
|
family_list = {
|
|
|
|
"broadcom_32bit": ["arm-gcc"],
|
|
|
|
"broadcom_64bit": ["aarch64-gcc"],
|
2024-06-14 16:09:08 +07:00
|
|
|
"ch32v10x ch32v20x ch32v307 fomu gd32vf103": ["riscv-gcc"],
|
2024-07-17 19:45:40 +07:00
|
|
|
"da1469x": ["arm-gcc"],
|
2024-05-09 20:43:46 +07:00
|
|
|
"imxrt": ["arm-gcc", "arm-clang"],
|
|
|
|
"kinetis_k kinetis_kl kinetis_k32l2": ["arm-gcc", "arm-clang"],
|
2024-05-10 18:55:43 +07:00
|
|
|
"lpc11 lpc13 lpc15": ["arm-gcc", "arm-clang"],
|
2024-05-09 20:43:46 +07:00
|
|
|
"lpc17 lpc18 lpc40 lpc43": ["arm-gcc", "arm-clang"],
|
|
|
|
"lpc51 lpc54 lpc55": ["arm-gcc", "arm-clang"],
|
2024-08-14 22:56:59 +07:00
|
|
|
"max32650 max32666 max32690 max78002": ["arm-gcc"],
|
2024-05-09 20:43:46 +07:00
|
|
|
"mcx": ["arm-gcc"],
|
|
|
|
"mm32": ["arm-gcc"],
|
|
|
|
"msp430": ["msp430-gcc"],
|
|
|
|
"msp432e4 tm4c": ["arm-gcc"],
|
|
|
|
"nrf": ["arm-gcc", "arm-clang"],
|
|
|
|
"ra": ["arm-gcc"],
|
|
|
|
"rp2040": ["arm-gcc"],
|
2024-06-06 16:07:11 +07:00
|
|
|
"rx": ["rx-gcc"],
|
2024-08-21 19:09:37 +07:00
|
|
|
"samd11 saml2x": ["arm-gcc", "arm-clang"],
|
|
|
|
"samd21": ["arm-gcc", "arm-clang"],
|
2024-05-09 20:43:46 +07:00
|
|
|
"samd5x_e5x samg": ["arm-gcc", "arm-clang"],
|
2024-11-27 22:47:19 +07:00
|
|
|
"stm32c0 stm32f0 stm32f1 stm32f2 stm32f3": ["arm-gcc", "arm-clang", "arm-iar"],
|
2024-05-13 20:27:49 +07:00
|
|
|
"stm32f4": ["arm-gcc", "arm-clang", "arm-iar"],
|
|
|
|
"stm32f7": ["arm-gcc", "arm-clang", "arm-iar"],
|
|
|
|
"stm32g0 stm32g4 stm32h5": ["arm-gcc", "arm-clang", "arm-iar"],
|
|
|
|
"stm32h7": ["arm-gcc", "arm-clang", "arm-iar"],
|
2024-08-21 19:09:37 +07:00
|
|
|
"stm32l0 stm32l4": ["arm-gcc", "arm-clang", "arm-iar"],
|
|
|
|
"stm32u5 stm32wb": ["arm-gcc", "arm-clang", "arm-iar"],
|
2024-05-09 20:43:46 +07:00
|
|
|
"xmc4000": ["arm-gcc"],
|
2024-08-21 19:09:37 +07:00
|
|
|
"-bespressif_kaluga_1": ["esp-idf"],
|
|
|
|
"-bespressif_s3_devkitm": ["esp-idf"],
|
2024-09-27 21:36:47 +07:00
|
|
|
"-bespressif_p4_function_ev": ["esp-idf"],
|
2024-05-09 20:43:46 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def set_matrix_json():
|
|
|
|
matrix = {}
|
2024-08-09 22:45:35 +07:00
|
|
|
for toolchain in toolchain_list:
|
2024-05-09 20:43:46 +07:00
|
|
|
filtered_families = [family for family, supported_toolchain in family_list.items() if
|
|
|
|
toolchain in supported_toolchain]
|
2024-10-04 15:01:03 +07:00
|
|
|
matrix[toolchain] = filtered_families
|
2024-05-13 20:27:49 +07:00
|
|
|
|
2024-05-09 20:43:46 +07:00
|
|
|
print(json.dumps(matrix))
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
set_matrix_json()
|