Getting started with TouchGFX and bringing up a board
Hi All,
I'm trying to get started with TouchGFX.
I'm currently working with a NUCLEO-L496ZG eval board connected to an NHD-2.8-240320AF-CSXP-FT (320 x 240 TFT LCD with ST7789 internal controller.)
I've successfully connected up the display via FMC and been able to display colors and images and such to the screen, just using statements like
*(__IO uint16_t *)(0x60000000) = command;
*(__IO uint16_t *)(0x60020000) = data;
to send data to the command and data registers, and everything seems to be working well.
Now I'm trying to bring in TouchGFX into the mix and I'm having a difficult time. I've read through the board bring up process, and where I think I'm having trouble is knowing which functions to modify from the generated code to integrate the ST7789 driver code I've written.
To give you an idea of what I've tried and what my setup is, here's what my TouchGFX setup looks like in the IOC:

After generating the code, I used TouchGFX designer and opened the ApplicationTemplate.touchgfx.part file and then added a simple splash bitmap to the default screen:

(I know, I could quit being an electrical engineer and draw pictures in paint for a living, right?)
I then generated code, went back to STM32CubeIDE re built with no errors.
On first debug session, nothing happened on the LCD, which makes sense since I hadn't modified any of the generated code. Based on the example here FMC and SPI Display Interface | TouchGFX Documentation I realized I was probably supposed to modify flushFrameBuffer in the TouchGFXHAL.cpp file, so I did so like this:
void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect)
{
// Set Cursor
TFT_setAddress_WidthHeight(rect.x, rect.y, rect.width, rect.height);
TFT_flushFrameBuffer(frameBuffer0);
}
That didn't make any difference, and I noticed that setting a breakpoint within this function, the flushFrameBuffer function doesn't seemed to get called anyways, and it was at this point that I realized there is too much I don't know/ don't understand. I don't even know of "frameBuffer0" points to the frame buffer I created in the TouchGFX part of the IOC file. According to a note in there, the framebuffer is supposed to be called "framebuf" but the compiler doesn't recognize that.
I realize that I'm missing a big chunk of knowledge here, so please forgive my ignorance. Could someone point me in the right direction?
