-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hi,
I was running a program inside the simulator, that triggers a HardFault inside the HardFault handler code. This caused the simulator to enter an infinite loop, where a HardFault continuously triggers another HardFault, and so on until it breaks.
From the ARMv6-M architecture manual:
The standard exception entry mechanism does not apply where a fault or Supervisor Call occurs at a priority of -1 or higher.
- ARMv7-M requires the processor to handle most of these cases using a Lockup mechanism; otherwise, the condition becomes pending or is ignored.
- ARMv6-M uses Lockup in all its supported cases. Lockup means the processor suspends normal instruction execution and enters a Lockup state.
It seems the simulator does not implement this Lockup behavior, the current behavior leads to the infinite loop described above.
Could you clarify how the fault escalation mechanism is intended to work in the simulator? Additionally, do you think the behavior should be adjusted to handle this scenario more gracefully? In my opinion, the simulator should just exit with error and dump of the internal registers of the simulated processor.
Thank you!