Skip to main content
Associate
December 24, 2024
Solved

NUCLEO-N657X0-Q: failed to start GDB server

  • December 24, 2024
  • 5 replies
  • 15534 views

I am trying to start a debugger session to my new NUCLEO-N657X0-Q and getting the following error:

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

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled

Target unknown error 32

Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.

 I am using the latest version of STM32CubeIDE (1.17.0)

The STM32CubeProgrammer (v2.18.0) is also unable to program any binaries on the board.  After changing the Reset Mode to "Hardware reset" I am able to connect to the board, but immediately get the error message: 

15:09:28:207 : UR connection mode is defined with the HWrst reset mode
15:09:28:364 : ST-LINK SN : 002F00453433511830343835
15:09:28:365 : ST-LINK FW : V3J15M7
15:09:28:365 : Board : NUCLEO-N657X0-Q
15:09:28:365 : Voltage : 3.27V
15:09:28:365 : SWD freq : 8000 KHz
15:09:28:365 : Connect mode: Normal
15:09:28:365 : Reset mode : Hardware reset
15:09:28:365 : Device ID : 0x486
15:09:28:365 : Revision ID : Rev A
15:09:28:365 : reset ap 1
15:09:28:365 : Reading data...
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : Database: Config 0 is active.
15:09:28:461 : UPLOADING ...
15:09:28:461 : Size : 1024 Bytes
15:09:28:461 : Address : 0x8000000
15:09:28:462 : Read progress:
15:09:28:462 : Reading data...
15:09:28:462 : r ap 1 @0x08000000 0x00000400 bytes Data 0x00000018
15:09:28:541 : r ap 1 @0x08000000 0x00000400 bytes Data 0x00000011
15:09:28:541 : Error: Data read failed

 Unfortunately link to user manual UM3417, which is https://www.st.com/resource/en/user_manual/dm01122391.pdf (per STM32 Nucleo-144 boards data brief) is currently unavailable.  

I don't understand what I am doing wrong from the error messages, and can't access the user manual.  I would appreciate if someone can shed light on the issue I am seeing.

Best answer by RomainR.

Hello @cersoy 

First of all, all STM32N6 (SoC) documentation is available here:
https://www.st.com/en/microcontrollers-microprocessors/stm32n6-series/documentation.html

For the Nucleo-N657X0Q board, the documents are linked below:
https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html#documentation

Could you confirm the revision of your Nucleo board indicates on the bottom stickers, something like:
MB1940-N657X0Q-C01

The STM32N6 has no internal flash, so the 0x08000 000 memory area you're trying to read with STM32CubeProgrammer corresponds to the secure BootROM area. Do not attempt to erase the internal flash.

By default (Flash boot), when BOOT1 = 0 and BOOT0 = 0, after reset, the BOOTRom will copy a binary firmware from external Flash memory into internal SRAM2 to finally booting and executing it in SRAM2. 

If you try one of the examples provided in the STM32Cube_N6_V1.0.0 package, note that most of examples are linked and loaded in internal SRAM2. You should be able to debug them with STM32CubeIDE_V1.17.0 by configuring the STM32N6570 in Dev_Boot mode (see chapter 9 Boot modes in RM0486).
The following jumper settings must be as in the attached pdf file.
BOOT0 JP2 = 1
BOOT1 JP1 = 0
The Dev_Boot has been designed to open the STM32N6 debug port to external tools for debugging applications and programming/erasing internal or external memory and also to fuse OTP bits (see RM0486 section 5 OTP mapping).

In the STM32CubeProgrammer, to access the OCTOSpi external Flash memory, you'll need to select the MX25UM51245G_STM32N6570-NUCLEO external loader.
Following the Readme.html of the STM32Cube_FW_N6_V1.0.0\Projects\NUCLEO-N6570X0Q\Templates\Template_FSBL_LRUN example, the Readme.html file explains how to sign and permanently program the binary in this memory and execute it in Flash_Boot mode.

