cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer issue with West flash command

xavierpacheco-eaton
Associate II

It's the first time I encounter this issue so I'm not familiar with it. It happens with the command "west flash". The problem started after upgrading Zephyr to v3.6.0. Prior to that it was working. Any hints are appreciated!

usage: stm32cubeprogrammer [-h] [-d DIR] [-r RUNNER] [--skip-rebuild] [--domain DOMAIN] [-H] [--board-dir DIR] [--gdb GDB] [--openocd OPENOCD] [--openocd-search DIR]
                           [--elf-file FILE] [--hex-file FILE] [--bin-file FILE] [--erase] [-O TOOL_OPT] --port PORT [--frequency FREQUENCY] [--reset-mode {sw,hw,core}]
                           [--conn-modifiers CONN_MODIFIERS] [--cli CLI] [--use-elf]
stm32cubeprogrammer: error: argument --reset/--no-reset: ignored explicit argument 'hw'

xavierpachecoeaton_0-1722863370555.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

Hello @xavierpacheco-eaton

Verify if CubeProgrammer is added in the boards\st\xxxxxx\board.cmake after upgrade. If not, add 

board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Sarra.S
ST Employee

Hello @xavierpacheco-eaton

Verify if CubeProgrammer is added in the boards\st\xxxxxx\board.cmake after upgrade. If not, add 

board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,

Jake

ST Support

xavierpacheco-eaton
Associate II

The issue has been resolved. As @Sarra.S pointed out, I needed to update the following line and replace --reset with --reset-mode. 

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

Thank you!