Skip to main content
DHan.2
Associate
August 16, 2022
Solved

TOUCHGFX: 4.20.0: Compilation error: 'LCD1bpp' does not name a type

  • August 16, 2022
  • 4 replies
  • 2755 views

Hi there,

I am just starting touchGFX. I created a project in following steps:

  1. create IOC file.. enable touchGFX 4.20.0 , choose display as BW, 128*64, interface:custom, and generate code via STM32CubeMX for STM32CubeIDE.
  2. open .part file via touchGFX designer... choose blank templete to import.
  3. add widget: text area. Save and generate code in touchGFX designer.
  4. go back to STM32CubeIDE, open project. and refresh project.
  5. build project...

Then I got the compilation error in "../TouchGFX/target/generated/TouchGFXConfiguration.cpp:35:8: error: 'LCD1bpp' does not name a type

  35 | static LCD1bpp display;".

seems some header file is not included... so the class definition is not included... but I understand from the doc, all these generated files are not supposed to be modified... So I am asking for help: anything I did wrong here?

Thanks and Best Regards

****

This topic has been closed for replies.
Best answer by Yoann KLEIN

Are you also correctly calling this header file ?

In the include part of TouchGFXConfiguration.cpp there should be this :

" #include <platform/driver/lcd/LCD1bpp.hpp> "

/Yoann

4 replies

Yoann KLEIN
ST Employee
August 16, 2022

Hello @DHan.2​ ,

Did you try to add LCD1bpp.hpp file reference in your project ?

This file is located at Middlewares>ST>touchgfx>framework>include>platform>driver>lcd.

In STM32CubeIDE, open your project properties and go to the "Path and Symbols" tab.

Then, click the add button and browse to the folder I mentioned above.

0693W00000QNlzpQAD.png 

Please let me know if that solved your problem or not.

/Yoann

Yoann KLEINST Software Developer | TouchGFX
DHan.2
DHan.2Author
Associate
August 16, 2022

Thanks. Yoann.

I add the include path as you mentioned above... still same error.

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
August 16, 2022

Are you also correctly calling this header file ?

In the include part of TouchGFXConfiguration.cpp there should be this :

" #include <platform/driver/lcd/LCD1bpp.hpp> "

/Yoann

Yoann KLEINST Software Developer | TouchGFX