Skip to main content
Tiel
Associate III
September 29, 2021
Question

How to to apply TouchGfx lib to stm32f446ve using spi-lcd(320x170, st7789v drvier)?

  • September 29, 2021
  • 3 replies
  • 1050 views

Dear all,

I want to apply touch-gfx gui library on our own board using stm32f446ve and spi-lcd(with st7789v driver ic, 320x170).

Today I tried to generate code through CubeMX(plz refer to the attached picture), but I could not generate without error on CubeMX. Anyway I generated sample codes ignoring errors and tried to compile codes, there were errors. Could someone guide me about how to set up gfx lib on my stm32f446ve-board using spi-lcd?

Best Regards,

Tommy Lim

This topic has been closed for replies.

3 replies

Romain DIELEMAN
ST Employee
September 30, 2021

Hi,

As you can see in the purple warning, it is mandatory to enable CRC in order to work with TouchGFX. You can set it by going to the "Computing" tab in STM32CubeMX.

/Romain

Tiel
TielAuthor
Associate III
October 1, 2021

Hi,

Thank you for kind answer.

After selecting&activating CRC option, I generated source code and then clicked "ApplicationTemplate.touchgfx.part " file in TouchGFx folder of generated source codes.

It opened Touch GFx designder(4.17.0), I selected UI example and then clicked generated code on the right bottom side of designer tool.

I tried to build source codes using IAR IDE and fixed some path errors. finally I have one error as below.

....

TouchGFXHAL.cpp 

Fatal Error[Pe035]: #error directive: "A user must call touchgfx::startNewTransfer(); once touchgfxDisplayDriverTransmitBlock() has succesfully sent a block." D:\work\446ve_Tgfxt_est\TouchGFX\target\TouchGFXHAL.cpp 35

1 error!

Do you happen to know what cause this symptom?

Best Regards,

Tommy Lim

Romain DIELEMAN
ST Employee
October 1, 2021

Hi,

Have you modified the TouchGFXHAL.cpp file ? I am wondering if the code generated is enough to make it work or if you need to add some extra configuration. Create a project from TouchGFX Designer with the TBS for the STM32G0 nucleo board. It also uses the partial framebuffer strategy, so you can use it as source of inspiration and see what extra configuration has been made.

/Romain