Skip to content

Commit a1fd632

Browse files
authored
[fix] miss 'alwaysPresent=1' for internal flash
1 parent 5b7cd37 commit a1fd632

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ def main(pack_path: str, xml_path: str):
136136
flm_ele = dev._find_matching_algo(rom)
137137
n_ele_fbi = SubElement(n_ele, 'FlashBankInfo')
138138
name = '{} ({})'.format(rom.name, rom.type.name)
139+
always_present = '0'
139140
if rom.is_boot_memory:
140141
name = 'Internal Flash'
142+
always_present = '1'
141143
algo_src_repath = flm_ele.attrib['name']
142144
algo_dst_repath = 'Devices/{}/{}/{}'.format(
143145
vendor_name, family_name, os.path.basename(algo_src_repath))
@@ -146,7 +148,8 @@ def main(pack_path: str, xml_path: str):
146148
'BaseAddr': '0x{:0>8X}'.format(rom.start),
147149
'MaxSize': '0x{:0>8X}'.format(rom.length),
148150
'Loader': algo_dst_repath,
149-
'LoaderType': 'FLASH_ALGO_TYPE_OPEN'})
151+
'LoaderType': 'FLASH_ALGO_TYPE_OPEN',
152+
'AlwaysPresent': always_present})
150153
bin_data = cmsis_pack.get_file(algo_src_repath)
151154
dst_path = jlink_root_dir + '/' + algo_dst_repath
152155
Path(os.path.dirname(dst_path)).mkdir(

0 commit comments

Comments
 (0)