HardFault in MX_TouchGFX_Init()
I try to make a TouchFGX demo for a self designed STM32F750 board.
The board hardware is verified, it works with my "hand made" simple test image graphics. The board does not have any kind of touch input, but some hardware-buttons.
And the memory layout is a bit special.
There is the internal FLASH and SRAM of the STM32F750 extended by 32 MB SDRAM and 32MB SPI flash. In the internal STM32 FLASH a bootloader exists that provides the QSPI as a USB-Memory to an USB attached PC and can use it as a read-only FATFS for itself as well.
At startup the bootloader looks for the application file in FATFS, verifies it and copies it to internal SRAM for execution. The SDRAM is for frame buffer, constants, variables and heap. The QSPI FLASH can be used by application to load assets.
This mechanism allows very easy firmware updates by just drag-and drop the firmware application in the PC's file explorer. The mechanism is fully verified and operating well with other firmware applications.
Now I set-up a TouchGFX project for STM32CubeIDE using STM32CubeMX and TouchGFX Designer as described step-by-step in the online documentation (https://support.touchgfx.com/docs/development/touchgfx-hal-development/touchgfx-al-development-introduction).
This application uses FreeRTOS and all tools and packages are updated to the latest available versions.
But the TouchGFX application fails immediately at startup whith a hardfault within the MX_TouchGFX_Init() function. The debugger is of not much help here, because the fault happens in a pre-compiled part of the TouchGFX library:


Any hints or ideas where to look for a solution of this are more than welcome.
EDIT: Additional Infos:
The bootloader copied the entire application and all of its sections from QSPI FLASH to SDRAM. To overcome some memory bandwidth limitations, the startup code of the application copies most sectors to internal SRAM. The sectors copied are:
text
arm_extab
_exidx
_preinit_array
_init_array
_fini_array
The linker file is made such that the different load and execution addresses are handled correctly.
Maybe I did miss a section here?
Regards
Thomas
