Debugging on STM32F769NI

Hello everybody,

I was following the Wi-SUN tutorial and trying to implement a border-router on a 32F769NI Discovery Board, as suggested.

It seems that debugging capabilities for the STM32F769 target are not available yet in PyOCD (as of latest version 0.27.0):

> pyocd list --targets
[...]
stm32f439xg             STMicroelectronics      STM32F439xG                            builtin
stm32f439xi              STMicroelectronics      STM32F439xI                              builtin
stm32f767zi               STMicroelectronics      STM32F767xx                             builtin
stm32l031x6             STMicroelectronics      STM32L031x6                             builtin
stm32l475xc              STMicroelectronics      STM32L475xC                             builtin
[...]

And trying to debug from Mbed Studio (v1.0.0) results in:

Selected port 50000 for debugging
0001068:INFO:board:Target type is stm32f769ni
0001216:INFO:coresight_target:Asserting reset prior to connect
0001428:INFO:dap:DP IDR = 0x5ba02477 (v2 rev5)
0001570:INFO:ap:AHB-AP#0 IDR = 0x74770001 (AHB-AP var0 rev7)
0001759:INFO:rom_table:AHB-AP#0 Class 0x1 ROM table #0 @ 0xe00fd000 (designer=020 part=451)
0001782:INFO:rom_table:[0]
0001783:INFO:rom_table:  AHB-AP#0 Class 0x1 ROM table #1 @ 0xe00fe000 (designer=43b part=4c8)
0001790:INFO:rom_table:  [0]
0001790:INFO:rom_table:    AHB-AP#0 Class 0x1 ROM table #2 @ 0xe00ff000 (designer=43b part=4c7)
0001796:ERROR:rom_table:Error attempting to probe CoreSight component referenced by ROM table entry #0: SWD/JTAG Transfer Fault @ 0xe000efbc-0xe000f043
pyocd.core.exceptions.TransferFaultError: SWD/JTAG Transfer Fault @ 0xe000efbc-0xe000f043
0001887:INFO:rom_table:    [1]
0001889:INFO:rom_table:    [2]
0001897:INFO:rom_table:    [3]
0001900:INFO:rom_table:  [1]
0001903:INFO:rom_table:[1]
0001911:INFO:dwt:4 hardware watchpoints
0001918:INFO:fpb:8 hardware breakpoints, 1 literal comparators
0001949:CRITICAL:__main__:No cores were discovered!
pyocd.core.exceptions.DebugError: No cores were discovered!
"GDB server stopped unexpectedly with exit code 1"

I also tried to export the project in Eclipse and using OpenOCD from there, but currently without any positive result (may check again).

The ST-Link firmware embedded into the Discovery board has been updated to latest available version V2.J37.M26 by using the standalone Upgrade Utility provided by ST.

I have also enabled the dual bank mode as explained in How to enable flash dual bank - | Mbed.

I would like to know if debugging is supported on such target and if anybody else has been successful in debugging the code on such target using Mbed Studio or any other tool (e.g. Eclipse)

Many thanks for your support.
Best regards,
Giulio

For openOCD, I was using the official version without much success. Then I tried ST’s one and was able to flash the board. I’m using the same Disco as you are.

Thank you Ladislas for your suggestion.
I will give it a try and provide a feedback here.
Regards,
Giulio

Thank you Ladislas.

I also tried to upgrade On-Board ST-Link to J-Link as per https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/, but was not able do debug either.

Later I discovered that the gdb was being picked from a different folder than the cross compiler used to compile the code. After adjusting the path to the gdb executable I could properly load the code (previously I was getting dropped ‘gdb’ connection after device enumeration).

Both the openocd 0.10.0-14.3 and the one compiled from the ST repo seem to be working fine when invoked within Eclipse.

Thanks again.
Giulio