2024-12-24 12:16 PM
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.
Solved! Go to Solution.
2024-12-28 01:44 AM
Hello @tjaekel
Yes STM32N6 only works with:
STM32CubeProgrammer V2.18.0
STM32CubeMX V6.13.0
STM32CubeIDE V1.17.0
The corresponding firmware package is STM32Cube_FW_N6_V1.0.0
For firmware development, I can also suggest to refer to UM3249:
Let me answer to your questions:
The image has to be signed, e.g. via:
STM32_SigningTool_CLI.exe -bin Appli_FW.bin -nk -of 0x80000000 -t fsbl -o Appli_FW-trusted.bin -hv 2.3 -dump Appli_FW-trusted.bin
What is this of 0x80000000? The external flash starts at 0x70000000. Does it mean, the code image at 0x80000000 and it is concatinated with the bootloader header at 0x70000000?
Let check our STM32 Signing Tool Wiki page:
STM32 SigningTool - stm32mcu
0x80000000 is not an address, it's preceded by -of meaning option flag for the binary image.
It requires to build the MCU FW as Appli:
Have a sub-project *_Appli and build this one.
But which Linker Script to use?
The STM32N657X0HXQ_LRUN.ld seems to build in the same way to load (via debugger) and execute from internal SRAM (loading and debugging with ST-LINK, with the BOOT1 changed, works as before, with the FSBL file generated, intended to be loaded and for debug when loaded and executed on internal SRAM)
In complement to my explanations here: LRUN application are linked and executed as below:
I tried to flash this file (after signing) - but power on does not executed my code:
a) We have to use STM32CubeProgrammer
b) We have to activate the external bootloader (for this board!)
c) OK: I can erase entire chip (necessary to do manually?!)
d) I can flash the signed image
There are 3 possible reasons why the code does not execute after flashing to external memory:
1. The STM32N6 device is not in Flash_BOOT properly (BOOT0=0 and BOOT1=0)
2. The FSBL binaries is not signed, or the applied header is not matching with the AXISRAM2 address 0x34180000 + header 0x400
3. The FSBL binary is not programmed into the external Flash memory, this step must be always do when the STM32N6 device is in DEV_BOOT.
Could you check, share the log when you perform STM32_SigningTool.exe?
Same when you programmed the external NOR Flash, have you used the external loader compatible with your memory?
After reading external memory at 0x70000000, what do you read?
Best regards,
Romain
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.