@@ -52,15 +52,26 @@ __vectors:
52
52
#else
53
53
. word isr_nmi
54
54
. word isr_hardfault
55
+ #if PICO_RP2040
55
56
. word isr_invalid // Reserved , should never fire
56
57
. word isr_invalid // Reserved , should never fire
57
58
. word isr_invalid // Reserved , should never fire
58
59
. word isr_invalid // Reserved , should never fire
60
+ #else
61
+ . word isr_memmanage
62
+ . word isr_busfault
63
+ . word isr_usagefault
64
+ . word isr_securefault
65
+ #endif
59
66
. word isr_invalid // Reserved , should never fire
60
67
. word isr_invalid // Reserved , should never fire
61
68
. word isr_invalid // Reserved , should never fire
62
69
. word isr_svcall
70
+ #if PICO_RP2040
63
71
. word isr_invalid // Reserved , should never fire
72
+ #else
73
+ . word isr_debugmonitor
74
+ #endif
64
75
. word isr_invalid // Reserved , should never fire
65
76
. word isr_pendsv
66
77
. word isr_systick
@@ -287,8 +298,20 @@ if_irq_decl 79 isr_irq79
287
298
#if PICO_NUM_VTABLE_IRQS > 80
288
299
#error more IRQ entries required
289
300
#endif
301
+ #if !PICO_RP2040
302
+ // since these are disabled by default , map them all to __unhandled_user_irq (will have
303
+ // a negative number
304
+ decl_isr isr_memmanage
305
+ decl_isr isr_busfault
306
+ decl_isr isr_usagefault
307
+ decl_isr isr_securefault
308
+ decl_isr isr_debugmonitor
309
+ #endif
290
310
291
- // All unhandled USER IRQs fall through to here
311
+ // All unhandled USER IRQs fall through to here.
312
+ // Additionally , if the Armv9 - M MemManage/BusFault/UsageFault/SescureFault/DebugMonitor exceptions
313
+ // are enabled , but the handlers are not defined , then unhandled_user_irq_num_in_r0 will
314
+ // also be reached , but with a negative exception number (e.g. MemManage == - 12 )
292
315
. global __unhandled_user_irq
293
316
.thumb_func
294
317
__unhandled_user_irq:
@@ -305,7 +328,7 @@ unhandled_user_irq_num_in_r0:
305
328
306
329
decl_isr_bkpt isr_invalid
307
330
#if !PICO_MINIMAL_STORED_VECTOR_TABLE
308
- // these are separated out for clarity
331
+ // these are separated out into individual BKPT instructions with label for clarity
309
332
decl_isr_bkpt isr_nmi
310
333
decl_isr_bkpt isr_hardfault
311
334
decl_isr_bkpt isr_svcall
0 commit comments