Skip to main content
Visitor II
June 3, 2025
Question

STM32N6: Debugging Issues with External Flash and RAM Debug in FSB & App

  • June 3, 2025
  • 1 reply
  • 661 views

Hello,

We are using the STM32N6 series MCU in our project and encountering issues during debugging. I’ve attached a screenshot of the error message we are seeing.

Clyasenth_0-1748957776729.png

We followed the steps outlined in this guide:
https://community.st.com/t5/stm32-mcus/how-to-debug-stm32n6-using-stm32cubeide/ta-p/800547

However, the code cannot be debugged from external flash (in dev boot mode).

But, when we boot from flash (flash boot) and the debugger is not connected, the code runs as expected.

Also, debugging from RAM with FSB works, but debugging the App code from RAM fails and gives the same error.

Based on the information in this page:
https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Category:Security_with_STM32N6,
could this issue be related to the STM32N6's debug security features?

Best regards,

Egemen Aksoy

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 5, 2025

    Hi @Clyasenth 

    Are you able to debug in DEV_BOOT the example already available, such as
    STM32Cube_FW_N6_V1.1.1\Projects\STM32N6570-DK\Templates\Template_FSBL_XIP ?

    I probably need more details.
    Can you specify:

    • Your type of hardware: Custom, STM32N6570-DK, or NUCLEO-N657X0-Q?
    • Are you using STM32CubeIDE? Is it the latest version 1.18.x?

    I understand that you lose connection with the debugger only in the App code in DEV_BOOT.

    In the debugger configuration and as explained in the Knowledge Article, have you added the FSBL.elf and Appli.elf files to the Startup of your App's Debug Configuration?
    In DEV_BOOT, after compiling and signing the binaries, and programming them into the external memory, the debug must be launched on the App project with the following Startup settings:

    RomainR_0-1749126694829.png


    Often, the hang issue and the appearance of the STLink GDB Server message "Target is not responding, retrying" that you encounter occur when:

    1. Your code tries to access an AXI or AHB memory or a peripheral of the STM32N6 that is either not powered or not clocked.
    2. You try to read the content of external memory using the Memory or Memory Browser windows integrated into the debugger. Currently, this does not work very well with external memories such as addresses 0X70000000 and 0x90000000 (XSPI).
      However, you can use memory rendering for internal I/DTCM, SRAM1, and SRAM2 (and also SRAM3 to SRAM6, provided they are properly powered and clocked beforehand).
    3. Does your code make changes to the Clock in the RCC, and does it manipulate a peripheral that does not have a valid input clock?

    Let me know if it helps you?

    Best regards,

    Romain,

    ClyasenthAuthor
    Visitor II
    June 16, 2025

    Hello @RomainR. 

    We are using custom hardware.

    Yes we are using STM32CubeIDE and it is the last version of the IDE.

    Clyasenth_0-1750059959248.pngClyasenth_1-1750059986876.pngClyasenth_2-1750060002806.png

    I’m configuring the settings as shown in the image, but I’m encountering an error. The application runs when booting from flash, but I’m unable to debug the application code.

    Best regards,

    Egemen Aksoy