Include base addresses for flash and ram.
Remove 'null' entries for datasheets/reference-manuals.
This commit is contained in:
parent
4f2e1dad78
commit
2d38aad861
24
parse.py
24
parse.py
@ -493,8 +493,14 @@ def parse_chips():
|
||||
package_flashs = [package_flashs]*len(package_names)
|
||||
for package_i, package_name in enumerate(package_names):
|
||||
chip_name = chip_name_from_package_name(package_name)
|
||||
flash = int(package_flashs[package_i])
|
||||
ram = int(package_rams[package_i])
|
||||
flash = OrderedDict( {
|
||||
'size': int(package_flashs[package_i]),
|
||||
'base': None,
|
||||
} )
|
||||
ram = OrderedDict( {
|
||||
'size': int(package_rams[package_i]),
|
||||
'base': None,
|
||||
} )
|
||||
gpio_af = next(filter(lambda x: x['@Name'] == 'GPIO', r['IP']))['@Version']
|
||||
gpio_af = removesuffix(gpio_af, '_gpio_v1_0')
|
||||
|
||||
@ -568,6 +574,11 @@ def parse_chips():
|
||||
chips[chip_name]['reference-manual'] = rm[0]
|
||||
chips[chip_name]['application-notes'] = documents_for(chip_name, 'Application note')
|
||||
|
||||
if 'datasheet' in chips[chip_name] and chips[chip_name]['datasheet'] is None:
|
||||
del chips[chip_name]['datasheet']
|
||||
if 'reference-manual' in chips[chip_name] and chips[chip_name]['reference-manual'] is None:
|
||||
del chips[chip_name]['reference-manual']
|
||||
|
||||
# Some packages have some peripehrals removed because the package had to
|
||||
# remove GPIOs useful for that peripheral. So we merge all peripherals from all packages.
|
||||
peris = chips[chip_name]['peripherals']
|
||||
@ -642,6 +653,15 @@ def parse_chips():
|
||||
raise Exception("missing header for {}".format(chip_name))
|
||||
h = headers_parsed[h]
|
||||
|
||||
chip['flash']['base'] = h['defines']['all']['FLASH_BASE']
|
||||
|
||||
if 'SRAM_BASE' in h['defines']['all']:
|
||||
chip['ram']['base'] = h['defines']['all']['SRAM_BASE']
|
||||
elif 'SRAM1_BASE' in h['defines']['all']:
|
||||
chip['ram']['base'] = h['defines']['all']['SRAM1_BASE']
|
||||
elif 'D1_AXISRAM_BASE' in h['defines']['all']:
|
||||
chip['ram']['base'] = h['defines']['all']['D1_AXISRAM_BASE']
|
||||
|
||||
# print("Got", len(chip['cores']), "cores")
|
||||
for core in chip['cores']:
|
||||
core_name = core['name']
|
||||
|
Loading…
x
Reference in New Issue
Block a user