Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32s3 compile error #423

Closed
wants to merge 2 commits into from
Closed

esp32s3 compile error #423

wants to merge 2 commits into from

Conversation

Dev-91
Copy link

@Dev-91 Dev-91 commented Jul 12, 2023

Environment ( 実行環境 )

  • MCU or Board name: ESP-S3-WROOM-1
  • Panel Driver IC: ST7789
  • Bus type: SPI
  • LovyanGFX version: 1.1.7
  • FrameWork version: ESP-IDF v5.0.2
  • Build Environment : vscode ESP-IDF
  • Operating System: mac os

Hello. I'm reporting because I think I found a bug.
I'm using ESP32-S3 and I wrote the code with ESP-IDF v5.0.2.
I wrote a code to output a simple GIF animation, but an error occurred on the common.cpp:646 line.

The error codes are as follows.

{components_path}/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp:646:14: 
error: 'struct i2c_dev_t' has no member named 'comd0'; did you mean 'comd'?
  646 |       (&dev->comd0)[index].val = cmd_val;
      |              ^~~~~
      |              comd

When I changed the code in this part, the LCD worked normally.

// common.cpp:646
(&dev->comd[0])[index].val = cmd_val;

The code I executed is as follows.

#include <LGFX_ST7789.hpp>

#include "duck.h"

static const char *TAG = "TFT";

static LGFX lcd;

extern "C" void app_main(void)
{
    lcd.init();
    lcd.setRotation(0);

    lcd.setSwapBytes(true);
    lcd.fillScreen(TFT_BLACK);

    // center x y
    int img_x = (lcd.width() - animation_width) / 2;
    int img_y = (lcd.height() - animation_height) / 2;

    int frame_delay = 20;

    while(1) {
        for(int i = 0; i < frames; i++)
        {
            vTaskDelay(frame_delay / portTICK_PERIOD_MS);
            lcd.pushImage(img_x, img_y, animation_width, animation_height, ani_img[i]);
        }
    }
}

Please check it out!
Thank you :D

@lovyan03
Copy link
Owner

Have you checked with older versions of the IDF?

@Dev-91
Copy link
Author

Dev-91 commented Jul 12, 2023

I just changed it to v4.4 and tested it.

ESP-IDF v4.4 works fine.

In v5.0.2, compilation was possible only by changing the code.

I haven't tested it yet because I didn't install v5.1.

@lovyan03
Copy link
Owner

Checks indicate that some versions of the framework cannot be built.

@Dev-91
Copy link
Author

Dev-91 commented Jul 12, 2023

So is this a problem that only happens on ESP-IDF v5.0.2 to ESP32-S3 boards?

Or is there another solution?

@lovyan03
Copy link
Owner

image

@lovyan03
Copy link
Owner

may be we need ifdef

lovyan03 added a commit that referenced this pull request Jul 12, 2023
@hayschan
Copy link

I encountered this similar problem. Can you check on your side? #438

@Dev-91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants