Make sure core is always a single string

This commit is contained in:
Dario Nieuwenhuis 2021-05-31 03:20:41 +02:00
parent 635ec692e5
commit c433eb4d47

View File

@ -331,12 +331,17 @@ def parse_chips():
rcc = removesuffix(rcc, '-rcc_v1_0')
rcc = removesuffix(rcc, '_rcc_v1_0')
core = r['Core']
# multicores have a list here. Just keep the first, to not break the schema.
if isinstance(core, list):
core = core[0]
if chip_name not in chips:
chips[chip_name] = OrderedDict({
'name': chip_name,
'family': r['@Family'],
'line': r['@Line'],
'core': r['Core'],
'core': core,
'flash': flash,
'ram': ram,
'gpio_af': gpio_af,