/* Provide routines which hook the MRI debug monitor into GCC4MBED projects. */\r
#include <string.h>\r
#include <mri.h>\r
-\r
+#include <cmsis.h>\r
\r
extern unsigned int __bss_start__;\r
extern unsigned int __bss_end__;\r
{\r
abort();\r
}\r
+\r
+/* Trap calls to malloc/free/realloc in ISR. */\r
+extern "C" void __malloc_lock(void)\r
+{\r
+ if (__get_IPSR() != 0)\r
+ __debugbreak();\r
+}\r
+\r
+extern "C" void __malloc_unlock(void)\r
+{\r
+}\r