Closed ammaree closed 3 months ago
Just to try and eliminate possible causes I have tried the following:
Any suggestions? @lovyan03 @tobozo
hi,
have you tried a release version of esp-idf (e.g 5.1.2) along with the develop branch of this repo ?
At a glance the same problems with release v5.2 and release v5.1, messages just in different order.
With v5.1, other than the warnings related to the DAC the only errors that remain are:
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:50:8: error: 'LGFX' does not name a type
50 | static LGFX lcd;
| ^~~~
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp: In function 'void vGuiInit()':
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:63:9: error: 'lcd' was not declared in this scope
63 | lcd.init();
| ^~~
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp: In function 'void vGuiRefresh()':
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:113:5: error: 'lcd' was not declared in this scope
113 | lcd.clear(0x0000);
| ^~~
So effectively the 1st error....
With v5.2, other than the DAC related warnings (all still there) the errors that remain are:
In file included from /Users/andremaree/DevSpace/z-repo/lovyan/src/lgfx/v1/platforms/esp32/common.cpp:43:
/Users/andremaree/DevSpace/z-sdk/esp-idf.v5x/components/soc/esp32/include/soc/apb_ctrl_reg.h:9:2: warning: #warning "apb_ctrl_reg is deprecated due to duplicated with syscon_reg, please use syscon_reg instead, they are same" [-Wcpp]
9 | #warning "apb_ctrl_reg is deprecated due to duplicated with syscon_reg, please use syscon_reg instead, they are same"
| ^~~~~~~
/Users/andremaree/DevSpace/z-repo/lovyan/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::spi::init(int, int, int, int, int)':
/Users/andremaree/DevSpace/z-repo/lovyan/src/lgfx/v1/platforms/esp32/common.cpp:487:29: error: 'INTR_CPU_ID_AUTO' was not declared in this scope
487 | buscfg.isr_cpu_id = INTR_CPU_ID_AUTO;
| ^~~~~~~~~~~~~~~~
/Users/andremaree/DevSpace/z-repo/lovyan/src/lgfx/v1/panel/Panel_M5HDMI.cpp:308:8: error: 'uint8_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
308 | std::uint8_t Panel_M5HDMI::HDMI_Trans::readRegister(std::uint8_t register_address)
| ^~~~~~~
| wint_t
/Users/andremaree/DevSpace/z-repo/lovyan/src/lgfx/v1/panel/Panel_M5HDMI.cpp:315:8: error: 'uint16_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
315 | std::uint16_t Panel_M5HDMI::HDMI_Trans::readRegister16(std::uint8_t register_address)
| ^~~~~~~~
| wint_t
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:50:8: error: 'LGFX' does not name a type
50 | static LGFX lcd;
| ^~~~
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp: In function 'void vGuiInit()':
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:63:9: error: 'lcd' was not declared in this scope
63 | lcd.init();
| ^~~
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp: In function 'void vGuiRefresh()':
/Users/andremaree/DevSpace/z-comp/gui_basic/gui_3.cpp:113:5: error: 'lcd' was not declared in this scope
113 | lcd.clear(0x0000);
| ^~~
So effectively the exact same errors and warnings as master/v5.3
@tobozo @lovyan03
Cannot say for sure but seems all the errors are related to missing include files. "esp_intr_types.h" maybe "inttypes.h"
I'm not sure about the compatibility matrix, maybe try one of the versions listed in this workflow, they all seem to work
https://github.com/lovyan03/LovyanGFX/actions/runs/7122113476
I did try v5.1 but now already on v5.1.2 not 5.1.1
Are you saying that there is no planned intention to update LVGL to support latest version of v5.1 as well as v5.2.x and latest v5.3?
that workflow should probably be updated to test 4.4.6
, 5.0.4
and 5.1.2
, however 5.2.x
are not officially supported
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/versions.html#support-periods
Are you saying that there is no planned intention to update LVGL
did you mean LovyanGFX? those are two different projects, updating LVGL isn't in LovyanGFX scope
however I can add 4.4.6
, 5.0.4
and 5.1.2
versions to the workflow on the develop branch and start to fix the compilation errors based as per your suggestion
apparently no compilation error after updating the workflow with the latest esp-idf versions (develop
branch), maybe something is weird in your CMakeLists.txt
?
https://github.com/lovyan03/LovyanGFX/actions/runs/7251461408/job/19753868753
that's probably unrelated but the workflow CMakeLists.txt looks for a folder named LovyanGFX
while your local path to LovyanGFX library seems to be named lovyan
.
Apologies, meant LGFX
On 18 Dec 2023, at 19:05, tobozo @.***> wrote:
that workflow should probably be updated to test 4.4.6, 5.0.4 and 5.1.2, however 5.2.x are not officially supported
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/versions.html#support-periods
image.png (view on web)https://github.com/lovyan03/LovyanGFX/assets/1893754/29c8dc4f-aac5-4330-b951-78053e436e10
Are you saying that there is no planned intention to update LVGL
did you mean LovyanGFX? those are two different projects, updating LVGL isn't in LovyanGFX scope
however I can add 4.4.6, 5.0.4 and 5.1.2 versions to the workflow on the develop branch and start to fix the compilation errors based as per your suggestion
— Reply to this email directly, view it on GitHubhttps://github.com/lovyan03/LovyanGFX/issues/489#issuecomment-1861074074, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYT7GCFEMER2AHIBHSMZE3YKBZUTAVCNFSM6AAAAABAVFRE5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRGA3TIMBXGQ. You are receiving this because you authored the thread.Message ID: @.***>
Changing the directory name from "lovyan" to "LovyanGFX" will make no difference. If this was the error none of the source/header files would have been found and we would not have seen the actual compile errors coming from the lovyan component. Have done the rename and proved the theory.
The DAC support has been marked as deprecated since the release of IDF 5.1.0. Although still supported (for a while) it is strongly encouraged to move to the new driver. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.1/peripherals.html
The "'INTR_CPU_ID_AUTO" related error is fixed in common.cpp with
#include "esp_intr_types.h"
buscfg.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO;
The std:uint8_t/uint16_t errors are fixed by adding
#include <cstdint>
this library is also for arduino core and tries to be backwards compatible, so it's not as simple as adding an include, conditional macros may be needed, some dac/i2s functions and properties have been renamed. also thorough testing must follow to prevent the new fixes to break the old versions
meanwhile it is recommended to use one of the following esp-idf patch versions along with the develop
branch of LovyanGFX: 4.4.6
, 5.0.4
or 5.1.2
I 100% agree, code above just the snippets to demonstrate how elementary the fix is.
Unfortunately we are unable to go back to v5.1.x since we have already upgraded our code to support the changes required for v5.2.x
I can't think of a conditional macro that will work both for the existing 5.2.x branches (dev and beta1) and the master branch while being past and future proof.
For example this macro doesn't handle the differences between 5.2-dev, 5.2-beta1 and master:
#if defined ( ESP_IDF_VERSION_VAL )
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 3, 0)
#define LGFX_IDF_V5_2
#endif
#endif
#if defined LGFX_IDF_V5_2
#include "esp_intr_types.h"
#include <cstdint>
#endif
Ideally the macro should be feature aware instead of version aware, but it doesn't cover possible changes on the master branch:
#if __has_include("esp_intr_types.h")
#include "esp_intr_types.h"
#include <cstdint>
#define LGFX_CPU_AFFINITY_AUTO ESP_INTR_CPU_AFFINITY_AUTO
#elif __has_include("intr_types.h")
#include "intr_types.h"
#define LGFX_CPU_AFFINITY_AUTO INTR_CPU_ID_AUTO
#else
// tech debt here: use version clamping?
#define LGFX_CPU_AFFINITY_AUTO 0
#endif
// // also edit common.cpp:
// buscfg.isr_cpu_id = LGFX_CPU_AFFINITY_AUTO;
Hi @tobozo @lovyan03
Thanks for the changes, much appreciated.
I can now compile and link for the ESP-WROVER-DEVKIT v4.1 using LGFX_AUTODETECT but cannot get the pre-specified configuration to compile and link. My code is:
#define LGFX_AUTODETECT
#ifndef LGFX_AUTODETECT
#define LGFX_USE_V1
#define LGFX_ESP_WROVER_KIT
#define SD_SUPPORTED
#else
#include <LovyanGFX.hpp>
#include <LGFX_AUTODETECT.hpp>
#endif
Q1: Any suggestion of getting it to work without defining LGFX_AUTODETECT ???
Q2: I also have a MakerFabs ESP32-S3 Parallel16 (480x320) devboard. Is it supported with ESP-IDF v5.2 or later?
Q3: If supported, any suggestion how to get working?
Q1: Any suggestion of getting it to work without defining LGFX_AUTODETECT ???
I assume ESP-WROVER-DEVKIT v4.1
is this board
you can create your own configuration block instead of using auto detection. see the settings example
Q2: I also have a MakerFabs ESP32-S3 Parallel16 (480x320) devboard. Is it supported with ESP-IDF v5.2 or later?
there are a few Makerfabs config examples in the lgfx_user folder
Q3: If supported, any suggestion how to get working?
at the moment, ESP-IDF v5.2 is not an officialy supported espressif release, having LovyanGFX working with it in certain conditions is probably accidental :-)
rule of thum with LovyanGFX support: esp-idf master branch and all branches suffixed by -rc
, -beta*
, -dev
aren't stable enough to get any reliable support because things may change, then be reverted, then change again; and no one wants to pay this tech debt on a day to day basis, which is probably the reason why they're outside the service and maintenance period on espressif support graph
esp-idf 5.2.x will be added as soon as espressif associates a tag to the release, it just hasn't happened yet
$ git ls-remote https://github.com/espressif/esp-idf | grep '5\.2'
e49823f10c6b6b8dadbad376002ea2bc531b7b0f refs/heads/release/v5.2
9690cd19a2f03de5773293c28d701508de061e4e refs/tags/v5.2-beta1
57bbfd423a1e9533d371a5e0e1e6bcec25bae6fc refs/tags/v5.2-beta1^{}
a62f09c743a7299cf83f3c524bb6590fad802eea refs/tags/v5.2-dev
f8d2c0894cf3c12dc231dafebf75d3f1002b312c refs/tags/v5.2-dev^{}
as a reminder, LovyanGFX develop branch has been recently tested with the following combos of devices/esp-idf versions:
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.
bump
esp-idf 5.2 is now officially the latest release.
Some macros needed to be adjusted in LovyanGFX source tree to fix the compilation errors, the changes are available on the develop
branch
Carefully written Issues are more likely to be given priority.
Environment
Problem Description
Errors and warnings when building small text only demo
Expected Behavior
Build to complete without errors
Actual Behavior
Steps to reproduce ( 再現のための前提条件 )
// If possible, attach a picture of your setup/wiring here.
Code to reproduce this issue
// If your code is longer than 30 lines, GIST is preferred.