Have managed to build a template for the LilyGo T-Display ESP32S3 board family

I have managed to create a template for the LilyGo T-Display suite of ESP32S3 boards and have included this in my version of SquareLine Studio under the section for :

File → New → Create → Arduino

Might this be useful for anyone?

1 Like

As your board is esp32 based i would have thought the board profile should be in the Expressif folder even if you are developing with Arduino IDE, but maybe thats one area I have been going wrong?

1 Like

Not 100% on this as I have only yesterday installed SquareLine Studio… but I believe the template files in the Espressif folder area are not .ino (Arduino) type files, they are c files and need to be built using CMake within something such as Visual Studio or VS Code. I use those editors for c# and .NET development but haven’t been easily able to integrate them with the ArduinoIDE and get them to work cross platform on MacOS.

I don’t believe the files in Espressif area are directly editable (though I haven’t tried this) in the Arduino IDE as there is no .ino file in any of those templates only a main.c file.

Thats interesting. I have taken the files produced when i export UI files and included them into a .ino file that I know sets up the board correctly (this method works). I haven’t managed to get Squareline Studio to produce a whole project that runs.

Ahhh, that’s great thinking, I hadn’t thought of using that approach! I did see that the Espressif templates didn’t create a .ino file and as such decided I didn’t want to venture to that area, and just looked into the Arduino section. Because one can select the board type within the Arduino IDE, I thought that would be the simplest way to proceed.

I am off work again tomorrow so may very well try your suggested approach.

And ditto re not managing to get SLS to work 100%… I appear to be having a mare getting it to replicate what I seen the UI on-screen to what I see on the display. It’s been driving me nuts today!

Oh, and Newport… by the way :slight_smile:

1 Like

Very nice! Actually you can specify more “groups” in the slb. Adding Arduino and Espressif might make sense in this case.

We will contact LilyGo to see if they are interested adding more boards officially.

1 Like

Great idea - they have several excellent ESP32S3 boards now with built in displays, and one with a touch screen so I hope they are interested I your approaching them.

I am sure there are a few improvements I could make to my template; one I have identified already is to amend the contents of the default .ino file to set the tft.setRotation to 0 instead of 3.

looks interesting, where can I find this template?

Thanks JojoS, I hadn’t looked at how to create something for distribution, but will do for sure. Give me a couple of days and I’ll either come up with a zip or do a tutorial and how-to etc.

I now have a board template for the 7" ESPS3 capacitive touch panel (ESP32-8048S070-c) running with the Arduino IDE - I will see how you share and follow on. Been a real learning exercise getting it working (problems were not with LVGL or SquareLine).

Do you intend to add the libraries to the ZIP (Arduino_GFX in my case) - I have not as I want the IDE to keep them up to date. Not sure if this is good or bad?

A template for the LilyGo Display would indeed be nice. I have spend about 2 hours to get this display running.

What exactly are you having trouble with, Chris? Have you managed to get your Lilygo device working with Squareline Studio at all? Which device do you have? If it is one of the boards I have I’d be happy to help you get up and running with it.

Also, @deadeye, I have posted a Tips on getting up and running post for the LilyGo T-Display boards that might help you…

Here’s the thread: Tips on using the LilyGo T-Display / Touch boards with SquareLine Studio

Yes I got it up and running.
Was just a matter on using the right library and the configuration. Encountered some WDT resets when calling the ui_init(). Now everything is setup and working right now.

1 Like

Glad you’ve got it sorted. Enjoy :+1:

Any update on the relase of the template configuaration?

Apologies Chris, I sort of mis read your previous comment as though you were not necessarily in need of the template any more as you had your device up and running. I guess given what you posted yesterday implies you would still like the template.

In work today, I’ll sort something over the weekend for you.

Here is the Zip file and how-to-install instructions for the LilyGo T-Display template for SquareLineStudio.

arduino_tft_espi_v1_0_0_LilyGo.zip (5.4 MB)

PLEASE NOTE: this comes with caveats.
This is for information

  • Please make sure you have a backup. I am not in any way an expert in SquareLine Studio, and you add this template at your own risk.
  • I have only tested this on MacOS though I am sure it would work on a Windows machine too with the correct directory as it follows SquareLIne Studios Open Board Protocol.
  • There is a Zip file within this Zip file which amongst other things contains the libraries that SquareLineSrtudio uses to create Arduino sketches and code. I have not yet found a way to update these auto-contained Zip files. I am not too concerned about the /lvgl library but you may need to update the auto-created TFT_eSPI library with one specific for your device as each LilyGo T-Display or T-Embed device needs a specific library to operate correctly. If you do need to update the TFT_eSPI library ensure you use the library from the respective LilyGo GitHub board page.

LilyGo T-display and Touch boards GitHub Page

LilyGo T-Embed board GitHb page


  1. Download and extract the attached file
  2. Locate the SquareLIne folder on your Mac or PC
  3. Place the newly extracted folder and contents into the /SquareLine/Boards/Arduino directory as indicated in the screenshot. NB: in this image it is the second entry in the /arduino directory and the folder is called arduino_tft_espi_v1_0_0_LilyGo

  1. When you next open SquareLine Studio, you should see the LilyGo T-Display template in the Arduino section of the Create project area as per screenshot at the top of this thread.

Have fun!

Thank you for providing your template. I gave it a try but have problems running it.

When I use the latest version of the tft_espi library the project complies but the screen is corrupt. The drawn size is smaller than it should be and all elements are shown multiple times and look like an interleaved picture.

If I use all of the files the template generates I can’t compile the project anymore. Since some references are missing.

I’m still trying to figure out the later problem, cause the arduino IDE shows me some very strange paths to the libarary files. Seems to be a bug in the current IDE release of temporary files not beeing cleaned up.

There is a bug in one of the lines in the SLS generated UI.ino file…

Look in the ui.ino file for…

TFT_eSPI tft = TFT_eSPI( screenWidth, screenHeight ); /* TFT instance */

Remove the variables contained inside the parenthesis…

TFT_eSPI tft = TFT_eSPI(); /* TFT instance */

… and it should then all work fine

Indeed this was the right solution.
So I can confirm besided this, the template is working.
Thank you for providing it.