zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.87k stars 6.62k forks source link

STM32WB55RGV6: No output after west flash #40825

Closed KevTango closed 2 years ago

KevTango commented 2 years ago

Describe the bug After executing west flash to a custom board with an STM32WB55RGV6 microcontroller, I can not observe any output. I have successfully flashed the P-NUCLEO-WB55 which contains the same SoC as the custom board and can observe an output.

To Reproduce Steps to reproduce the behaviour:

  1. Connect SWDIO, SWCLK, T_VDD, GND from the P-NUCLEO-WB55 board to the custom board
  2. west build -b nucleo_wb55rg -s zephyr/samples/hello_world --pristine
  3. west flash --runner openocd
  4. Open PuTTy to view the output

Expected behaviour Hello World! being outputted on terminal

Impact Showstopper

Logs and console output

C:\Users\KevinT\Desktop\zephyrproject>west flash --runner openocd
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner openocd
-- runners.openocd: Flashing file: C:/Users/KevinT/Desktop/zephyrproject/build/zephyr/zephyr.hex
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.11.0-00155-ge392e485e (2021-03-15-16:44)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate

Info : clock speed 500 kHz
Info : STLINK V2J38M27 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.258153
Info : stm32wbx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32wbx.cpu on 3333
Info : Listening on port 3333 for gdb connections
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32wbx.cpu       hla_target little stm32wbx.cpu       running

Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001454 msp: 0x200008c0
Info : device idcode = 0x20016495 (STM32WB5x - Rev 2.1 : 0x2001)
Info : flash size = 1024kbytes
Info : flash mode : single-bank
Warn : Adding extra erase range, 0x080049f0 .. 0x08004fff
auto erase enabled
wrote 18928 bytes from file C:/Users/KevinT/Desktop/zephyrproject/build/zephyr/zephyr.hex in 1.141251s (16.197 KiB/s)

Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001454 msp: 0x200008c0
verified 18928 bytes in 0.681793s (27.111 KiB/s)

Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked

Environment (please complete the following information):

Additional context I have changed the openocd.cfg file to successfully flash the board.

source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32wbx.cfg]
reset_config none separate
erwango commented 2 years ago

@KevTango Thanks for reaching us, but there is not much we can do, as you mention this is working on upstream board and we have no information or way to test your custom board. Hence, I'm closing the point.