LPC11C24 - break on die()

This commit is contained in:
Pavel Kirienko 2015-10-13 12:49:41 +03:00
parent 6f782b2be2
commit d9ca67c84c

View File

@ -134,7 +134,14 @@ void init()
void die()
{
while (true) { }
static const volatile unsigned& DHCSR = *reinterpret_cast<unsigned*>(0xE000EDF0U);
while (true)
{
if ((DHCSR & 1U) != 0)
{
__asm volatile ("bkpt #0\n"); // Break into the debugger
}
}
}
#if __GNUC__