aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/swlink/platform.c
diff options
context:
space:
mode:
authorRichard Eoin Meadows2014-05-26 13:25:53 +0100
committerRichard Eoin Meadows2014-05-28 12:10:26 +0100
commit63bce97cbd521fd464c2e11bfbb034edf602f68c (patch)
tree42e92beb49cd86a6436f84347a73ee472cbf491a /src/platforms/swlink/platform.c
parent72ae78a185d08d9979748dcef3d0cd29deddde9b (diff)
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.
Diffstat (limited to 'src/platforms/swlink/platform.c')
-rw-r--r--src/platforms/swlink/platform.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platforms/swlink/platform.c b/src/platforms/swlink/platform.c
index 0f5695d..74f8691 100644
--- a/src/platforms/swlink/platform.c
+++ b/src/platforms/swlink/platform.c
@@ -99,6 +99,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;