Howto - esp32-8048s070 board for Arduino

for those who have ESP32-8048S070 board and want board driver for it–
first you need to download the libraries for it found here currently.

download it and unzip it, in there you will find the Arduino libraries for it in the folder 1-demo/libraries

Now download the squareline studio driver for it that i created .
arduino_tft_espi esp32.zip (5.9 MB)
this board driver is missing some components libraries as they are very BIG ( but are found in the first library file downloaded )
extract the board driver,
in there you will see a zip file called arduino_tft_espi.zip. Open it with Ark(linux) winzip(windows) and drag and drop the board’s library files into the compressed folder called libraries --add these → Arduino_GFX_master, Touch_GT911, and gt911_arduino-main – they are found in the directory mentioned above 1-demo/libraries/

once done copy to your squareline board directory into the Arduino folder

1 Like

Hi, can you be a bit more specific about what and where to copy your squareline studio driver files. I have the 8048S050 5" display and would like to use it in squareline studio. My installation is totally new v1.2.3

I can build the demo of the LvglWidgets.ino demo and this works correctly on my board.
I’m now trying to use SquarelineStudio to build a project.

When you say the compressed libraries folder, where is it? In the squarelinestudio files in program files? I don’t have that folder. The only .slb file I find in squareline studio is in a folder boards\Desktop\sim_sdl_eclipse_v1_0_1 (sim_sdl_eclipse.slb)

In my Arduino\libraries folder I have the drivers for the board an I assume they are correct as the demo compiles, uploads and runs correctly.

Please can you help?

when you download the driver above arduino_tft_espi esp32.zip
and uncompress it. you will see another zip file in there called arduino_tft_espi.zip… when you open that one in ark or zip program you will see a folder called ui_project_name and in there is the folder called libraries and drop libraries mentioned in there…

now your display is of different size then the one i have
you might have to edit the file ui.ino in the ui folder found with in that same zip file as well to match the your display specifications
just use the configurations that are found in the LvglWidgets.ino that worked for you and compare if there is a difference in this section
example from mine -

Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
    GFX_NOT_DEFINED /* CS */, GFX_NOT_DEFINED /* SCK */, GFX_NOT_DEFINED /* SDA */,
    41 /* DE */, 40 /* VSYNC */, 39 /* HSYNC */, 42 /* PCLK */,
    14 /* R0 */, 21 /* R1 */, 47 /* R2 */, 48 /* R3 */, 45 /* R4 */,
    9 /* G0 */, 46 /* G1 */, 3 /* G2 */, 8 /* G3 */, 16 /* G4 */, 1 /* G5 */,
    15 /* B0 */, 7 /* B1 */, 6 /* B2 */, 5 /* B3 */, 4 /* B4 */
);
// option 1:
// 7寸 50PIN 800*480
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
  bus,
//  800 /* width */, 0 /* hsync_polarity */, 8/* hsync_front_porch */, 2 /* hsync_pulse_width */, 43/* hsync_back_porch */,
//  480 /* height */, 0 /* vsync_polarity */, 8 /* vsync_front_porch */, 2/* vsync_pulse_width */, 12 /* vsync_back_porch */,
//  1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */);

    800 /* width */, 0 /* hsync_polarity */, 210 /* hsync_front_porch */, 30 /* hsync_pulse_width */, 16 /* hsync_back_porch */,
    480 /* height */, 0 /* vsync_polarity */, 22 /* vsync_front_porch */, 13 /* vsync_pulse_width */, 10 /* vsync_back_porch */,
    1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */);

or just use the driver as is and modify when you ready to flash it esp32-

but now that i used squareline for a bit , and have a better understanding of it… i do not think you actually need to upload the added libraries into the zipfile . the current board driver will work fine as is (i’m pretty sure anyways ) . the add libraries are there purely for packaging reasoning . ie So you can compress your project ship it and all the necessary files will be there

then once you have it all edited for your board type . drop the board driver folder and all in to the squareline/boards/Arduino/ directory ( if the Arduino directory does not exist create it)

ok, thanks - yes I have it working. I didn’t add the extra libraries so your assumption is correct - they are picked up from the Arduino libraries path.

What confused me is that there is no folder for Arduino in SquarelineStudio, I had to create the folder.

For anyone looking to do the same (add boards) the folder structure is:

Squareline Studio x.x.x\boards\Arduino\arduino_tft_espi esp32\ [the .png, .slb, .zip go in this folder]

1 Like

okay glad you got it working for you

