From 980947c44f8c4a62bdc088d7ab88e5e062e1293a Mon Sep 17 00:00:00 2001
From: Thibaut VIARD <aethaniel@sam-geek.org>
Date: Tue, 12 May 2015 15:36:12 +0200
Subject: [PATCH] Adding breakpoints in handlers for DEBUG mode

---
 cores/arduino/startup.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cores/arduino/startup.c b/cores/arduino/startup.c
index 1eda635b..f5113227 100644
--- a/cores/arduino/startup.c
+++ b/cores/arduino/startup.c
@@ -37,6 +37,8 @@ void Dummy_Handler(void);
 #if defined DEBUG
 void HardFault_Handler( void )
 {
+  __BKPT( 3 ) ;
+
   while ( 1 )
   {
   }
@@ -386,6 +388,10 @@ void Reset_Handler( void )
  */
 void Dummy_Handler( void )
 {
+#if defined DEBUG
+  __BKPT( 3 ) ;
+#endif // DEBUG
+
   while ( 1 )
   {
   }
-- 
GitLab