Project from 1.2.3 in 1.3.0 not compiling correctly

What do you want to achieve?

Opend a project that was created in 1.2.3.
Changed the layout
Export the new UI Files

What happens?

The created UI files can not be compiled since the ui_Screen1_screen_init section is missing from the ui.c file.

Normally it is supposed to look something like this

///////////////////// SCREENS ////////////////////
void ui_Screen1_screen_init(void)
ui_Screen1 = lv_obj_create(NULL);
lv_obj_set_scrollbar_mode(ui_Screen1, LV_SCROLLBAR_MODE_OFF);
lv_obj_set_style_bg_color(ui_Screen1, lv_color_hex(0x5A5D6B), LV_PART_MAIN | LV_STATE_DEFAULT);

Now the file that was created only goes straight to the init call

///////////////////// ANIMATIONS ////////////////////

///////////////////// FUNCTIONS ////////////////////

///////////////////// SCREENS ////////////////////

void ui_init(void)
lv_disp_t * dispp = lv_disp_get_default();
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),

###Project settings

No multi language export and export as .c functions

I’m also missing a lot of things from my ui.c file when I export :frowning: Yes, I can copy paste from an older version of the file, but I hate going back and forth. This bug doesn’t have much mention or replies, I’m wondering how people are using SLS with this issue? Maybe it doesn’t affect everyone? Did I forget to check some option somewhere?

May the almightly SLS gods see this post

I can confirm this and have rolled back to 1.2.3 as all my previous projects are broken in 1.3

New projects under 1.3 seem OK tho.

I also rolled back to 1.2.3 and can complie again. Still the play Mode remains brocken for my old projects


In v1.3 we have changed the structure of the exported files. So now you should have a screens folder and only the init function of the screens are called from ui.c.


void ui_init(void)
    LV_EVENT_GET_COMP_CHILD = lv_event_register_id();

    lv_disp_t * dispp = lv_disp_get_default();
    lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
                                               false, LV_FONT_DEFAULT);
    lv_disp_set_theme(dispp, theme);

   //See here

   ui____initial_actions0 = lv_obj_create(NULL);
β”œβ”€β”€ CMakeLists.txt
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ ui_comp.c
β”‚   β”œβ”€β”€ ui_comp.h
β”‚   β”œβ”€β”€ ui_comp_header.c
β”‚   β”œβ”€β”€ ui_comp_header.h
β”‚   β”œβ”€β”€ ui_comp_hook.c
β”‚   β”œβ”€β”€ ui_comp_hook.h
β”‚   β”œβ”€β”€ ui_comp_nice1.c
β”‚   β”œβ”€β”€ ui_comp_nice1.h
β”‚   β”œβ”€β”€ ui_comp_sliderbox.c
β”‚   └── ui_comp_sliderbox.h
β”œβ”€β”€ filelist.txt
β”œβ”€β”€ fonts
β”‚   β”œβ”€β”€ ui_font_Number.c
β”‚   └── ui_font_Text.c
β”œβ”€β”€ screens
β”‚   └── ui_Screen1.c
β”œβ”€β”€ ui.c
β”œβ”€β”€ ui_events.h
β”œβ”€β”€ ui.h
β”œβ”€β”€ ui_helpers.c
└── ui_helpers.h

Ok, Arduino for sure has problem with that structure and I’m wondering. There is only a ui_Screen1.c and no header file. How does the ui.c file knows of the existance of the init function in ui_Screen1.c? Never seen this type of declaration before.

I am having the same issue. Is there a work around?

I need to get a project happening. Can I get an older version of Squareline Studio if there’s no fix for this issue? I just can’t get it to compile in the Arduino IDE. I’ve even tried with just a blank screen project with no other components. oh - I didn’t see the Download Archive. Downloading a previous version and trying again. :slight_smile:

This topic is about the same issue: Export files in v1.3 - compile errors - #5 by mariuselz

Please take a look at my latest comment there and continue in the other topic.

1 Like