2023-03-31 02:55 AM
I tried to flash Zephyr Firmware by DFU and I the firmware flashed as I expected.
In the other hand, I tried flashing firmware by STLINK-V3MINI something raise an error.
This is the contents of board.cmake file:
# west flash -r openocd
# west flash -r dfu-util
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
board_runner_args(jlink "--device=STM32L4R9ZIJ6" "--speed=4000")
board_runner_args(pyocd "--target=STM32L4")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
Also, this is the contents of openocd.cfg file:
# source [find interface/stlink.cfg]
source [find interface/stlink-dap.cfg]
set WORKAREASIZE 0x8000
# transport select hla_swd
# Transport SWD protocol
transport select "dapdirect_swd"
set CHIPNAME STM32L4R9ZIJx
set BOARDNAME STEVAL-STWINKT1
# Enable debug when in low power mode
set ENABLE_LOW_POWER 1
# Stop watchdog counter when halt
set STOP_WATCHDOG 1
# STlink debug clock frequency
set CLOCK_FREQ 4000
# Reset configuration
# Use hardware reset, connect under reset
# connect_assert_srst nedded if low power mode application running (WFI...)
reset_config srst_only srst_nogate connect_assert_srst
set CONNECT_UNDER_RESET 1
set CORE_RESET 0
source [find target/stm32l4x.cfg]
# $_TARGETNAME configure -event gdb-attach {
# echo "Debugger attaching: halting execution"
# reset halt
# gdb_breakpoint_override hard
# }
# $_TARGETNAME configure -event gdb-detach {
# echo "Debugger detaching: resuming execution"
# resume
# }
Thanks!
Solved! Go to Solution.
2023-03-31 03:10 AM
The issue was that in the openocd.cdg file I was written:
source [find target/stm32f4x.cfg] in state of source [find target/stm32l4x.cfg]
So the issue was fixed :grinning_face_with_sweat:
2023-03-31 03:10 AM
The issue was that in the openocd.cdg file I was written:
source [find target/stm32f4x.cfg] in state of source [find target/stm32l4x.cfg]
So the issue was fixed :grinning_face_with_sweat: