nopnop2002 / esp-idf-ili9340

SPI TFT and XPT2046 touch screen controller driver for esp-idf
MIT License
168 stars 36 forks source link

Use this library with platformio #35

Closed don41382 closed 3 years ago

don41382 commented 3 years ago

Hi guys,

First of all: Thanks for this great library!

I am pretty new to the esp idf and just arrived from Arduino world. Could someone help to get it working as a library inside my platformio esp32-idf project?

I know I have to adjust the src/CMakeLists.txt in order to make the lib work.

Thanks in advance!

I already added the build flags to the platform.ini:


build_flags = 
    -std=c++17
    -D CONFIG_ILI9341
    -D CONFIG_MOSI_GPIO=1
    -D CONFIG_SCLK_GPIO=1
    -D CONFIG_CS_GPIO=1
    -D CONFIG_DC_GPIO=1
    -D CONFIG_RESET_GPIO=1
    -D CONFIG_BL_GPIO=1
    -D CONFIG_WIDTH=240
    -D CONFIG_HEIGHT=320
    -D CONFIG_OFFSETX=0
    -D CONFIG_OFFSETY=0
nopnop2002 commented 3 years ago

Could someone help to get it working as a library inside my platformio esp32-idf project?

pio for ESP32 can use 2 framework.

  1. arduino framework
  2. esp-idf framework

When using the arduino framewrok, Probably a very difficult task. You probably need to make a lot of changes. It's easier to use a different library.

When using the esp-idf framework, it is easier to use the native esp-idf. esp-idf is not difficult.

don41382 commented 3 years ago

Thanks for the quick response @nopnop2002. You got me wrong: I switched from pio Android to pio esp-idf.

Have you ever used pio? Do you have an idea how to change the CMakeList.txt in order to have a proper import?

nopnop2002 commented 3 years ago

Have you ever used pio?

Yes.

Do you have an idea how to change the CMakeList.txt in order to have a proper import?

No.

don41382 commented 3 years ago

I didn't get it to work and switched libs. Thanks for your support.