Compile errors undefined reference to `ui_Screen1_screen_init

Figured it out. ui_Screen1_screen_init is defined in screens/Screen1.c.

I had tried to flatten the project folders so that I didn’t need to change the Arduino IDE sketchbook location to be this specific project’s folder and had not moved this file.

1 Like

please take a look at this post:

1 Like

@kisvegabor thanks for your answer.
Today I can only access from my phone and maybe I am missing something that I would notice from my pc. I followed your link to a GitHub repo, but I couldn’t find any instructions explaining what that code is for, or how it could solve my problem.
Could you please clarify?

@benlye if I got it correctly, I will check later (probably tomorrow as today I won’t be home) that my sketch folder contains a code file defining `ui_Screen1_screen’
I’ll let you know. Thanks!

From SLS v1.3.0 we export the code in a directories. Unfortunately, Arduino doesn’t like folders next to the ino files, so we need to use the exported code as an Arduino library (where directories are supported). On the link that I’v send you can find a template library for the UI code. You can create the same directory structure in your library folder and export the code into the src folder.

We definitely need to figure out something simpler for this…

1 Like

@kisvegabor apologies but I’m probably too thick to understand this… I am having a hard time understanding the directory structure I’m supposed to create. I tried doing this

changing “board” and “project name” to my actual board and project name. But it doesn’t compile.
So I looked more at the folders on github and found this readme:

Is this what I am supposed to do?
Thanks for your patience.

It just came to my mind that we can create a special board in SLS which will export an Arduino library for the UI files. So it will do basically what you need to do manually here.

Until that, I attach a zip file. You need to copy it into Arduino’s library folder and export the UI files into the src folder. Let me know how it works. (1019 Bytes)

1 Like

That sounds good.

It might also make it easier to integrate the SLS output with other Arduino display libraries (rather than TFT_eSPI).

I’m lookin at Arduino_GFX and LovyanGFX for a couple of devices which aren’t supported by TFT_eSPI.

@kisvegabor thanks very much for your help! I just followed your instructions and it looks like I was able to compile.
Initially I had gotten some errors regarding some montserrat font (20 and 30) not implemented, so I switched them to 1 in the conf.h file and it looks like that fixed the issue.
Unfortunately I don’t have the board with me at the moment, so I won’t be able to test upload the code. I should do it tomorrow or Monday at the latest and then I’ll let you know.
Thanks again!

1 Like

Great, thank you for the update!

In the meantime I started to work on the mentioned SLS Arduino library “board”.

@kisvegabor why not have an option in SLS to export a completely flat file structure? I just take all the exported .c and .h files, fix the includes (remove ../), and drop all the files into my Arduino IDE project folder.

I don’t care that there’s a a lot of files, and it save me doing any messing with the library folders.

1 Like

I was thinking about it and it seems like good idea. What we need is only a checkbox in the project settings.

I’ve discussed it with the others guys at SLS, and we will add it in the next release.

1 Like

@kisvegabor, I was finally able to upload on the board. Everything works, except my GUI does not appear on the display, I just get the backlight steady on.
I am currently looking for the solution, I must have missed something somewhere.

1 Like

I’ve been having the same error. And like you the workaround @kisvegabor suggested seems to at least allow compiling to finish. But I’m getting the same “backlight only” dark screen instead of the UI. In my case the UI is simply a single function-less button just as a test. Very frustrating.

I’m using a Makerfabs 4.3" display. Details are sketchy, but it seems to use an “HX8664/HX8264” LCD driver IC. If that has any bearing on why this isn’t working.

Hi, are you sure the display is working without LVGL and SLS? That is can you draw anything on it without calling lv_init and ui_init?

Not to hijack the thread (should I start a new one?) but in my case I can otherwise upload files and all works fine. Can place shapes, text, PNGs, etc. But so far Squareline only makes a dark blank screen. I’ve checked the background is set to white, fully opaque, etc.

@Drone601 I personally have no problem with using this topic to discuss your issue, which seems similar to mine. I have a very limited knowledge though.
I am still digging to find out some more about my issue. For example I noticed that after getting the black screen (backlight only) with the SLS UI code, I have been getting the same result with another LVGL code (the HELLOLVGL example code at this link: that previously had worked fine for me. I am wondering if somewhere I messed up something which is impacting both codes…

1 Like

@kisvegabor today I managed to show the UI on the display! As I thought I had probably made some mistakes in copying the gfx and display declarations for my board.
It looks like everything is working for now. Now I have to implement some new functions, will write if I encounter other issues I can’t solve… thanks all for your help!

1 Like

Great! Guess you are extremely happy now. :grin:

1 Like

It seems that the problem has been solved in SLS 1.3.2: In File/ProjectSettings is a checkbox at the end of the page (scroll down!) ‘Flat export (exports all files to one folder)’. Exactly what was proposed as a workaround in this topic. Good work!

1 Like