altos: Add stack-guard code. Uses STM MPU to trap stack overflow.
[fw/altos] / src / stm / ao_interrupt.c
index 6b4a9700c620fbcab4ca446cf4df5f4b00988af3..a423d8b13b1f76ad4ab2524602da956e8a74eadb 100644 (file)
@@ -15,6 +15,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
+#include <ao.h>
 #include "stm32l.h"
 #include <string.h>
 
@@ -28,7 +29,7 @@ extern char __bss_start__, __bss_end__;
 
 void stm_halt_isr(void)
 {
-       for(;;);
+       ao_panic(AO_PANIC_CRASH);
 }
 
 void stm_ignore_isr(void)