From 63bce97cbd521fd464c2e11bfbb034edf602f68c Mon Sep 17 00:00:00 2001 From: Richard Eoin Meadows Date: Mon, 26 May 2014 13:25:53 +0100 Subject: PLATFORM_FATAL_ERRORs are now caught even when they happen in the initial JTAG scan that occours during platform_init. Previously any fatal errors that occoured during this scan caused a hardfault. --- src/platforms/f4discovery/platform.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/platforms/f4discovery') diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index 5b073e9..efe8050 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -92,6 +92,11 @@ int platform_init(void) cdcacm_init(); + // Set recovery point + if (setjmp(fatal_error_jmpbuf)) { + return 0; // Do nothing on failure + } + jtag_scan(NULL); return 0; -- cgit v1.2.3