Skip to content

Commit

Permalink
board: arm: nucleo_f746zg: flashing
Browse files Browse the repository at this point in the history
Add the possibility to flash nucleo-f746zg board using west
STM32CubeProgrammer runner.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
  • Loading branch information
ajarmouni-st committed Apr 2, 2024
1 parent 6833f40 commit 76d168b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/st/nucleo_f746zg/board.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

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

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
14 changes: 14 additions & 0 deletions boards/st/nucleo_f746zg/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ Nucleo F746ZG board includes an ST-LINK/V2-1 embedded debug tool interface.
Flashing an application to Nucleo F746ZG
----------------------------------------

The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its installation is required to be able to flash the board.

Alternatively, openocd (provided in Zephyr SDK) 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
Here is an example for the :ref:`hello_world` application.

Run a serial host program to connect with your Nucleo board.
Expand Down Expand Up @@ -233,3 +244,6 @@ You can debug an application in the usual way. Here is an example for the

.. _STM32F746 reference manual:
https://www.st.com/resource/en/reference_manual/dm00124865.pdf

.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html

0 comments on commit 76d168b

Please sign in to comment.