Let me know if it helps you. after confirming your configuration in Dev_Boot and if you are facing with some issue?

Best regards,

Romain,

5 replies

Amel NASRI
Technical Moderator
December 25, 2024

Hi @cersoy ,

Try to perform an STLink upgrade from STM32CubeProgrammer.

Regarding the user manual, it should be this one: Data brief - NUCLEO‑xxxxLx/xxxxXx/xxxxZx(-P/Q).

Where do you find the wrong link? Please let me know to fix it.

-Amel

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.
cersoyAuthor
Associate
December 25, 2024

Thank you Amel for your prompt response.  On page 6 of the document you pointed out, there is a link to the user manual of this specific board:

Screenshot 2024-12-25 085156.png

link to UM3417 does not work.

I upgraded the STlink from the STprogrammer per your recommendation.  Below are the snippets:
Screenshot 2024-12-25 085552.png

But still no success accessing the board:
Screenshot 2024-12-25 085653.png

Are there any diagnostics I can collect to troubleshoot the problem.  Thanks again for your help.

Amel NASRI
Technical Moderator
December 25, 2024

What about a full erase of the chip? does it work?

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.
Amel NASRI
Technical Moderator
January 6, 2025

@cersoy wrote:

I am trying to start a debugger session to my new NUCLEO-N657X0-Q and getting the following error:

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

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled

Target unknown error 32

Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.

 I am using the latest version of STM32CubeIDE (1.17.0)

The STM32CubeProgrammer (v2.18.0) is also unable to program any binaries on the board.  After changing the Reset Mode to "Hardware reset" I am able to connect to the board, but immediately get the error message: 

15:09:28:207 : UR connection mode is defined with the HWrst reset mode
15:09:28:364 : ST-LINK SN : 002F00453433511830343835
15:09:28:365 : ST-LINK FW : V3J15M7
15:09:28:365 : Board : NUCLEO-N657X0-Q
15:09:28:365 : Voltage : 3.27V
15:09:28:365 : SWD freq : 8000 KHz
15:09:28:365 : Connect mode: Normal
15:09:28:365 : Reset mode : Hardware reset
15:09:28:365 : Device ID : 0x486
15:09:28:365 : Revision ID : Rev A
15:09:28:365 : reset ap 1
15:09:28:365 : Reading data...
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : r ap 1 @0x00000000 0x00000004 bytes Data 0x00000018
15:09:28:365 : Database: Config 0 is active.
15:09:28:461 : UPLOADING ...
1Unfortunately link to user manual UM3417, which is https://www.st.com/resource/en/user_manual/dm01122391.pdf (per STM32 Nucleo-144 boards data brief) is currently unavailable.  

I don't understand what I am doing wrong from the error messages, and can't access the user manual.  I would appreciate if someone can shed light on the issue I am seeing.


 

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.
Amel NASRI
Technical Moderator
January 6, 2025

@cersoy wrote:

Unfortunately link to user manual UM3417, which is https://www.st.com/resource/en/user_manual/dm01122391.pdf (per STM32 Nucleo-144 boards data brief) is currently unavailable.  

Please note that the UM3417 is currently available.

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.
Explorer
July 11, 2025

I guess I did, indeed. Sorry for the inconvenience

Regards
Jerem

R.uy
Associate
August 18, 2025

Hello,

I am having a similar issue when trying to load my binary in the external flash. After I change the jumper to boot from flash it does not work. I checked the OTP values and got the following:

OTP11 = 0x00000000

OTP124 = 0x00000000

I am using the Nucleo N657X0-Q

Whats the state of this fuses when the nucleo is shipped?

For OTP124 I am a bit confused whether it should be 0x00018000 or 0x00008000

Bit 15(VDDIO3)

Bit 16(VDDIO2)

The VDDIO3 is the one that supplies the Octospi Ios and it is already wired to 1.8 V in the Nucleo board, is the OTP configuration mandatory to be able to write the external flash?