Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: st: fixes for board flashing #78448

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boards/st/nucleo_u031r8/board.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(pyocd "--target=stm32u031r8tx")

board_runner_args(jlink "--device=STM32U031R8" "--reset-after-load")

# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
18 changes: 11 additions & 7 deletions boards/st/nucleo_u031r8/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,19 @@ This probe allows to flash the board using various tools.
Flashing
========

Board is configured to be flashed using west STM32CubeProgrammer runner.
Installation of `STM32CubeProgrammer`_ is then required to flash the board.
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.

Alternatively, pyocd or jlink via an external probe can also be used to flash
and debug the board if west is told to use it as runner, which can be done by
passing either or ``-r pyocd``, or ``-r jlink``.
Alternatively, JLink or pyOCD can also be used to flash the board using
the ``--runner`` (or ``-r``) option:

For pyocd additional target information needs to be installed.
This can be done by executing the following commands.
.. code-block:: console

$ west flash --runner pyocd
$ west flash --runner jlink

For pyOCD, additional target information needs to be installed
by executing the following pyOCD commands:

.. code-block:: console

Expand Down
2 changes: 2 additions & 0 deletions boards/st/nucleo_u083rc/board.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(pyocd "--target=stm32u083rctx")

board_runner_args(jlink "--device=STM32U083RC" "--reset-after-load")

# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
2 changes: 2 additions & 0 deletions boards/st/nucleo_wb05kz/board.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=sw")

# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
2 changes: 2 additions & 0 deletions boards/st/nucleo_wb09ke/board.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=sw")

# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
20 changes: 20 additions & 0 deletions boards/st/stm32h750b_dk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,29 @@ COM port interface. Default communication settings are 115200 8N1.
Programming and Debugging
*************************

STM32H750B Discovery kit includes an ST-LINK-V3E embedded debug tool interface.
This probe allows flashing and debugging the board using various tools.

See :ref:`build_an_application` for more information about application builds.


Flashing
========

The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.

Alternatively, OpenOCD or JLink can also be used to flash the board using
the ``--runner`` (or ``-r``) option:

.. code-block:: console

$ west flash --runner openocd
$ west flash --runner jlink

Flashing an application to STM32H750B_DK
----------------------------------------

Connect the STM32H750B-DK to your host computer using the ST-LINK
USB port, then run a serial host program to connect with the board. For example:

Expand Down Expand Up @@ -147,3 +164,6 @@ You can debug an application in the usual way. Here is an example for the

.. _STM32H750xx datasheet:
https://www.st.com/resource/en/datasheet/stm32h750ib.pdf

.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html
2 changes: 2 additions & 0 deletions boards/st/stm32u083c_dk/board.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")

board_runner_args(pyocd "--target=stm32u083mctx")

board_runner_args(jlink "--device=STM32U083C-DK" "--reset-after-load")

# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
2 changes: 1 addition & 1 deletion boards/st/stm32u083c_dk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ This can be done by executing the following commands.


Flashing an application to STM32U083C_DK
------------------------------------------
----------------------------------------

Connect the STM32U083C_DK to your host computer using the USB port.
Then build and flash an application. Here is an example for the
Expand Down
14 changes: 12 additions & 2 deletions boards/st/stm32u5a9j_dk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,18 @@ This probe allows to flash and debug the board using various tools.
Flashing
========

Board is configured to be flashed using west STM32CubeProgrammer runner.
Installation of `STM32CubeProgrammer`_ is then required to flash the board.,
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.

Alternatively, OpenOCD can also be used to flash the board using
the ``--runner`` (or ``-r``) option:

.. code-block:: console

$ west flash --runner openocd

Flashing an application to STM32U5A9J_DK
----------------------------------------

Connect the STM32U5A9J Discovery board to your host computer using the USB
port, then run a serial host program to connect with your Discovery
Expand Down
2 changes: 1 addition & 1 deletion doc/develop/flash_debug/host-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ STM32CubeProgrammer Flash Host Tools
************************************

STMicroelectronics provides `STM32CubeProgrammer`_ (STM32CubeProg) as an official programming tool
for STM32 boards on Linux|r|, macOS|r|, and Windows|r| operating systems.
for STM32 boards on Linux |reg|, macOS |reg|, and Windows |reg| operating systems.

It provides an easy-to-use and efficient environment for reading, writing, and verifying device memory
through both the debug interface (JTAG and SWD) and the bootloader interface (UART and USB DFU, I2C, SPI, and CAN).
Expand Down
Loading