cancel
Showing results for 
Search instead for 
Did you mean: 

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

DHan.2
Associate II

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

****

1 ACCEPTED SOLUTION

Accepted Solutions

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 KLEIN
ST Software Developer | TouchGFX

View solution in original post

4 REPLIES 4
Yoann KLEIN
ST Employee

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 KLEIN
ST Software Developer | TouchGFX

Thanks. Yoann.

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

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 KLEIN
ST Software Developer | TouchGFX

Thanks. Yoann.... After adding this include... compilation works now...

issue solved.

Best Regards