Parse memory names slightly better from the XML.
This commit is contained in:
parent
72478d1bc5
commit
83f5b39ecb
@ -304,7 +304,7 @@
|
|||||||
- device-id: 0x440
|
- device-id: 0x440
|
||||||
names:
|
names:
|
||||||
- STM32F05x
|
- STM32F05x
|
||||||
- STMF030x8
|
- STM32F030x8
|
||||||
ram:
|
ram:
|
||||||
address: 0x20000000
|
address: 0x20000000
|
||||||
bytes: 0x1ff8
|
bytes: 0x1ff8
|
||||||
@ -323,7 +323,7 @@
|
|||||||
- device-id: 0x442
|
- device-id: 0x442
|
||||||
names:
|
names:
|
||||||
- STM32F09x
|
- STM32F09x
|
||||||
- STMF030xC
|
- STM32F030xC
|
||||||
ram:
|
ram:
|
||||||
address: 0x20000000
|
address: 0x20000000
|
||||||
bytes: 0x8000
|
bytes: 0x8000
|
||||||
@ -351,7 +351,7 @@
|
|||||||
- device-id: 0x445
|
- device-id: 0x445
|
||||||
names:
|
names:
|
||||||
- STM32F04x
|
- STM32F04x
|
||||||
- STMF070x6
|
- STM32F070x6
|
||||||
ram:
|
ram:
|
||||||
address: 0x20000000
|
address: 0x20000000
|
||||||
bytes: 0x1800
|
bytes: 0x1800
|
||||||
|
@ -35,6 +35,8 @@ def splat_names(base, parts):
|
|||||||
for part in parts:
|
for part in parts:
|
||||||
if part.startswith("STM32"):
|
if part.startswith("STM32"):
|
||||||
names.append( base )
|
names.append( base )
|
||||||
|
elif part.startswith( base[5]):
|
||||||
|
names.append('STM32' + part)
|
||||||
else:
|
else:
|
||||||
names.append( base[0: len(base) - len(part)] + part)
|
names.append( base[0: len(base) - len(part)] + part)
|
||||||
|
|
||||||
@ -56,6 +58,8 @@ def split_names(str):
|
|||||||
elif name.startswith("STM32"):
|
elif name.startswith("STM32"):
|
||||||
current_base = name
|
current_base = name
|
||||||
cleaned.append(name)
|
cleaned.append(name)
|
||||||
|
elif name.startswith( current_base[5]):
|
||||||
|
names.append('STM32' + name)
|
||||||
else:
|
else:
|
||||||
cleaned.append( current_base[0: len(current_base) - len(name)] + name)
|
cleaned.append( current_base[0: len(current_base) - len(name)] + name)
|
||||||
return cleaned
|
return cleaned
|
||||||
|
Loading…
x
Reference in New Issue
Block a user