Skip to content

Commit 56522c5

Browse files
committed
Cover env by profile
1 parent ec285ac commit 56522c5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

qiling/loader/mcu.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ def reset(self):
111111
self.ql.arch.init_context()
112112
self.entry_point = self.ql.reg.read('pc')
113113

114-
def run(self):
114+
def load_profile(self):
115+
self.ql.env.update(self.ql.profile)
116+
117+
def load_env(self):
115118
for name, args in self.env.items():
116119
memtype = args['type']
117120
if memtype == 'memory':
@@ -135,6 +138,10 @@ def run(self):
135138

136139
if memtype == 'core peripheral':
137140
self.ql.hw.create(name.lower())
141+
142+
def run(self):
143+
self.load_profile()
144+
self.load_env()
138145

139146
## Handle interrupt from instruction execution
140147
self.ql.hook_intr(self.ql.arch.soft_interrupt_handler)

0 commit comments

Comments
 (0)