[EXTERNAL] Re: [Zephyr-users] Errors while using west flash


Pandey, Mithun
 

HI Erwan,

 

Thanks for the reply,

 

The second option worked for me, although the build is still showing as using openocd (its already installed ),

One more option is working for me

 

#board_runner_args(openocd "--use-elf")

board_runner_args(pyocd "--device=STM32F429ZI")

 

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

 

earlier the board_runner_args is using jlink, maybe that’s the reason its not working.

 

Thanks and Regards

Mithun

 

 

From: users@... <users@...> On Behalf Of Erwan Gouriou
Sent: Wednesday, June 30, 2021 2:10 PM
To: Pandey, Mithun <MithunPandey@...>
Cc: users@...; Brezovec, Mark A <MarkABrezovec@...>
Subject: [EXTERNAL] Re: [Zephyr-users] Errors while using west flash

 

Hi Mithun,

 

Seeing this:

  File "C:\Users\username\zephyrproject\zephyr\scripts/west_commands\runners\openocd.py", line 114, in do_run
    self.require(self.openocd_cmd[0])

 

It seems that west is attempting to flash using openocd which might not be installed in your environment.

You have two options:

 

- Install openocd 

- [Not tested] Set pyocd as the default runner for this board, by adding the following lines in board/arm/nucleo_f429zi/board.cmake

board_runner_args(pyocd "--target=stm32f429xi")

include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

 

 

HIH

 

 

On Wed, 30 Jun 2021 at 06:19, Pandey, Mithun <mithunpandey@...> wrote:

HI,

 

I am following the setup steps in given in https://docs.zephyrproject.org/latest/getting_started/index.html

Using a Python (3.6) Virtual environment.

I was able to build the Blinky example, trying to flash it in Nucleo F429zi board. West build Log file attached.

Tool chain used is “GNU_Arm_Embedded_Toolchain”

 

I have two Nucleo boards (One 429 and one F767), output of “pyocd list” command shows that

  #   Probe          Unique ID

-----------------------------------------------

  0   STM32 STLink   066CFF363336485043072710

  1   STM32 STLink   0674FF535155878281133844

 

Problem:

When doing the flashing using “west flash” command I am getting python related error, log file attached.

 

Kindly help in resolving this, is it happening because two probes are attached ?, I tried to find a way to specify the board number in the west command but didn’t find any.

 

Kindly help.

 

Thanks and Regards

Mithun