Skip to content

Commit f03d968

Browse files
authored
add family name in comment header
1 parent 023910b commit f03d968

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def main(pack_path: str, xml_path: str):
7474
print('-> Found {} devices'.format(len(cmsis_pack.devices)))
7575

7676
vendor_name = cmsis_pack.devices[0].vendor
77+
dev_familys = cmsis_pack.devices[0].families
78+
7779
xml_dom = ElementTree.parse(
7880
xml_path, parser=ElementTree.XMLParser(target=CommentedTreeBuilder()))
7981
xml_dom_db = xml_dom.getroot()
@@ -93,7 +95,7 @@ def main(pack_path: str, xml_path: str):
9395
# add comment header
9496
if len(vendor_existed_devs) == 0:
9597
xml_dom_db.append(ElementTree.Comment(''))
96-
xml_dom_db.append(ElementTree.Comment(' ' + vendor_name + ' '))
98+
xml_dom_db.append(ElementTree.Comment(' {} ({}) '.format(vendor_name, dev_familys[0])))
9799
xml_dom_db.append(ElementTree.Comment(''))
98100

99101
ign_cnt = 0

0 commit comments

Comments
 (0)