Export project for ESP32 to PlatformIO

What do you want to achieve?

I would like to export a project generated and exported from SquareLine Studio to a project in PlatformIO.

What have you tried so far?

I exported the project from SquareLine Studio and tried to import it in PlatformIO.
I used the CLI to setup the project.

pio init -b esp32dev --ide=vscode

This created a new project successfully, but something is missing. PlatformIO does not even show an option to build the project.
I moved some of the exported source files around, but without success.
I was able to find instructions (and even a good video tutorial) on how to import an exported project to Arduino IDE. But I was not able to find something about creating a PlatformIO project from a SquareLine Studio export.


  • SquareLine Studio version: 1.3.0
  • Operating system: Linux Mint
  • Target hardware: ESP32 Dev Board

Try those settings for your Square Line Project

Board Group = Desktop
Board = Eclipse with SDL for development on PC
Version = v1.0.2
LVGL = 8.3.6
No multilanguage export
and export as .c functions

When exporting your Square Line Project you will get a bunch of files you can import in your Platformio project. The configuration of the ESP32 itself has to happen in Platformio. Afterwards you can link the ui.h in your main file and call ui_ini();

Thank you for your answer!
Can you give a bit background about the recommended settings for export?
Doesn’t sound logical to me to use e.g. “Desktop” when there are dedicated settings for Arduino projects?

Anyhow, I think the answer to my question lies in the 2nd part of your post.
I understand, that I have to setup the project in PlatformIO first (including libraries) and then integrate the code exported from SquareLine Studio.
Since the SquareLine export already contains lvlg- and TFT_eSPI (in my case) library code, I thought there might be an easy way to transform the export directly (or with small adjustments) into a PlatformIO project.

It seems to be possible when using Arduino IDE, according for example to this video.

Place exports for many IDE into Squareline is step into trouble.
Exported code never will full project and isnt clean way force for example eSPI usw.

For use export to platformio project you create empty platformio project and use folder src or lib as export destination. After this you can add missed libs … and primary your code .

Basically you can select any board, and you can go to Export → Export UI files, and select a folder in the PIO project. It will export only platform independent files that can be added into any project.