CoreValidation: Added HardFault_Handler to instantly exit the test run.
This prevents the model from continue running until the max cycle count is reached.
@@ -69,3 +69,15 @@ void IRQ_Handler(void) {
IRQ_EndOfInterrupt(irqn);
}
#endif
+
+#if defined(__CORTEX_M)
+__NO_RETURN
+extern void HardFault_Handler(void);
+void HardFault_Handler(void) {
+ #ifdef __MICROLIB
+ for(;;) {}
+ #else
+ exit(0);
+ #endif
+}
+#endif
