Closed martinberlin closed 1 year ago
Impressive update @lovyan03 thanks a lot!
Only remaining thing that I had to comment in order to get it built was:
../components/lovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp: At global scope:
../components/lovyanGFX/src/lgfx/v1/lgfx_filesystem_support.hpp:60:13: error: template-id not allowed for destructor
60 | virtual ~LGFX_FILESYSTEM_Support<Base>()
I don't get it, now then on GCC 11, you can't add a destructor in a Template? How to do it then?
UPDATE: Latest version on develop is working correctly and already flashed in my wall clock with IT8951. Works perfectly at least with this Panel settings. Great work.
@martinberlin Thanks for letting me know!
I removed the destructor from the template class. Let me know if you still have problems.
Hi @lovyan03 Now it builds correctly without any problem in IDF v5. Good work!
I'm facing the same issue. LGFX is a dependency for https://github.com/sukesh-ak/LVGL8-WT32-SC01-IDF and my hands are dirty fixing the LGFX issues regarding ESP-IDF v5.x. I've already fixed the abovementioned problem with miniz.c
, missing required components, missing esp_timer.h
includes, but still don't see light at the end of the tunnel.
Should I switch to the develop branch? It looks broken according to CI.
@dizcza I have just readjusted the develop branch. I think it should build now. There seems to be a build error in IDFv4.3.1 of ESP32-S2, but this should not affect this case.
@lovyan03 thanks! The developer branch works now with ESP-IDF v5.1-dev-96-gafc6fba7f5-dirty. Tested on the WT32-SC01 v3.3 board.
It outputs a number of annoying warnings though:
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:4:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.hpp: In constructor 'lgfx::v0::Panel_GDEW0154M09::Panel_GDEW0154M09()':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.hpp:52:20: warning: implicitly-declared 'constexpr lgfx::v0::range_rect_t& lgfx::v0::range_rect_t::operator=(const lgfx::v0::range_rect_t&)' is deprecated [-Wdeprecated-copy]
52 | _range_new = _range_old;
| ^~~~~~~~~~
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:1:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/../lgfx_common.hpp:1634:5: note: because 'lgfx::v0::range_rect_t' has user-provided 'lgfx::v0::range_rect_t::range_rect_t(const lgfx::v0::range_rect_t&)'
1634 | range_rect_t(const range_rect_t& rhs) : horizon(rhs.horizon), vertical(rhs.vertical) {}
| ^~~~~~~~~~~~
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp: In member function 'virtual void lgfx::v0::Panel_GDEW0154M09::post_init(lgfx::v0::LGFX_Device*, bool)':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:26:18: warning: implicitly-declared 'constexpr lgfx::v0::range_rect_t& lgfx::v0::range_rect_t::operator=(const lgfx::v0::range_rect_t&)' is deprecated [-Wdeprecated-copy]
26 | _range_new = _range_old;
| ^~~~~~~~~~
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:1:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/../lgfx_common.hpp:1634:5: note: because 'lgfx::v0::range_rect_t' has user-provided 'lgfx::v0::range_rect_t::range_rect_t(const lgfx::v0::range_rect_t&)'
1634 | range_rect_t(const range_rect_t& rhs) : horizon(rhs.horizon), vertical(rhs.vertical) {}
| ^~~~~~~~~~~~
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp: In static member function 'static void lgfx::v0::Panel_GDEW0154M09::display(lgfx::v0::PanelCommon*, lgfx::v0::LGFX_Device*, int32_t, int32_t, int32_t, int32_t)':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:302:26: warning: implicitly-declared 'constexpr lgfx::v0::range_rect_t& lgfx::v0::range_rect_t::operator=(const lgfx::v0::range_rect_t&)' is deprecated [-Wdeprecated-copy]
302 | me->_range_old = me->_range_new;
| ^~~~~~~~~~
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_GDEW0154M09.cpp:1:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/../lgfx_common.hpp:1634:5: note: because 'lgfx::v0::range_rect_t' has user-provided 'lgfx::v0::range_rect_t::range_rect_t(const lgfx::v0::range_rect_t&)'
1634 | range_rect_t(const range_rect_t& rhs) : horizon(rhs.horizon), vertical(rhs.vertical) {}
| ^~~~~~~~~~~~
[850/1071] Building CXX object esp-idf/LovyanGFX/CMakeF...df_LovyanGFX.dir/src/lgfx/v0/panel/Panel_IT8951.cpp.obj/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_IT8951.cpp: In static member function 'static void lgfx::v0::Panel_IT8951::display(lgfx::v0::PanelCommon*, lgfx::v0::LGFX_Device*, int32_t, int32_t, int32_t, int32_t)':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_IT8951.cpp:672:26: warning: implicitly-declared 'constexpr lgfx::v0::range_rect_t& lgfx::v0::range_rect_t::operator=(const lgfx::v0::range_rect_t&)' is deprecated [-Wdeprecated-copy]
672 | me->_range_old = me->_range_new;
| ^~~~~~~~~~
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/Panel_IT8951.cpp:1:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v0/panel/../lgfx_common.hpp:1634:5: note: because 'lgfx::v0::range_rect_t' has user-provided 'lgfx::v0::range_rect_t::range_rect_t(const lgfx::v0::range_rect_t&)'
1634 | range_rect_t(const range_rect_t& rhs) : horizon(rhs.horizon), vertical(rhs.vertical) {}
| ^~~~~~~~~~~~
[1065/1071] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/main.cpp.objIn file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/lvgl/src/core/lv_obj.h:140,
from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/lvgl/lvgl.h:35,
from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:21:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/lvgl/src/core/lv_obj_style.h: In function 'void lv_obj_remove_style_all(_lv_obj_t*)':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/lvgl/src/core/lv_obj_style.h:94:48: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
94 | lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp: In function 'void app_main()':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:71:35: warning: missing initializer for member 'esp_timer_create_args_t::arg' [-Wmissing-field-initializers]
71 | .name = "periodic_gui"};
| ^
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:71:35: warning: missing initializer for member 'esp_timer_create_args_t::dispatch_method' [-Wmissing-field-initializers]
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:71:35: warning: missing initializer for member 'esp_timer_create_args_t::skip_unhandled_events' [-Wmissing-field-initializers]
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp: In function 'void display_flush(lv_disp_drv_t*, const lv_area_t*, lv_color_t*)':
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:106:19: warning: 'void lgfx::v1::LGFXBase::pushColors(const uint16_t*, int32_t, bool)' is deprecated: use pushPixels [-Wdeprecated-declarations]
106 | lcd.pushColors((uint16_t *)&color_p->full, w * h, true);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v1_init.hpp:25,
from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/LovyanGFX.hpp:31,
from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/LovyanGFX.h:5,
from /home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/main/main.cpp:16:
/home/dizcza/Projects/Embedded/eclipse-workspace/other/LVGL8-WT32-SC01-IDF/components/LovyanGFX/src/lgfx/v1/LGFXBase.hpp:766:43: note: declared here
766 | [[deprecated("use pushPixels")]] void pushColors(const uint16_t* data, int32_t len, bool swap) { startWrite(); writePixels(data, len, swap); endWrite(); }
| ^~~~~~~~~~
Something to be fixed on a rainy evening.
lgfx::v0
should probably be filtered out with esp-idf 5.0, maybe with a conditional list(REMOVE_ITEM)
in the CMakeLists.txt ?
I have made the adjustment again. Perhaps this will eliminate the warning.
@lovyan03 Since IDF 5.0 just got released, do you have any timeline on these updates in release branch?
workflow CI has been updated v5.0-beta1 => v5.0
@tobozo why does it say beta? IDF 5.0 was released few days ago.
workflow CI has been updated v5.0-beta1 => v5.0
@sukesh-ak it says v5.0
workflow CI has been updated v5.0-beta1 => v5.0
@sukesh-ak it says v5.0
Sorry for the confusion :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.
It seems the nice people from Espressif has made our lives miserable with some breaking changes:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/index.html
Most importantly is that the previous GCC version was GCC 8.4.0 (IDF ver < 5). This has now been upgraded to GCC 11.2.0 on all targets.
So far I had also trouble adapting my (mostly SPI) epaper component to build in this new version of IDF.
This is the list that I get so far when trying to compile Lovyan GFX in develop branch and I can help with ideas / testing so it will build also in this version:
[x] /platforms/esp32/common.hpp:28:10: fatal error: driver/gpio.h: No such file or directory This simply because it does not find gpio.h unless "COMPONENT_REQUIRES driver" is also present in the CMakeLists idf_component_register (easy fix)
[x] /v1/panel/../Panel.hpp:160:19: error: 'buf' may be used uninitialized [-Werror=maybe-uninitialized] This one I'm not sure why it is but I will research a bit more.
[x] /v1/platforms/esp32/common.hpp:44:95: error: 'esp_timer_get_time' was not declared in this scope (easy fix) This is simply because it needs: #include C header in order to access this function (It seems it was included in prior versions)
I also had to add it in COMPONENT_REQUIRES esp_timer
[x] /platforms/esp32/common.hpp:47:80: error: 'ets_delay_us' was not declared in this scope This is one is weird since in previous versions it was defined in rom/ets_sys.h And it's still there but it seems it won't find it now, will find out...
[x] calcClockDiv even though uses size_t to accept any kind of integer type still bumps error when compiling with IDF 5 forcing me to add silly (size_t*) casting
It's simply like it won't find it under the scope of Bus_SPI. Solved it updating that include to:
Other than that in order to keep on finding out what else needs to be updated I had to add some function aliases in platforms/esp32/common.hpp (Note I tried so far only in esp32 platform)
Still in the latest GPIO & RTC documentation only gpio_iomux_in / gpio_iomux_out seem to be there, but no **gpiomatrix*** functions. Or I'm missing something and gpio_matrix_in / out are declared somewhere else ?
Why they changed this knowing it will break most existing code, no idea...
Some research about this: It seems in GCC11 in any class, U, can have one and only one destructor, which is declared within that class with the name ~U() and accepts exactly no parameters. But a template function specifies a family of functions, where a "family" describes a set containing one or more, with no upper limit on the number of members. So if I see this correctly is not possible to make desctructors in templates like this anymore.
This seems to be the last one when compiling my IT8951 example. Will go through it later.
Will be updating this with new findings soon. Like always very grateful to have this component. And I would like to make it build and flash also in this new version of IDF.