Commit ae06f927 authored by Francois Ramu's avatar Francois Ramu Committed by David Leach
Browse files

boards: arm: stm32h7b3 disco with external memory region for XiP



Declare a sub-region of the whole ext_memory with attributes
ATTR_MPU_IO so that XiP becomes possible on this external
octo- NOR flash.  Use the STM32CubeProgrammer runner
with the external loader for flashing.

Signed-off-by: default avatarFrancois Ramu <francois.ramu@st.com>
parent 78fb2313
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4,5 +4,14 @@
board_runner_args(jlink "--device=STM32H7B3LI" "--speed=4000")
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)

if(CONFIG_STM32_MEMMAP)
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--hex-file=${ZEPHYR_BASE}/build/zephyr/zephyr.hex")
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32H7B3I-DISCO.stldr")
else()
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw" )
endif()

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
+8 −0
Original line number Diff line number Diff line
@@ -59,6 +59,14 @@
		zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
	};

	octo_nor: memory@90000000 {
		compatible = "zephyr,memory-region";
		reg = <0x90000000 DT_SIZE_M(64)>;
		zephyr,memory-region = "EXTMEM";
		/* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */
		zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_IO) )>;
	};

	transceiver0: can-phy0 {
		compatible = "microchip,mcp2562fd", "can-transceiver-gpio";
		standby-gpios = <&gpioh 8 GPIO_ACTIVE_HIGH>;