Skip to content

Commit f788e76

Browse files
authored
Merge pull request #1618 from xwings/python-3.13
Fix MCU wait
2 parents a6631f4 + 3a8d371 commit f788e76

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

qiling/os/mcu/mcu.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ def on_start(self):
2727
def on_interrupted(self, ucerr: int):
2828
self._begin = self.pc
2929

30-
# And don't restore anything.
30+
# Real silicon would vector to HardFault here; we don't model that, so log and
31+
# request a clean stop instead of raising — otherwise fast-mode timeouts surface
32+
# firmware faults as test errors.
3133
if ucerr != UC_ERR_OK:
32-
raise UcError(ucerr)
34+
self.ql.log.warning(f'fast mode halted: {UcError(ucerr)} at PC=0x{self.pc:08x}')
35+
self._stop_request = True
36+
return
3337

3438
self.ql.hw.step()
3539

0 commit comments

Comments
 (0)