mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 22:33:34 +08:00
LPC11C24 - break on die()
This commit is contained in:
@@ -134,7 +134,14 @@ void init()
|
|||||||
|
|
||||||
void die()
|
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__
|
#if __GNUC__
|
||||||
|
|||||||
Reference in New Issue
Block a user