@@ -30,6 +30,10 @@ PROVIDE(_heap_size = 0);
30
30
31
31
/** TRAP ENTRY POINTS **/
32
32
33
+ /* Default abort entry point. If no abort symbol is provided, then abort maps to _abort. */
34
+ EXTERN(_abort);
35
+ PROVIDE(abort = _abort);
36
+
33
37
/* Default trap entry point. The riscv-rt crate provides a weak alias of this function,
34
38
which saves caller saved registers, calls _start_trap_rust, restores caller saved registers
35
39
and then returns. Users can override this alias by defining the symbol themselves */
@@ -54,7 +58,7 @@ PROVIDE(_start_MachineExternal_trap = _start_DefaultHandler_trap);
54
58
55
59
/* Default exception handler. The riscv-rt crate provides a weak alias of this function,
56
60
which is a busy loop. Users can override this alias by defining the symbol themselves */
57
- EXTERN (ExceptionHandler);
61
+ PROVIDE (ExceptionHandler = abort );
58
62
59
63
/* It is possible to define a special handler for each exception type.
60
64
By default, all exceptions are handled by ExceptionHandler. However, users can
@@ -76,13 +80,10 @@ PROVIDE(StorePageFault = ExceptionHandler);
76
80
77
81
/** INTERRUPT HANDLERS **/
78
82
79
- /* Default interrupt handler. The riscv-rt crate provides a weak alias of this function,
80
- which is a busy loop. Users can override this alias by defining the symbol themselves */
81
- EXTERN(DefaultHandler);
82
-
83
83
/* It is possible to define a special handler for each interrupt type.
84
84
By default, all interrupts are handled by DefaultHandler. However, users can
85
85
override these alias by defining the symbol themselves */
86
+ PROVIDE(DefaultHandler = abort);
86
87
PROVIDE(SupervisorSoft = DefaultHandler);
87
88
PROVIDE(MachineSoft = DefaultHandler);
88
89
PROVIDE(SupervisorTimer = DefaultHandler);
0 commit comments