blob: ced0e0c355de395f48cc6de8d38dbb99efa1ea30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Test unrecoverable exception
*/
#include "armv7m.h"
static
void hard(void)
{
puts("In HardFault\noops...\n");
abort();
}
void main(void)
{
run_table.hard = &hard;
CPSID(if);
puts("Faulting to unrecoverable...\n");
/* Trigger a UsageFault, which will escalate to unrecoverable
* since FAULTMASK is set
*/
__asm__ volatile (".word 0xffff");
puts("Oops, I shouldn't be here...\n");
}
|