Still struggling to work out what goes where but my question is,
Is your arduino_tft_espi an update on previous versions as I already have Arduino Board directories of arduino_tft_espi_v1_0_0, arduino_tft_espi_v1_0_1 and arduino_tft_espi_v1_1_0

Hi Acuario, Is your ui.ino in the section mentioned by ‘sash’ the same as yours? I also have the 5" and although now compiling, the screen is dim and blank but I never got LvglWidgets.ino or the other examples to work either.

I did need to copy over those 3 files to the library directory as mentioned by sash and I’m using SLS 1.3.1 and Arduino IDE 2.1.1

you said you never got Lvglwidget.ino to work did you follow the pdf manual . that comes in the download for the board… there are couple lifes you have to copy over before Lvglwidget.ino works. once you get that to work then my above should work you can find your board here ZFile

It doesn’t help that my libraries are not correctly set up. Not sure how it happened but I now have a /arduino/libraries and an arduino/sketches/libraries and have no idea yet which one is used by which sketches. Also after double checking after your post I find I don’t even have a TFT_eSPI directory under either library as highlighted in the ‘Getting started 5.0 Inch.pdf’ although I managed to have the lv_conf.h correct from you although probably now my SC01 Plus won’t work (seems a bad idea not to have this file in the project directory).

Changed the sketch location back to arduino/sketches/ and copied TFT_eSPI to sketches/library folder

Next compile error is:

C:\Users\jakke\Documents\Arduino\Sketches\Display Panels\ESP32-S3-800x480\5.0inch_ESP32-8048S050\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:55:1: error: no matching function for call to ‘Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)’
);
^
In file included from c:\Users\jakke\Documents\Arduino\Sketches\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:17,
from C:\Users\jakke\Documents\Arduino\Sketches\Display Panels\ESP32-S3-800x480\5.0inch_ESP32-8048S050\1-Demo\Demo_Arduino\3_3-4_TFT-LVGL-Widgets\LvglWidgets\LvglWidgets.ino:34:
c:\Users\jakke\Documents\Arduino\Sketches\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate: ‘Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, int32_t, bool, uint16_t, uint16_t)’
Arduino_ESP32RGBPanel(
^~~~~~~~~~~~~~~~~~~~~
c:\Users\jakke\Documents\Arduino\Sketches\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate expects 33 arguments, 23 provided
c:\Users\jakke\Documents\Arduino\Sketches\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate: ‘constexpr Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(const Arduino_ESP32RGBPanel&)’
class Arduino_ESP32RGBPanel

Guessing that some Define is not set correctly perhaps so the call is incorrect. I seem to recall finding a readme that said to set a Define for LvglWidgets to 1 but can’t find that file again!
I’m sure others come across similar problems getting these new screens setup for the first time.

Finally found a define in the file lv_demos.h (thought it was in a readme)

#if LV_USE_DEMO_WIDGETS
#include “widgets/lv_demo_widgets.h”
#endif

Pretty sure I didn’t read anywhere about having to define this. The obvious place would have been in the LvglWidgets.ino

Either way defining this didn’t help.

Putting that error code into Google showed 1 link but it fixed the problem thanks to [pete-pjb].

Turns out that I need to use an old version, 1.3.0 of the GFX Library for Arduino by Moon on Our Nation. Come to think of it I think this was how I fixed the code for my SC01 Plus.

Link: How to setup the lvgl library for Esp32-s3-WROOM-1 with TFT display 800*480 - How-to - LVGL Forum

Hello everyone! I’m a newbie to HMI and SquareLine, so sorry if my question is too simple, but after hours of searching the internet I haven’t managed to get my ESP32-8048S050 working with SquareLine.
I have my board working with the lvgl widget demo in arduino IDE. Afterwards, I have done all the steps indicated by @sash but I think the problem is with the new SquareLine 1.40 because the export does not include the driver you created and that I have included in the Arduino directory. Please which version of SquareLine should work? any driver that works for the new version of SquareLine? Thank you very much!

your screen is slightly different then the driver I made mine was for the 8048S070, yours is the 8048S050. you have to modify it slightly. just down load the driver from http://pan.jczn1688.com > esp32module your screen size . and then modify the the ino to have the same screen info in that zip as I mentioned above at line 3 if you did that it should work. 1.4 version of squareline did not play nice with me on linux so I use the 1.3.x

If you use a special board and display driver this is added in the exported code as sash points out, SquareLine Studio only exports the driver that is present in the selected board-template, this behaviour doesn’t depend on version.