Skip to content

Commit b653c83

Browse files
committed
fix RP2040 build
1 parent 7ffe979 commit b653c83

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rp2_common/pico_runtime_init/runtime_init.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ PICO_RUNTIME_INIT_FUNC_RUNTIME(runtime_init_spin_locks_reset, PICO_RUNTIME_INIT_
195195
// RISC-V to have an initial flash-resident vector table at a well-known
196196
// location, unlike Cortex-M which can take an NMI on cycle 0.
197197
#ifndef __riscv
198+
#include "hardware/structs/scb.h"
199+
#include "hardware/irq.h"
198200

199201
#if !PICO_RUNTIME_NO_INIT_INSTALL_RAM_VECTOR_TABLE
200202
// note that this is not a safely overridable value, you should use override PICO_NUM_VTABLE_IRQs instead.
@@ -209,10 +211,9 @@ PICO_RUNTIME_INIT_FUNC_RUNTIME(runtime_init_spin_locks_reset, PICO_RUNTIME_INIT_
209211

210212
uint32_t __attribute__((section(".ram_vector_table"))) ram_vector_table[PICO_RAM_VECTOR_TABLE_SIZE];
211213

212-
#include "hardware/structs/scb.h"
213214
void runtime_init_install_ram_vector_table(void) {
214215
// Note on RISC-V the RAM vector table is initialised during crt0
215-
#if !(PICO_NO_RAM_VECTOR_TABLE || PICO_NO_FLASH) && !defined(__riscv)
216+
#if !(PICO_NO_RAM_VECTOR_TABLE || PICO_NO_FLASH)
216217
extern uint32_t __vectors;
217218
extern uint32_t __vectors_end;
218219
uint32_t stored_words = &__vectors_end - &__vectors;

0 commit comments

Comments
 (0)