Skip to content

Commit 4a0dfae

Browse files
committed
Handle the remap option
1 parent 712a79e commit 4a0dfae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

qiling/loader/mcu.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,12 @@ def load_env(self):
119119
size = args['size']
120120
base = args['base']
121121
self.ql.mem.map(base, size, info=f'[{name}]')
122-
123-
if name == 'FLASH':
124-
self.ql.hw.setup_remap(0, base, size, info=f'[CODE]')
122+
123+
if memtype == 'remap':
124+
size = args['size']
125+
base = args['base']
126+
alias = args['alias']
127+
self.ql.hw.setup_remap(alias, base, size, info=f'[{name}]')
125128

126129
if memtype == 'bitband':
127130
size = args['size'] * 32

0 commit comments

Comments
 (0)