cancel
Showing results for 
Search instead for 
Did you mean: 

What's the 'proper' way to debug a RUNL application on the STM32N6?

NT
Associate II

STM32N6 Nucleo board

CubeMX V6.17.0

CubeIDE V 2.2.1

Hi,

First of all, disclaimer: I don't know the toolset or the STM32N6 very well, so I'm trying to get up to speed. There are some really good tutorials posted here which have helped me greatly, but I can't find a really good description of how to debug a FSBL_RUNL application on the N6. Given that some of the initialisation is performed by the FSBL, I wanted to download both FSBL and Appli in a single debug session, set breakpoints in both and run through FSBL into Appli. I can do it, but it currently consists of a hack:

When 'DEBUG' is defined, extern 'BOOTStatus_TypeDef JumpToApplication(void);' in my FSBL 'main()' and call it instead of 'BOOT_Application()'. It works as long as the Destination Address is set to base address 0x24000000 in CubeMX,  otherwise, the vector table address is incorrect (Not sure why the Unsecured Alias is used?) and any checks on Flash are turned off. It is a hack because 'JumpToApplication()' clearly isn't meant to be visible outside of 'stm32_boot_lrun.c' (It's not prototyped in the header, but neither is it declared 'static') and if ST changes the internals of that module it could easily break. 

So can anyone please put me straight on the recommended way to debug this configuration?

2 REPLIES 2
Ghofrane GSOURI
ST Employee

Hello @NT 

I recommend that you check the following links for guidance and inspiration:

How to debug STM32N6 using STM32CubeIDE - STMicroelectronics Community

Getting started with STM32CubeN6 for STM32N6 series - User manual

How to proceed with boot ROM on STM32N6 MCUs - User manual

THX

Ghofrane

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.

Hi @Ghofrane,

Thanks for the reply. Unfortunately, the tutorial covers XIP but not RUNL, so it's not ideal when measuring performance. The other two articles cover running and booting Apps, but there seems to be no definitive guidance on debugging RUNL Apps.

Best Regards,

Nick Tipping