
Demonstrates crash on memory allocation.
Revision 1:883b8bc1f54a, committed 2011-03-29
- Comitter:
- Kemp
- Date:
- Tue Mar 29 13:47:01 2011 +0000
- Parent:
- 0:786b75c6aaca
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 786b75c6aaca -r 883b8bc1f54a main.cpp --- a/main.cpp Tue Mar 29 13:42:16 2011 +0000 +++ b/main.cpp Tue Mar 29 13:47:01 2011 +0000 @@ -2,18 +2,29 @@ Serial pc(USBTX, USBRX); +BusOut leds(LED1, LED2, LED3, LED4); extern "C" void HardFault_Handler() { pc.printf("Hard fault!\r\n"); - exit(1); + while(1) { + leds = 0x09; + wait(0.4); + leds = 0x06; + wait(0.4); + } } void fail() { pc.printf("Caught the failure\r\n"); - exit(1); + while(1) { + leds = 0x09; + wait(0.4); + leds = 0x06; + wait(0.4); + } }