cancel
Showing results for 
Search instead for 
Did you mean: 

N657X0-Q cannot be debugged and my pitfalls are recorded

DHS729
Visitor

Development tools:
windows; VScode; CubeIDE for VScode Extension; STM32CubeMX; STM32CubeProgrammer


After three days of torment, I finally managed to download it, in LRUN mode.

But debugging still doesn't work in VScode. I don't know if LRUN mode requires the same tedious CMakeLists and Launch.json configuration as XIP mode.

However, all the various debugging attempts I've tried in VScode (except once with SRAM) show:

Temporary breakpoint 1 at 0x34001612: file C:/APPS/COPRO/MCU/CUBEMX/N6_MX/Template_FSBL_LRUN/Appli/Src/main.c, line 71.
load "c:/APPS/COPRO/MCU/CUBEMX/N6_MX/Template_FSBL_LRUN/Appli/build/Template_FSBL_LRUN_Appli.elf" 
Loading section .isr_vector, size 0x34c lma 0x34000400
Loading section .text, size 0x1264 lma 0x3400074c
Loading section .init_array, size 0x4 lma 0x340019b0
Loading section .fini_array, size 0x4 lma 0x340019b4
Loading section .gnu.sgstubs, size 0x20 lma 0x340019c0
Loading section .data, size 0x20 lma 0x340019e0
Start address 0x340018f0, load size 5624
Transfer rate: 549 KB/sec, 937 bytes/write.
set *(int *)0xE000ED14=*(int *)0xE000ED14|0x10
set *(int *)0xE000EDFC=*(int *)0xE000EDFC|0xff0
set *(unsigned int *)0x44001004|=0x100000
set *(unsigned int *)0x44001004|=0x7
set *(unsigned int *)0x44001010|=0x800
set *(unsigned int *)0x4400101c|=0x40000

In the Debug Console view you can interact directly with GDB.
To display the value of an expression, type that expression which can reference
variables that are in scope. For example type '2 + 3' or the name of a variable.
Arbitrary commands can be sent to GDB by prefixing the input with a '>',
for example type '>show version' or '>help'.


Temporary breakpoint 1, main () at C:/APPS/COPRO/MCU/CUBEMX/N6_MX/Template_FSBL_LRUN/Appli/Src/main.c:71
71	  SystemCoreClockUpdate();
16
Target is not responding, retrying...
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
cube is killed by signal SIGTERMgdbserver stopped

And in the bottom right corner it shows Unable to read memory

I still don't fully understand the boot process. I need to study this more.

Also, due to the lack of internal flash, do I need to configure XSPI to use external flash every time I configure?

 

 

 

Thanks to the ST forum posts
Reference posts and PDFs:
https://community.st.com/t5/stm32-mcus/how-to-create-an-stm32n6-fsbl-load-and-run/ta-p/768206 
https://community.st.com/t5/stm32cubeide-mcus/nucleo-n657x0-q-unable-to-upload-code/m-p/876582 

https://community.st.com/t5/stm32cubeide-mcus/debugging-program-in-external-flash-xip-mode-stm32n6/m-p/794285 

https://community.st.com/t5/stm32-mcus/how-to-debug-stm32n6-using-stm32cubeide/tac-p/898644#M2012 

https://community.st.com/t5/stm32-mcus/how-to-execute-code-from-the-external-serial-nor-using-the/ta-p/771048 
https://community.st.com/t5/stm32-mcus/how-to-build-an-ai-application-from-scratch-on-the-nucleo-n657x0/ta-p/828502 

https://community.st.com/t5/stm32-mcus-embedded-software/stm32n6570-dk-lrun-project-does-not-boot/m-p/874078 

https://community.st.com/t5/stm32-mcus/how-to-build-an-ai-application-from-scratch-on-the-stm32n6570-dk/ta-p/825591 

 

 

pdf:

rm0486-stm32n647657xx-armbased-32bit-mcus-stmicroelectronics

um3234-how-to-proceed-with-boot-rom-on-stm32n6-mcus-stmicroelectronics

nucleo-n657x0-q

um3417-stm32n6-nucleo144-board-mb1940-stmicroelectronics

en.mb1940-n657x0q-c02-schematic

rm0486-stm32n6x5x7xx-armbased-32bit-mcus-stmicroelectronics

an6265-getting-started-with-stm32n6-mcus-in-stm32cubeide-stmicroelectronics

pm0273-stm32-cortexm55-mcus-programming-manual-stmicroelectronics

um3249-getting-started-with-stm32cuben6-for-stm32n6-series-stmicroelectronics

an5967-getting-started-with-hardware-development-for-stm32n6-mcus-stmicroelectronics

 

Special thanks to B.Montanari, ChatGPT, MiniMax   haha

How can one become a master?
0 REPLIES 0
Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.