loboris / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
571 stars 220 forks source link

Adding support for CMake #58

Open Grtschnk opened 6 years ago

Grtschnk commented 6 years ago

Thank you!

First off I also want to say a big thank you to Boris for this library!

Issue:

Since ESP-IDF 3.1 Espressif included CMake support and is making it the default compiler.

Make projects will still be supported, but as far as I understand it, I cannot use this great TFT library with a CMake project because the "components" are missing the CMakeLists.txt. Espressif added these in the v3.1 release for all components.

In short: CMakeLists.txt are needed for the "components" in said folder.

Grtschnk commented 6 years ago

I am currently trying to wrap my head around the new CMake toolchain and CMake in general. I guess there must be a way to easily generate these files (or reverse-engineer them from the makefiles).

Maybe Espressif itself would be interesting in helping to upgrade your library? I saw they included an external MQTT in their master now.

Grtschnk commented 6 years ago

Think I understand the new CMake toolchain: I created the missing CMakeLists.txt, however I still have problems with the linker. Not sure if this is an error of the ESP-IDF when compiling c (not cpp) custom components or of my IDE-Plugin (VisualGDB). I opened a ticket, let's see.

Grtschnk commented 6 years ago

I created my CMake files locally and it works fine for me. If you like I can send them to you and/or you enable push for the repo.

arnold-b commented 5 years ago

Hello,

could you please help. how can i use this library with cmake. Could i get your projekt. Thanks

Grtschnk commented 5 years ago

These are my local CMakeFiles. Espressif did a great job creating an easy-to-use toolchain. I suggest you have a look at their examples (and the ones below) and create the files yourself to exactly suit your project.

set(COMPONENT_SRCS tft.c tftspi.c comic24.c def_small.c DefaultFont.c DejaVuSans18.c DejaVuSans24.c minya24.c SmallFont.c tooney32.c Ubuntu16.c)
set(COMPONENT_ADD_INCLUDEDIRS "." "../spidriver")

register_component()
set(COMPONENT_SRCS spi_master_lobo.c)
set(COMPONENT_ADD_INCLUDEDIRS ".")

register_component()

Cheers

arnold-b commented 5 years ago

Hi,

thanks for your make file.

I got I already running with esp-idf .30

But I still have problem to use 3.3 ,

I just bought a wrover kit and I wanted to test the TFT.

This library is realy good. I will use it to create a small GUI.

Currently I´m fighting a bit with SMTPE 610.

Before I manly used Arduino Ide, but this one is too slow. I could not even make I2C protocol analyser for 400khz.

Now I´m using Visual Studio and testing VisualGDB.

Thanks Arnold

Von: Grtschnk notifications@github.com Gesendet: Montag, 17. Dezember 2018 02:58 An: loboris/ESP32_TFT_library ESP32_TFT_library@noreply.github.com Cc: arnold-b arnold.braun@gmx.de; Comment comment@noreply.github.com Betreff: Re: [loboris/ESP32_TFT_library] Adding support for CMake (#58)

These are my local CMakeFiles. Espressif did a great job creating an easy-to-use toolchain. I suggest you have a look at their examples (and the ones below) and create the files yourself to exactly suit your project.

`set(COMPONENT_SRCS tft.c tftspi.c comic24.c def_small.c DefaultFont.c DejaVuSans18.c DejaVuSans24.c minya24.c SmallFont.c tooney32.c Ubuntu16.c) set(COMPONENT_ADD_INCLUDEDIRS "." "../spidriver")

register_component()`

`set(COMPONENT_SRCS spi_master_lobo.c) set(COMPONENT_ADD_INCLUDEDIRS ".")

register_component()`

Cheers

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/loboris/ESP32_TFT_library/issues/58#issuecomment-447667005 , or mute the thread https://github.com/notifications/unsubscribe-auth/AfTd2Ydk97Wvlj9Z-qC6I-4rKy2WEa2qks5u5pebgaJpZM4XJdGF . https://github.com/notifications/beacon/AfTd2SsbhF-NumhFWmg2RclIt2dexMmtks5u5pebgaJpZM4XJdGF.gif

mica-angeli commented 5 years ago

I've added CMake support in my fork. See pull request above.