Description
I’m trying to port LVGL on STM32H743 to use Round RGB666 LCD 480x480 pixel. I’ve bought a board from WeACT Studio. Card runs good, LTDC configured and a test framebuffer runs. I can picture 480x480 RGB565 images from Flash to the screen. All the codes ported from arduino examples of LCD. I use AdaFruit’s RGB666 480x480 2.1 Round LCD Round RGB 666 TTL TFT Display - 2.1 480x480 - Capacitive Touch [TL021WVC02CT-B1323] : ID 5792 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits
My problem is now this. I’ll use this LCD to make a smartGauges to my CAR. I’ve the code for my ESP32. But It is slow as hell. I want to upgrade it to STM32. I’ve read the instructions. All the time time I have lots of lots of errors that I could not understand why. I’ve watch Youtube videos. All seems correct but they don’t have any errors on their videos, but I have tons of them. Please I need help.
What MCU/Processor/Board and compiler are you using?
I’m using WeACT Studio STM32H743VIT6 miniBoard. I don’t have SDRAM or EXTERNAL stuff.
I could use External QSPI 8MB FLASH and SD-Card interface soon after I could run the LVGL.
What do you want to achieve?
I want to use LVGL on my project. I don’t have so much ram space I have only one full frame buffer.
What have you tried so far?
- I’ve download the master LVGL code from GITHUB.
- I’ve install it to my Project directory.
- I took the lv_conf_template.h file to main directory and rename it to lv_conf.h
- I’ve set the #if 1
/* clang-format off */
#if 1 /Set it to “1” to enable content/
- I’ve included the necessary headers to my main.c
#include “…/…/lvgl/lvgl.h”
#include “…/…/lvgl/examples/lv_examples.h”
- I’ve added LVGL folder to PATH
- I’ve added the display parameters
static lv_disp_drv_t disp_drv;
static lv_color_t disp_buf1[DISP_HOR_RES * 10];
static lv_color_t disp_buf2[DISP_HOR_RES * 10];
- I’ve combine my LCD_INIT with Display_init sub.
void Display_init(int rotation)
{
static lv_disp_draw_buf_t buf;
lv_disp_draw_buf_init(&buf, disp_buf1, disp_buf2, DISP_HOR_RES * 10);
lv_disp_drv_init(&disp_drv);
LCD_init(); // My code for 9 bit SPI init parameters
FillFramebuffer(0x0000); // My code for full black fill of framebuffer
disp_drv.draw_buf = &buf;
disp_drv.flush_cb = tft_flush;
disp_drv.monitor_cb = monitor_cb;
disp_drv.hor_res = DISP_HOR_RES;
disp_drv.ver_res = DISP_VER_RES;
disp_drv.rotated = rotation;
lv_disp_drv_register(&disp_drv);
}
even it is not full finished. I wanted to compile the code and I started to get errors
Errors are like this.
…/Core/Src/main.c:90:8: error: unknown type name ‘lv_disp_drv_t’
90 | static lv_disp_drv_t disp_drv;
| ^~~~~~~~~~~~~
…/Core/Src/main.c:97:17: error: unknown type name ‘lv_disp_drv_t’; did you mean ‘lv_fs_drv_t’?
97 | void monitor_cb(lv_disp_drv_t * d, uint32_t t, uint32_t p)
| ^~~~~~~~~~~~~
| lv_fs_drv_t
…/Core/Src/main.c:102:23: error: unknown type name ‘lv_disp_drv_t’; did you mean ‘lv_fs_drv_t’?
102 | static void tft_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p);
| ^~~~~~~~~~~~~
| lv_fs_drv_t
…/Core/Src/main.c:155:23: error: unknown type name ‘lv_disp_drv_t’; did you mean ‘lv_fs_drv_t’?
155 | static void tft_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p)
| ^~~~~~~~~~~~~
| lv_fs_drv_t
…/Core/Src/main.c: In function ‘Display_init’:
…/Core/Src/main.c:275:16: error: unknown type name ‘lv_disp_draw_buf_t’
275 | static lv_disp_draw_buf_t buf;
| ^~~~~~~~~~~~~~~~~~
…/Core/Src/main.c:277:9: warning: implicit declaration of function ‘lv_disp_draw_buf_init’; did you mean ‘lv_draw_buf_init’? [-Wimplicit-function-declaration]
277 | lv_disp_draw_buf_init(&buf, disp_buf1, disp_buf2, DISP_HOR_RES * 10);
| ^~~~~~~~~~~~~~~~~~~~~
| lv_draw_buf_init
…/Core/Src/main.c:279:9: warning: implicit declaration of function ‘lv_disp_drv_init’; did you mean ‘lv_fs_drv_init’? [-Wimplicit-function-declaration]
279 | lv_disp_drv_init(&disp_drv);
| ^~~~~~~~~~~~~~~~
| lv_fs_drv_init
…/Core/Src/main.c:286:17: error: request for member ‘draw_buf’ in something not a structure or union
286 | disp_drv.draw_buf = &buf;
| ^
…/Core/Src/main.c:287:17: error: request for member ‘flush_cb’ in something not a structure or union
287 | disp_drv.flush_cb = tft_flush;
| ^
…/Core/Src/main.c:287:29: error: ‘tft_flush’ undeclared (first use in this function)
287 | disp_drv.flush_cb = tft_flush;
| ^~~~~~~~~
…/Core/Src/main.c:287:29: note: each undeclared identifier is reported only once for each function it appears in
…/Core/Src/main.c:288:17: error: request for member ‘monitor_cb’ in something not a structure or union
288 | disp_drv.monitor_cb = monitor_cb;
| ^
…/Core/Src/main.c:288:31: error: ‘monitor_cb’ undeclared (first use in this function)
288 | disp_drv.monitor_cb = monitor_cb;
| ^~~~~~~~~~
…/Core/Src/main.c:289:17: error: request for member ‘hor_res’ in something not a structure or union
289 | disp_drv.hor_res = DISP_HOR_RES;
| ^
…/Core/Src/main.c:290:17: error: request for member ‘ver_res’ in something not a structure or union
290 | disp_drv.ver_res = DISP_VER_RES;
| ^
…/Core/Src/main.c:291:17: error: request for member ‘rotated’ in something not a structure or union
291 | disp_drv.rotated = rotation;
| ^
…/Core/Src/main.c:292:9: warning: implicit declaration of function ‘lv_disp_drv_register’; did you mean ‘lv_fs_drv_register’? [-Wimplicit-function-declaration]
292 | lv_disp_drv_register(&disp_drv);
| ^~~~~~~~~~~~~~~~~~~~
| lv_fs_drv_register
At top level:
…/Core/Src/main.c:939:6: warning: ‘MPU_Config’ defined but not used [-Wunused-function]
939 | void MPU_Config(void)
| ^~~~~~~~~~
make: *** [Core/Src/subdir.mk:34: Core/Src/main.o] Error 1
“make -j32 all” terminated with exit code 2. Build might be incomplete.
14:33:00 Build Failed. 14 errors, 5 warnings. (took 26s.977ms)