I use Cubemx to generate an LCD+SDRAM+STemwin project and run it on my STM32F429II board. In this project, when the code run into GUI_CreateDialogBox(), it jumps to HardFault_Handler() automatically. I read the stack and find the caller of HardFault_Handler() is _RemoveHoles() from GUI_Alloc. I repeated this several times and every time the caller is the same.
To debug this issue I have done following steps but can't solve the problem.
To debug this issue I have done following steps but can't solve the problem.
- set the stack and heap size to 0xf000(very large)
- verify SDRAM driver by copying image data into SDRAM in this project with my code, the correct image can be seen.
- trace the line where HardFault_Handler is triggered