board: arm: nucleo_g071 support openocd
This adds the support of openocd for nucleo board stm32g071rb It requires the openocd that supports stm32G0xx (zephyrproject-rtos/openocd#24) Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
2ed7bc8a7f
commit
e8bfa52e54
3 changed files with 20 additions and 0 deletions
|
@ -4,3 +4,4 @@ board_runner_args(pyocd "--flash-opt=-O reset_type=hw")
|
||||||
board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset")
|
board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset")
|
||||||
|
|
||||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||||
|
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
||||||
|
|
|
@ -133,7 +133,9 @@ Flashing
|
||||||
========
|
========
|
||||||
|
|
||||||
Nucleo G071RB board includes an ST-LINK/V2-1 embedded debug tool interface.
|
Nucleo G071RB board includes an ST-LINK/V2-1 embedded debug tool interface.
|
||||||
|
|
||||||
This interface is not yet supported by the openocd version included in the Zephyr SDK.
|
This interface is not yet supported by the openocd version included in the Zephyr SDK.
|
||||||
|
|
||||||
Instead, support can be enabled on pyocd by adding "pack" support with
|
Instead, support can be enabled on pyocd by adding "pack" support with
|
||||||
the following pyocd command:
|
the following pyocd command:
|
||||||
|
|
||||||
|
@ -141,6 +143,16 @@ the following pyocd command:
|
||||||
|
|
||||||
$ pyocd pack --install stm32g071rb
|
$ pyocd pack --install stm32g071rb
|
||||||
|
|
||||||
|
Note:
|
||||||
|
To manually enable the openocd interface, You can still update, compile and install
|
||||||
|
a 'local' openocd from the official openocd repo http://openocd.zylin.com .
|
||||||
|
Then run the following openocd command where the '/usr/local/bin/openocd'is your path
|
||||||
|
for the freshly installed openocd, given by "$ which openocd" :
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ west flash --openocd /usr/local/bin/openocd
|
||||||
|
|
||||||
Flashing an application to Nucleo G071RB
|
Flashing an application to Nucleo G071RB
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
|
7
boards/arm/nucleo_g071rb/support/openocd.cfg
Normal file
7
boards/arm/nucleo_g071rb/support/openocd.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
source [find interface/stlink.cfg]
|
||||||
|
|
||||||
|
transport select hla_swd
|
||||||
|
|
||||||
|
source [find target/stm32g0x.cfg]
|
||||||
|
|
||||||
|
reset_config srst_only
|
Loading…
Add table
Add a link
Reference in a new issue