cancel
Showing results for 
Search instead for 
Did you mean: 

No debug Zephyr debug runner for STM32N6570-DK

stuart_rubin_ns
Associate II

I am doing development for the STM32N6570-DK board in Zephyr. I can build a simply "blinky" project:

$ west build -p always -b stm32n6570_dk ./applications/blinky

And can flash the device:

$ west flash

But when I try to debug:

$ west debugserver

I get this error:

FATAL ERROR: no debugserver runner available for board stm32n6570_dk/stm32n657xx. Check the board's documentation for instructions.

I have tried several variations of specifying the runner, but get an error each time, i.e.:

$ west debugserver --runner jlink

FATAL ERROR: board stm32n6570_dk/stm32n657xx does not support runner jlink
To fix, configure this runner in /home/stuart/ns-iot-dev-platform/zephyr/boards/st/stm32n6570_dk/board.cmake and rebuild.

or

$ west debug --runner openocd

$ west debugserver --runner stlink_gdbserver

etc.

I am running Zephyr v4.1.1.

Can someone please confirm that this chip is supported? Anyone tried to debug with Zephyr? Am I doing something wrong?

Thank you!

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
stuart_rubin_ns
Associate II

The key was to update to the latest Zephyr and tools. Nothing else really changed. At this point:

$ west debugserver

starts up and I can run GDB through Code with this launch.json configuration:

 
        {
            "cwd": "${workspaceFolder}",
            "executable": "./build/zephyr/zephyr.elf",
            "name": "Debug with ST-Link",
            "request": "launch",
            "type": "cortex-debug",
            "runToEntryPoint": "main",
            "gdbTarget": "127.0.0.1:61234",
            "showDevDebugOutput": "raw",
            "servertype": "external",
            "preLaunchCommands": [],
            "postRestartCommands": [],
            "overrideLaunchCommands": [],
        },
 
This is in WSL.

Thank you

View solution in original post

5 REPLIES 5
Sarra.S
ST Employee

Hello @stuart_rubin_ns

Yes, you can debug an application the usual way using STM32N6

To enable debugging, before powering on the board, set the boot pins in the following configuration:

  • BOOT0: 0

  • BOOT1: 1

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.

Another solution for debugging is to use STM32CubeIDE:

  • Go to File ‣ Import and select C/C++ ‣ STM32 Cortex-M Executable

  • In the Executable field, browse to your <ZEPHYR_PATH>/build/zephyr/zephyr.elf

  • In MCU field, select STM32N657X0HxQ

  • Click on Finish.

  • Finally, click on Debug to start the debugging session.

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.

stuart_rubin_ns
Associate II

I am trying to use the command line Zephyr tools, not the STM32CubeIDE.This has nothing to do with the boot mode switches.

The issue is that there is no "runner" for debugging on this chip. I suspect that this is an omission or bug in the device's details in Zephyr, presumably provided by ST into the mainline Zephyr repository.

Thank you for looking into this.

 

0) cd C:\zephyrproject\zephyr;
git pull;
west update;
Also make sure you have latest CubeProgrammer (2.20) installed.

1) Install STM32CubeCLT:
https://www.st.com/en/development-tools/stm32cubeclt.html

2) Restart the Command prompt window (new session and cd to zephyr folder)

3) You also might want to add the following to the prj.conf file of hello world example:

CONFIG_DEBUG=y
CONFIG_DEBUG_OPTIMIZATIONS=y

4) west build -p auto -b stm32n6570_dk//fsbl samples/hello_world

5) C:\zephyrproject\zephyr>west debug

-- west debug: rebuilding
ninja: no work to do.
-- west debug: using runner stlink_gdbserver


STMicroelectronics ST-LINK GDB server. Version 7.10.0
Copyright (c) 2025, STMicroelectronics. All rights reserved.

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
G N U g d b L(iZsteepnh Pyorr t SNDuKm be0r. 1 6 . 8 ) :1 261.2134

C o p y r i g hStt at(uCs )R e2fre0sh2 2D eFlraeye S o f t w: a1r5se
F o u n d a tVeirobnos,e MIondec .
L i c e n s e G P: LDvi3s+ab:l eGd
N U G P L SvWeDr Dseibuogn 3 o r l a t e r <: hEntabtlepd:
/ / g n u . o rIgn/iltiWcheinlsee s / g p l . h t m l >
T h i:s Einsa bflreede

software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi".
Type "show configuration" for coWnaiting for debugger connection...
figuration details.
For bug reporting instructions, please see:
<https://github.com/zephyrproject-rtos/sdk-ng/issues>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from C:/zephyrproject/zephyr/build/zephyr/zephyr.elf...
RDeebugger connectedm
otWeaiting for debugger connection...
debugging using :61234
0x18003a1a in ?? ()
Loading section rom_start, size 0x348 lma 0x34180400
Loading section text, size 0x5580 lma 0x34180748
Loading section initlevel, size 0x60 lma 0x34185cc8
Loading section device_area, size 0x280 lma 0x34185d28

Loading section service_area, size 0x10 lma 0x34185fa8

Loading section sw_isr_table, size 0x610 lma 0x34185fb8

Loading section gpio_driver_api_area, size 0x24 lma 0x341865c8

Loading section reset_driver_api_area, size 0x10 lma 0x341865ec

Loading section clock_control_driver_api_area, size 0x1c lma 0x341865fc

Loading section uart_driver_api_area, size 0x14 lma 0x34186618

Loading section rodata, size 0x4a4 lma 0x3418662c --Type <RET> for more, q to quit, c to continue without paging--

Loading section datas, size 0x68 lma 0x34186ae0

Loading section device_states, size 0x28 lma 0x34186b48

Loading section .last_section, size 0x4 lma 0x34186b70 Start address 0x34181184, load size 26468 Transfer rate: 1 KB/sec, 1764 bytes/write.

(gdb) b main

Breakpoint 1 at 0x34180c46: file C:/zephyrproject/zephyr/samples/hello_world/src/main.c, line 11.

(gdb) c

Continuing.

Breakpoint 1, main () at C:/zephyrproject/zephyr/samples/hello_world/src/main.c:11

11                            printf("Hello World! %s\n", CONFIG_BOARD_TARGET);

(gdb) start

The "remote" target does not support "run". Try "help target" or "continue".



stuart_rubin_ns
Associate II

The key was to update to the latest Zephyr and tools. Nothing else really changed. At this point:

$ west debugserver

starts up and I can run GDB through Code with this launch.json configuration:

 
        {
            "cwd": "${workspaceFolder}",
            "executable": "./build/zephyr/zephyr.elf",
            "name": "Debug with ST-Link",
            "request": "launch",
            "type": "cortex-debug",
            "runToEntryPoint": "main",
            "gdbTarget": "127.0.0.1:61234",
            "showDevDebugOutput": "raw",
            "servertype": "external",
            "preLaunchCommands": [],
            "postRestartCommands": [],
            "overrideLaunchCommands": [],
        },
 
This is in WSL.

Thank you