File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 20
20
#include <platform_config.h>
21
21
#include <screen.h>
22
22
#include <usb/usb.h>
23
- #ifndef TESTING
24
23
24
+ #if defined(TESTING )
25
+ #include <stdio.h>
26
+ #include <stdlib.h>
27
+ #endif
28
+
29
+ #ifndef TESTING
25
30
void HardFault_Handler (void )
26
31
{
27
32
Abort ("Unexpected error.\nPlease contact support." );
@@ -35,20 +40,23 @@ void MemManage_Handler(void)
35
40
36
41
void Abort (const char * msg )
37
42
{
43
+ #if defined(TESTING )
44
+ fprintf (stderr , "%s\n" , msg );
45
+ exit (1 );
46
+ #else
38
47
util_log ("%s" , msg );
39
48
screen_print_debug (msg , 0 );
40
49
usb_stop ();
41
- #if !defined(TESTING )
42
50
#if defined(BOOTLOADER )
43
51
bootloader_close_interfaces ();
44
52
#else
45
53
system_close_interfaces ();
46
- #endif
47
54
#endif
48
55
// Break the program if we are debugging
49
56
ASSERT (false);
50
57
while (1 ) {
51
58
}
59
+ #endif
52
60
}
53
61
54
62
void AbortAutoenter (const char * msg )
You can’t perform that action at this time.
0 commit comments