diff --git a/hw/bsp/ra/boards/portenta_c33/script/fsp.ld b/hw/bsp/ra/boards/portenta_c33/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/portenta_c33/script/fsp.ld +++ b/hw/bsp/ra/boards/portenta_c33/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/ra4m1_ek/script/fsp.ld b/hw/bsp/ra/boards/ra4m1_ek/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/ra4m1_ek/script/fsp.ld +++ b/hw/bsp/ra/boards/ra4m1_ek/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/ra4m3_ek/script/fsp.ld b/hw/bsp/ra/boards/ra4m3_ek/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/ra4m3_ek/script/fsp.ld +++ b/hw/bsp/ra/boards/ra4m3_ek/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/ra6m1_ek/script/fsp.ld b/hw/bsp/ra/boards/ra6m1_ek/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/ra6m1_ek/script/fsp.ld +++ b/hw/bsp/ra/boards/ra6m1_ek/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/ra6m5_ek/script/fsp.ld b/hw/bsp/ra/boards/ra6m5_ek/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/ra6m5_ek/script/fsp.ld +++ b/hw/bsp/ra/boards/ra6m5_ek/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/ra8m1_ek/script/fsp.ld b/hw/bsp/ra/boards/ra8m1_ek/script/fsp.ld index 32cbf0b22..d7f78a915 100644 --- a/hw/bsp/ra/boards/ra8m1_ek/script/fsp.ld +++ b/hw/bsp/ra/boards/ra8m1_ek/script/fsp.ld @@ -177,6 +177,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/boards/uno_r4/script/fsp.ld b/hw/bsp/ra/boards/uno_r4/script/fsp.ld index 627ffe4d9..605eef7d2 100644 --- a/hw/bsp/ra/boards/uno_r4/script/fsp.ld +++ b/hw/bsp/ra/boards/uno_r4/script/fsp.ld @@ -173,6 +173,9 @@ SECTIONS . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x400; KEEP(*(.rom_registers*)) + /* Reserving 0x100 bytes of space for ROM registers. */ + . = OPTION_SETTING_LENGTH > 0 ? . : __ROM_Start + 0x500; + /* Allocate flash write-boundary-aligned * space for sce9 wrapped public keys for mcuboot if the module is used. */ diff --git a/hw/bsp/ra/family.cmake b/hw/bsp/ra/family.cmake index 9eca93b4d..d4d795ae5 100644 --- a/hw/bsp/ra/family.cmake +++ b/hw/bsp/ra/family.cmake @@ -54,7 +54,6 @@ function(add_board_target BOARD_TARGET) ${FSP_RA}/src/bsp/mcu/all/bsp_io.c ${FSP_RA}/src/bsp/mcu/all/bsp_irq.c ${FSP_RA}/src/bsp/mcu/all/bsp_register_protection.c - ${FSP_RA}/src/bsp/mcu/all/bsp_rom_registers.c ${FSP_RA}/src/bsp/mcu/all/bsp_sbrk.c ${FSP_RA}/src/bsp/mcu/all/bsp_security.c ${FSP_RA}/src/r_ioport/r_ioport.c @@ -125,12 +124,17 @@ function(family_configure_example TARGET RTOS) # BSP ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c + # Explicitly added bsp_rom_registers here, otherwise MCU can be bricked if g_bsp_rom_registers is dropped by linker + ${FSP_RA}/src/bsp/mcu/all/bsp_rom_registers.c ) target_include_directories(${TARGET} PUBLIC # family, hw, board ${CMAKE_CURRENT_FUNCTION_LIST_DIR} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../ ) + target_compile_options(${TARGET} PUBLIC + -Wno-error=undef + ) # # RA has custom freertos port # if (NOT TARGET freertos_kernel_port)