stm32 board runner can flash external NOR with STM32CubeProgrammer#68377
stm32 board runner can flash external NOR with STM32CubeProgrammer#68377carlescufi merged 3 commits intozephyrproject-rtos:mainfrom
Conversation
|
Building for the stm32h7b3i_dk board: and flash with west flash: |
f0e9ed3 to
eaa087c
Compare
|
add the tescase to scripts/west_commands/tests/test_stm32cubeprogrammer.py for the extload argument |
|
Dear @FRASTM, I ran the Do I need to do anything else? Thank you! |
The reason is that you probably miss the corresponding update of the boards/arm/stm32h7b3i_dk/board.cmake |
|
fixing error on script execution |
9418551 to
7425a40
Compare
There was a problem hiding this comment.
`External loader to be used by stm32cubeprogrammer to program the targeted external memory.
|
Please fix remaining CI issues. |
|
Maybe it is worth mentioning that external loader must be located within |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Correct the error "F541 f-string is missing placeholders" when ruuning Flake Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the option to support an external loader for flashing hex file to internal and external NOR flash using the STM32CubProgrammer CLI with a board_runner_args "--extload=MX25LM51245G_STM32U585I-IOT02A.stldr" The absolute path of the stldr file is added to the stm32CubeProgrammer command. Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add the option "--extload" for the "extload" argument. Signed-off-by: Francois Ramu <francois.ramu@st.com>
|
changed to remove the comment |
|
@mbolivar-ampere Would you be able to have a look ? |
|
In order to diff --git a/boards/st/stm32h7b3i_dk/board.cmake b/boards/st/stm32h7b3i_dk/board.cmake
index d13c9c0e976..091f1d393a2 100644
--- a/boards/st/stm32h7b3i_dk/board.cmake
+++ b/boards/st/stm32h7b3i_dk/board.cmake
@@ -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) |
After 1 week, moving assignee from @mbolivar-ampere to @carlescufi since he's West collaborator |
Add an option to the STM32CubeProgrammer board runner to include the external loader corresponding to the target board.
The west flash command is updated to support the option and flash external octo-NOR with an external loader.
This is mainly use for stm32 disco kit target boards where the external NOR flash is in MemoryMapped mode, for XiP.
The external flash memory is mapped to 0x70000000. for stm32u585 disco kit
The external flash memory is mapped to 0x90000000. for stm32h7b3 disco kit
The board runner STM32CubeProgrammer is updated to get :
board_runner_args(stm32cubeprogrammer "--hex-file=${ZEPHYR_BASE}/build/zephyr/zephyr.hex")board_runner_args(stm32cubeprogrammer "--tool-opt=0x70000000")board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32U585I-IOT02A.stldr")