cancel
Showing results for 
Search instead for 
Did you mean: 

how to debug STM32H750 in STM32CubeIDE(xip in external qspi flash)

nine_swords
Associate

Hi all, I have a STM32H750 board that comes with an external 8MB QSPI Flash.
I've implemented the boot code (128KB Flash internally) and the Flash programming algorithm, I can download the firmware to the 0x90000000 via STM32CubeProgrammer, but I can't debug it via STM32CubeIDE.

The problem in the picture below arises.

nine_swords_0-1701396458705.png

How do I configure the debug configuration of STM32CubeIDE?

nine_swords_1-1701396563538.png

The attachment is the whole project.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @nine_swords 

Do you use H750 Disco board or a custom board? Here is an example project STM32Cube\Repository\STM32Cube_FW_H7_V1.11.1\Projects\STM32H743I-EVAL\Applications\ExtMem_CodeExecution

Also External memory code execution on STM32F7x0 Value line, STM32H750 Value line, STM32H7B0 Value line and STM32H730 Value line MCUs - Application note should be helplful.

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.

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hello @nine_swords 

Do you use H750 Disco board or a custom board? Here is an example project STM32Cube\Repository\STM32Cube_FW_H7_V1.11.1\Projects\STM32H743I-EVAL\Applications\ExtMem_CodeExecution

Also External memory code execution on STM32F7x0 Value line, STM32H750 Value line, STM32H7B0 Value line and STM32H730 Value line MCUs - Application note should be helplful.

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.

Pavel A.
Evangelist III

Hi,

Please show your boot code in the internal flash.

Note, after the boot code configures the clocks, QSPI flash and puts it in memory mapped mode, the code in the external flash should not clobber that. Not to reset the clock, as the default SystemInit does...

Run the boot code in the debugger (it can load two images at once, or load only debug symbols) and look at the XIP code before jumping there. In debug settings go to Startup tab, set the start address (vector table) to that of the boot code: 0x08000000.

 

In other systems you can use debug scripts to bring up external memories or execute code up to a certain point to allow debugger to do its role.

Perhaps ideally Cube should be able to use the External Loader Init to bring up.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..