I copied a Bitmap image from SDCard to Address 0xC0000000 of External SDRAM. I want to display this image using the TouchGFX functions. As I read in this document, I have to execute this code:
static uint32_t bmpCache = (uint32_t)(0xC0000000); // SDRAM
void touchgfx_init()
{
HAL& hal = touchgfx_generic_init<STM32F7HAL>(dma, display, tc, 480, 272, (uint16_t*)bmpCache, 232000, 1);
...
}
But when I bring this code into my project (TouchGFXConfiguration.cpp) when I compile the project, I get this error:
'STM32F7HAL' was not declared in this scope
I searched for "STM32F7HAL" throughout the project but found nothing in the search results. Also, my project is implemented with STM32F779 microcontroller and STM32F779EVAL board.
You've stumbled upon an error in the documentation for TouchGFX 4.15.0.
The call to
touchgfx_generic_init
is deprecated (it was just a helper function). The functiontouchgfx_init
which is already defined for you, should make an explicit call toBitmap::registerBitmapDatabase()
. If you're using CubeMX and TouchGFX Generator, this call should've already been there.The signature of the function is as follows. The last three arguments are cache pointer, cache size, and number of dynamic bitmaps.