Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/rp2040/pico_platform/include/pico/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@
#define PICO_RP2040_B2_SUPPORTED 1
#endif

// PICO_CONFIG: PICO_VECTOR_TABLE_NUM_IRQS, Number of IRQ vectors to include in the vector table, type=int, min=0, max=NUM_IRQS, default=NUM_IRQS, advanced=true, group=pico_platform
#ifndef PICO_VECTOR_TABLE_NUM_IRQS
#define PICO_VECTOR_TABLE_NUM_IRQS NUM_IRQS
#endif

#ifndef PICO_RAM_VECTOR_TABLE_SIZE
#define PICO_RAM_VECTOR_TABLE_SIZE (VTABLE_FIRST_IRQ + NUM_IRQS)
#define PICO_RAM_VECTOR_TABLE_SIZE (VTABLE_FIRST_IRQ + PICO_VECTOR_TABLE_NUM_IRQS)
#endif

// PICO_CONFIG: PICO_CLKDIV_ROUND_NEAREST, True if floating point clock divisors should be rounded to the nearest possible clock divisor by default rather than rounding down, type=bool, default=1, group=pico_platform
Expand Down
8 changes: 6 additions & 2 deletions src/rp2350/pico_platform/include/pico/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@
#define PICO_NO_RAM_VECTOR_TABLE 0
#endif

// PICO_CONFIG: PICO_VECTOR_TABLE_NUM_IRQS, Number of IRQ vectors to include in the vector table, type=int, min=0, max=NUM_IRQS, default=NUM_IRQS, advanced=true, group=pico_platform
#ifndef PICO_VECTOR_TABLE_NUM_IRQS
#define PICO_VECTOR_TABLE_NUM_IRQS NUM_IRQS
#endif

#ifndef PICO_RAM_VECTOR_TABLE_SIZE
#define PICO_RAM_VECTOR_TABLE_SIZE (VTABLE_FIRST_IRQ + NUM_IRQS)
#define PICO_RAM_VECTOR_TABLE_SIZE (VTABLE_FIRST_IRQ + PICO_VECTOR_TABLE_NUM_IRQS)
#endif

// PICO_CONFIG: PICO_USE_STACK_GUARDS, Enable/disable stack guards, type=bool, default=0, advanced=true, group=pico_platform
Expand Down Expand Up @@ -284,4 +289,3 @@ __force_inline static int32_t __mul_instruction(int32_t a, int32_t b) {
#endif // __ASSEMBLER__

#endif

2 changes: 1 addition & 1 deletion src/rp2_common/hardware_irq/include/hardware/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ extern "C" {
typedef void (*irq_handler_t)(void);

static inline void check_irq_param(__unused uint num) {
invalid_params_if(HARDWARE_IRQ, num >= NUM_IRQS);
invalid_params_if(HARDWARE_IRQ, num >= PICO_VECTOR_TABLE_NUM_IRQS);
}

/*! \brief Set specified interrupt's priority
Expand Down
4 changes: 2 additions & 2 deletions src/rp2_common/pico_crt0/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ __vectors:
#else

.macro if_irq_word num func
.if \num < NUM_IRQS
.if \num < PICO_VECTOR_TABLE_NUM_IRQS
.word \func
.endif
.endm
Expand Down Expand Up @@ -142,7 +142,7 @@ if_irq_word 76 isr_irq76
if_irq_word 77 isr_irq77
if_irq_word 78 isr_irq78
if_irq_word 79 isr_irq79
#if NUM_IRQS > 80
#if PICO_VECTOR_TABLE_NUM_IRQS > 80
#error more IRQ entries required
#endif
#endif
Expand Down
Loading