Skip to main content
Explorer II
December 24, 2024
Solved

NUCLEO-N657X0-Q: failed to start GDB server

  • December 24, 2024
  • 5 replies
  • 8165 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.

    This topic has been closed for replies.
    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

    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

    cersoyAuthor
    Explorer II
    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.

    Technical Moderator
    December 25, 2024

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

    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.


     

    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.

    ST Employee
    April 25, 2025

    Hello @HANITALY 

    I just checked to program the secure signed binaries attached in your Template_FSBL_LRUN.zip

    • Template_FSBL_LRUN\STM32CubeIDE\Boot\Debug\Template_LRUN_FSBL-trusted.bin @0x7000 0000
    • Template_FSBL_LRUN\STM32CubeIDE\AppS\Debug\Template_LRUN_AppS-trusted.bin @0x7010 0000

    I used STM32CubeProgrammer 2.19.0 and program  at the address indicated previously here.

    On my NUCLEO-N657X0-Q, I confirm the Green Led blinking. No issue on my side.

    Could you send a picture of your board and showing all black jumper settings?

    Best Regards,

    Romain, 

     

     

     

    ST Employee
    April 25, 2025

    @HANITALY 

    Before trying again on your side, could you check the sequence below:

    1. Set STM32N6 in DEV_BOOT using JP2.
    2. Erase the external serial flash using the STM32_Programmer_CLI.exe. 
      Make sure STM32CubeProgrammer is in your PATH environment variables and accessible in cmd terminal.
      Open a cmd and run the following command (Windows OS)
      STM32_Programmer_CLI.exe -c port=SWD ap=1 -el C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader\MX25UM51245G_STM32N6570-NUCLEO.stldr -e [0 20] 
    3. Try to program again FSBL and AppS trusted binaries.
    4. Check in Flash Boot

    Best regards,

    Romain,

     

     

    Graduate
    April 25, 2025

    @RomainR.  

     

    Thank you very much for your response!

    Yes, I tried again under your instructions, but it ended up with the same result.

    I would like to share with you what I did step by step.

     

    1. Picture 'Board 1' is the condition before the ST-link connection under DV_Model.
    2. After the ST-Link connection. The LD9 light(right top) blinks between green and red after ST-Link connection.
    3. From the Picture 'APPLI and FSBL Programme', you can see that I have successfully programmed them into the corresponding addresses. Meanwhile, the LD2 turned off from the red light after the programming.
    4. In the end, I set the Boot1(JP2) back to 0, after pressing reset button and repower , the board still looks like Picture ' Board 3', without LED blinking.
    5. From the Picture 'Result' ,  I am still not able to connect with the Board under Flash Boot.

     

    Since you have confirmed it worked on board, I assume I might have done something wrong that I did not notice.

     

    Thank you for your time and commitment!

    Best Regards

    Han

     

     

     

     

     

     

    Explorer
    July 11, 2025

    I guess I did, indeed. Sorry for the inconvenience

    Regards
    Jerem

    Explorer
    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?