• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

CYD Compilation error Weather Station

Q&A Forum › Category: ESP32 › CYD Compilation error Weather Station
0 Vote Up Vote Down
Gary Leslie asked 7 months ago

I keep getting the following error trying to compile the weather station sketch in the version 1.4 of your pdf book. I am using the CYD module. I am using Arduino IDE 2.3.3
The line it complains about is  line 208

206    static void draw_event_cb(lv_event_t * e) {
207   lv_draw_task_t * draw_task = lv_event_get_draw_task(e);
208  lv_draw_dsc_base_t * base_dsc = (lv_draw_dsc_base_t*) draw_task->draw_dsc;
  // If the cells are drawn

Compilation error

invalid use of incomplete type ‘lvl_draw_task_t'{aka ‘struct lv_draw_t}

I am using all the correct versions of the libraries.
Any idea why this is happening?

Question Tags: ESP32 CYD
13 Answers
0 Vote Up Vote Down
Best Answer
Sara Santos Staff answered 7 months ago

I mean, do you get any specific errors on the Serial Monitor?

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
Can you tell me the exact code you’re trying to compile?
Regards,
Sara

0 Vote Up Vote Down
Gary Leslie answered 7 months ago

Module 6 HTTP GET Request: Weather API.
I have tried the version downloaded with the pdf book and also from the url in the book. 
It used to work when I first tried it earlier in the year. 
I did have to remove and replace all the libraries after I accidently let the IDE update the libraries. They are back to the suggested versions. I have also ensured the correct User.setup.h  and lv_conf.h files are in the right places. Not sure where to go now.

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

What are the issues you’re facing with that project?

0 Vote Up Vote Down
Gary Leslie answered 7 months ago

It’s a compilation error. It doesn’t make any sense.
Compilation error invalid use of incomplete type ‘lv_draw_task_t'{aka ‘struct lv_draw_task_t’}

It's at line number 208 in the program
0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
 
Can you tell me the version of the LVGL library you have installed? Just to make sure we’re testing the same thing.
 
Additionally, can you also check the ESP32 boards version (Tools > Boards  > Boards Manager > Search for ESP32 and check the version).
 
Then, I’ll try to compile it on my Arduino IDE with the exact same versions as yours.
 
Regards,
Sara
 

0 Vote Up Vote Down
Gary Leslie answered 7 months ago

Hi Sara,
Thanks for your perseverence.
My setup is as follows.
I’m using a windows 10 laptop with the following libraries installed.
esp32 board version  3.04
LVGL version  9.22
TFT_eSPI  version 2.5.34
XXPT2046Touchscreen version 1.4
IDE version 2.3.3

Gary
0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi again.
 
I just tested everything and it is working as expected.
So, I’m not sure what might be wrong.
What city are you inserting in the location variable? Can you try it with “Oporto”? Just to check if it might be an issue with the city.
 
If you continue with issues, do the following…
 
1. You may update the TFT_esPI library. I’m using the latest version without any problems. After updating, make sure to check the User_Setup file. Check if it is in the right place, if not, put it there again. Use the one provided in the last version of the eBook (version 1.4).
 
2. I would suggest that you uninstall the LVGL library (delete any LVGL folders from the Arduino IDE libraries folder), and then install it again following the exact procedure on the eBook version 1.4.
Maybe something went wrong during the library updates or something like that.
 
After doing this, let me know your results.
 
Regards,
Sara

0 Vote Up Vote Down
Gary Leslie answered 7 months ago

Hi Sara,
I tried removing lvgl and then reinstalling ver 9.20
I’m afraid I still get the same compilation errors.
I wonder if it’s anything to do with the IDE version. I’m using version 2.33. I have found some programs from the book work and others don’t. It’s really frustrating. I cannot understand what the errors mean they all refer to “invalid use of incomplete type “. In all the programs that fail the problem is a reference to a struct ie.
208 lv_draw_ dsc_base_t ………draw_task-> draw_dsc;
Not sure why but it is very annoying.

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
Did you also check the TFT_eSPI library?
I’m really not sure what might be wrong. Everything is working fine with my setup.
I don’t think it is related to the Arduino IDE version.
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

I found some users with similar problems.
Here they provide some solutions: https://github.com/lvgl/lvgl/issues/6812
I’m not sure if this works as I cannot reproduce this problem.
Regards,
Sara

0 Vote Up Vote Down
Gary Leslie answered 7 months ago

Hi Sara, thanks for all your help. I had a look at the lv_conf.h file and found I had installed the 9.00 version and not the 9.20 version in the libraries folder. On replacing the correct version the sketch now compiles and runs correctly. Thanks again for helping me out.
Cheers Gary

0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Great.
I’m glad you found the issue and everything is working now.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.