Skip to content

Commit

Permalink
boards: st: fix sysbuild multi image flash
Browse files Browse the repository at this point in the history
Problem:

When flashing a multi-image project with STLink through sysbuild,
the flash utility is told to erase the whole flash between each
single image flash.

Resulting in a partial flash where only the last image is effectively
stored on flash...

Correction:

A `west flash` must not implicitly perform a mass erase on its own.

If a flash erase is required, the option has to be passed manually.

zephyrproject-rtos#69582
  • Loading branch information
AlexFabre committed Jun 20, 2024
1 parent 69fb606 commit d7247a1
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion boards/st/b_u585i_iot02a/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(CONFIG_STM32_MEMMAP)
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32U585I-IOT02A.stldr")
else()
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
endif()

board_runner_args(openocd "--tcl-port=6666")
Expand Down
2 changes: 1 addition & 1 deletion boards/st/nucleo_h533re/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(pyocd "--target=stm32h533retx")

Expand Down
2 changes: 1 addition & 1 deletion boards/st/nucleo_h563zi/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(pyocd "--target=stm32h563zitx")

Expand Down
2 changes: 1 addition & 1 deletion boards/st/nucleo_u575zi_q/board.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(openocd "--tcl-port=6666")
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32f429i_disc1/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(jlink "--device=STM32F429ZI" "--speed=4000")

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32h573i_dk/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(pyocd "--target=stm32h573iikx")

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32h750b_dk/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(CONFIG_STM32_MEMMAP)
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--extload=MT25TL01G_STM32H750B-DISCO.stldr")
else()
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw" )
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw" )
endif()

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32h7b3i_dk/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(CONFIG_STM32_MEMMAP)
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--extload=MX25LM51245G_STM32H7B3I-DISCO.stldr")
else()
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw" )
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw" )
endif()

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32h7s78_dk/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
Expand Down
2 changes: 1 addition & 1 deletion boards/st/stm32u5a9j_dk/board.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2023 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset-mode=hw")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(openocd "--tcl-port=6666")
board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
Expand Down

0 comments on commit d7247a1

Please sign in to comment.