Arduino compiling error

What do you want to achieve?

I have created a simple GUI in SquareLine Studio and after exporting the Files Im not able to compile them.

What have you tried so far?

I tried to compile the example files, and they work.
I also tried different versions of board and LVGL under Project Settings, but get same errors.
I have checked all the tutorials online and have been googleing for a while now but no success.
All steps I do are same as in the tutorial:

Hope I can get a hint where these errors come from.

Screenshot or video

These are the errors I get:

In file included from C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui_helpers.c:6:
ui_helpers.h:14:27: error: unknown type name ‘lv_obj_t’
void _ui_bar_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
ui_helpers.h:20:29: error: unknown type name ‘lv_obj_t’
void _ui_basic_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
ui_helpers.h:23:32: error: unknown type name ‘lv_obj_t’
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
ui_helpers.h:26:29: error: unknown type name ‘lv_obj_t’
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
^~~~~~~~
ui_helpers.h:26:56: error: unknown type name ‘uint8_t’
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
^~~~~~~
ui_helpers.h:29:29: error: unknown type name ‘lv_obj_t’
void _ui_label_set_property(lv_obj_t * target, int id, char * val);
^~~~~~~~
ui_helpers.h:33:30: error: unknown type name ‘lv_obj_t’
void _ui_roller_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
ui_helpers.h:37:30: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
ui_helpers.h:39:24: error: unknown type name ‘lv_obj_t’
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay);
^~~~~~~~
ui_helpers.h:39:43: error: unknown type name ‘lv_scr_load_anim_t’
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay);
^~~~~~~~~~~~~~~~~~
ui_helpers.h:41:24: error: unknown type name ‘lv_obj_t’
void _ui_arc_increment(lv_obj_t * target, int val);
^~~~~~~~
ui_helpers.h:43:24: error: unknown type name ‘lv_obj_t’
void _ui_bar_increment(lv_obj_t * target, int val, int anm);
^~~~~~~~
ui_helpers.h:45:27: error: unknown type name ‘lv_obj_t’
void _ui_slider_increment(lv_obj_t * target, int val, int anm);
^~~~~~~~
ui_helpers.h:50:22: error: unknown type name ‘lv_obj_t’
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
^~~~~~~~
ui_helpers.h:50:41: error: unknown type name ‘int32_t’
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
^~~~~~~
ui_helpers.h:55:23: error: unknown type name ‘lv_obj_t’
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
^~~~~~~~
ui_helpers.h:55:42: error: unknown type name ‘int32_t’
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
^~~~~~~
ui_helpers.h:57:22: error: unknown type name ‘lv_obj_t’
void _ui_opacity_set(lv_obj_t * target, int val);
^~~~~~~~
ui_helpers.h:59:30: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:59:45: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:61:30: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:61:45: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:63:34: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:63:49: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:65:35: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:65:50: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:67:36: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:67:51: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:69:39: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:69:54: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:71:40: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
^~~~~~~~~
ui_helpers.h:71:55: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
^~~~~~~
ui_helpers.h:73:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
^~~~~~~
ui_helpers.h:73:33: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:75:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
^~~~~~~
ui_helpers.h:75:33: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:77:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
^~~~~~~
ui_helpers.h:77:37: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:79:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
^~~~~~~
ui_helpers.h:79:38: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:81:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
^~~~~~~
ui_helpers.h:81:39: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:83:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
^~~~~~~
ui_helpers.h:83:42: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:85:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
^~~~~~~
ui_helpers.h:85:43: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
^~~~~~~~~
ui_helpers.h:87:29: error: unknown type name ‘lv_obj_t’
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
ui_helpers.h:87:45: error: unknown type name ‘lv_obj_t’
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
ui_helpers.h:89:32: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
ui_helpers.h:89:48: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
ui_helpers.h:91:33: error: unknown type name ‘lv_obj_t’
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off);
^~~~~~~~
ui_helpers.h:91:49: error: unknown type name ‘lv_obj_t’
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off);
^~~~~~~~
ui_helpers.c:8:27: error: unknown type name ‘lv_obj_t’
void _ui_bar_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
ui_helpers.c:14:29: error: unknown type name ‘lv_obj_t’
void _ui_basic_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
ui_helpers.c:23:32: error: unknown type name ‘lv_obj_t’
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
ui_helpers.c:28:29: error: unknown type name ‘lv_obj_t’
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
^~~~~~~~
ui_helpers.c:28:56: error: unknown type name ‘uint8_t’
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
^~~~~~~
ui_helpers.c:33:29: error: unknown type name ‘lv_obj_t’
void _ui_label_set_property(lv_obj_t * target, int id, char * val)
^~~~~~~~
ui_helpers.c:39:30: error: unknown type name ‘lv_obj_t’
void _ui_roller_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
ui_helpers.c:45:30: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
ui_helpers.c:52:24: error: unknown type name ‘lv_obj_t’
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay)
^~~~~~~~
ui_helpers.c:52:43: error: unknown type name ‘lv_scr_load_anim_t’
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay)
^~~~~~~~~~~~~~~~~~
ui_helpers.c:57:24: error: unknown type name ‘lv_obj_t’
void _ui_arc_increment(lv_obj_t * target, int val)
^~~~~~~~
ui_helpers.c:63:24: error: unknown type name ‘lv_obj_t’
void _ui_bar_increment(lv_obj_t * target, int val, int anm)
^~~~~~~~
ui_helpers.c:69:27: error: unknown type name ‘lv_obj_t’
void _ui_slider_increment(lv_obj_t * target, int val, int anm)
^~~~~~~~
ui_helpers.c:75:22: error: unknown type name ‘lv_obj_t’
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
^~~~~~~~
ui_helpers.c:75:41: error: unknown type name ‘int32_t’
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
^~~~~~~
ui_helpers.c:84:23: error: unknown type name ‘lv_obj_t’
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
^~~~~~~~
ui_helpers.c:84:42: error: unknown type name ‘int32_t’
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
^~~~~~~
ui_helpers.c:94:22: error: unknown type name ‘lv_obj_t’
void _ui_opacity_set(lv_obj_t * target, int val)
^~~~~~~~
ui_helpers.c:99:30: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:99:45: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:104:30: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:104:45: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:109:34: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:109:49: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:114:35: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:114:50: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:119:36: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:119:51: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:124:39: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:124:54: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:129:40: error: unknown type name ‘lv_anim_t’
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
^~~~~~~~~
ui_helpers.c:129:55: error: unknown type name ‘int32_t’
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
^~~~~~~
ui_helpers.c:135:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
^~~~~~~
ui_helpers.c:135:33: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:140:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
^~~~~~~
ui_helpers.c:140:33: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:145:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
^~~~~~~
ui_helpers.c:145:37: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:150:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
^~~~~~~
ui_helpers.c:150:38: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:155:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
^~~~~~~
ui_helpers.c:155:39: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:160:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
^~~~~~~
ui_helpers.c:160:42: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:165:1: error: unknown type name ‘int32_t’
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
^~~~~~~
ui_helpers.c:165:43: error: unknown type name ‘lv_anim_t’
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
^~~~~~~~~
ui_helpers.c:170:29: error: unknown type name ‘lv_obj_t’
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
ui_helpers.c:170:45: error: unknown type name ‘lv_obj_t’
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
ui_helpers.c:177:32: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
ui_helpers.c:177:48: error: unknown type name ‘lv_obj_t’
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
ui_helpers.c:183:33: error: unknown type name ‘lv_obj_t’
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off)
^~~~~~~~
ui_helpers.c:183:49: error: unknown type name ‘lv_obj_t’
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off)
^~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui_comp.c: In function ‘ui_Button2_create’:
ui_comp.c:57:62: error: ‘_UI_COMP_BUTTON2_NUM’ undeclared (first use in this function)
lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_BUTTON2_NUM);
^~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui_comp.c:57:62: note: each undeclared identifier is reported only once for each function it appears in
ui_comp.c:58:14: error: ‘UI_COMP_BUTTON2_BUTTON2’ undeclared (first use in this function)
children[UI_COMP_BUTTON2_BUTTON2] = cui_Button2;
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui_comp.c: In function ‘ui_Roller2_create’:
ui_comp.c:81:62: error: ‘_UI_COMP_ROLLER2_NUM’ undeclared (first use in this function)
lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_ROLLER2_NUM);
^~~~~~~~~~~~~~~~~~~~
ui_comp.c:82:14: error: ‘UI_COMP_ROLLER2_ROLLER2’ undeclared (first use in this function)
children[UI_COMP_ROLLER2_ROLLER2] = cui_Roller2;
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU1_BUCCI1’:
ui.c:88:61: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_MENU3_BUCCI1, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c:88:61: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU1_BUCCI2’:
ui.c:97:61: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_MENU3_BUCCI2, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU1_BUCCI3’:
ui.c:106:61: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_MENU3_BUCCI3, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU1_BUCCI4’:
ui.c:115:61: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_MENU3_BUCCI4, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU3_BUCCI1’:
ui.c:148:53: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_HOME, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_event_MENU4_BUCCI1’:
ui.c:164:53: error: ‘_UI_MODIFY_STATE_TOGGLE’ undeclared (first use in this function)
_ui_state_modify(ui_HOME, LV_STATE_CHECKED, _UI_MODIFY_STATE_TOGGLE);
^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_HOME_screen_init’:
ui.c:191:49: error: ‘lv_font_montserrat_16’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_HOME_Button, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_MENU1_screen_init’:
ui.c:228:50: error: ‘lv_font_montserrat_16’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU1_BUCCI1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_MENU2_screen_init’:
ui.c:373:51: error: ‘lv_font_montserrat_26’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU1_Roller1, &lv_font_montserrat_26, LV_PART_SELECTED | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
ui.c:414:50: error: ‘lv_font_montserrat_20’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU2_Label1, &lv_font_montserrat_20, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_MENU3_screen_init’:
ui.c:548:53: error: ‘lv_font_montserrat_22’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU3_Countdown, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
ui.c:584:48: error: ‘lv_font_montserrat_20’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU3_STOP, &lv_font_montserrat_20, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_MENU4_screen_init’:
ui.c:679:54: error: ‘lv_font_montserrat_16’ undeclared (first use in this function); did you mean ‘lv_font_montserrat_14’?
lv_obj_set_style_text_font(ui_MENU3_Countdown1, &lv_font_montserrat_16, LV_PART_MAIN | LV_STATE_DEFAULT);
^~~~~~~~~~~~~~~~~~~~~
lv_font_montserrat_14
C:\Users\USER\Desktop\Bucci Simple UI\UI Export\BUCCI-Simple UI\ui\ui.c: In function ‘ui_init’:
ui.c:709:5: error: ‘LV_EVENT_GET_COMP_CHILD’ undeclared (first use in this function); did you mean ‘LV_EVENT_GET_SELF_SIZE’?
LV_EVENT_GET_COMP_CHILD = lv_event_register_id();
^~~~~~~~~~~~~~~~~~~~~~~
LV_EVENT_GET_SELF_SIZE
exit status 1
unknown type name ‘lv_obj_t’

Others

  • SquareLine Studio version:
    1.1.1
  • Operating system:
    Windows 10
  • Target hardware:
    ESP32 WROOM + ILI9341

It seems LVGL is missing from the project as the LVGL related types are not recognized.

Are you sure that LVGL is added to your project?

First I create a Template Project in a new folder, where I also Export the UI Files.
In this Folder I have the libraries (lvgl, TFT_eSPI) and ui folders.
in the lv_conf.h file, I activate the Fonts Im using and in User_Setup.h assign the Pins for the Display.
Open Arduino IDE, go to settings and change the Projects Folder.
When I compile I get these errors.

When I export files from an example Project, I do get the same File and Folder structers, but this time the compiling works and Im able to flash to ESP32

So I assume there must be an error with my Project when exporting

When you open you Arduino project do you see tabs with files form SLS(ui.c/h, etc)? If so, could you share your ZIPed project?

Yes it opens a lot of tabs, when the Error appears it jumps to ui_helpers.c tab

What version of LVGL do you have installed in your Library manager?

None, now I installed v8.3.3 but get mor or less same errors with:
unknown type name ‘lv_obj_t’

If you have only an empty setup() and loop() function and only include lvgl.h do you get any errors?

thanks for the hint. Tried it and got no errors.
Yesterday I tried, just for test purpouse, a new Project where I added a Text and a Button, an event to the button so when clicked it changes to screen 2, exportet the files and the compiling in Arduino IDE worked without errors.
So, I started with my Project agan from scratch by starting a new Project, and after I was done, exportet the files and voila the same compiling error.
Now what Im trying is by removing some components from my Project and try to compile, with the hope that one of the Images, Buttons, Text/Lables causes the fault. But so far had no luck.

Ok the problem with the compiling seems to be solwed.
I edited all PNG file from the Assetsfolder and exportet the Sketch files and was able to compile without errors. Seems like one of the PNGs caused and error in SquareLine when exporting.

Next problem I have is that the touch function is not working.
I have tested the touch functionality with the tft_espi examples and it works.
The touch does not work with my UI and neither the examples in SquareLine Studio.
I have not added additional code, I just want to check the UI as I do in SquarLine Studio with the Play function

Can you send the exported project. You can send in private too to support@squareline.io.

Did you use the “Arduino board” from SLS? It doesn’t contain a touch driver by default because we haven’t found a so generic touch library as TFT_eSPI. :slightly_frowning_face:

Yes, my Project settings are set to:
Board Group: Arduino
Board: Arduino with TFT_eSPI
Version: v1.0.1
LVGL: 8.3.3
Display width: 320, height: 240, Depth: 16 bit, Rotation 0 degree

After exporting Template & UI Files:

  • I change the pins in TFT_eSPI for my Display ( ILI9341 with touch XPT2046)
  • in lv_conf.h set to 1 used font sizes.

In ui.ino I added some code to check if touch input is recognized:

#define CALIBRATION_FILE "/TouchCalData1"

#define REPEAT_CAL false

in void my_disp_flush

touch_calibrate();

in void loop()

uint16_t x, y;
  tft.getTouchRaw(&x, &y);
  Serial.printf("x: %i     ", x);
  Serial.printf("y: %i     ", y);
  Serial.printf("z: %i \n", tft.getTouchRawZ());
  delay(500);

and

void touch_calibrate()
{
  uint16_t calData[5];
  uint8_t calDataOK = 0;

  // check file system exists
  if (!SPIFFS.begin()) {
    Serial.println("Formating file system");
    SPIFFS.format();
    SPIFFS.begin();
  }

  // check if calibration file exists and size is correct
  if (SPIFFS.exists(CALIBRATION_FILE)) {
    if (REPEAT_CAL)
    {
      // Delete if we want to re-calibrate
      SPIFFS.remove(CALIBRATION_FILE);
    }
    else
    {
      File f = SPIFFS.open(CALIBRATION_FILE, "r");
      if (f) {
        if (f.readBytes((char *)calData, 14) == 14)
          calDataOK = 1;
        f.close();
      }
    }
  }

  if (calDataOK && !REPEAT_CAL) {
    // calibration data valid
    tft.setTouch(calData);
  } else {
    // data not valid so recalibrate
    tft.fillScreen(TFT_BLACK);
    tft.setCursor(20, 0);
    tft.setTextFont(2);
    tft.setTextSize(1);
    tft.setTextColor(TFT_WHITE, TFT_BLACK);

    tft.println("Touch corners as indicated");

    tft.setTextFont(1);
    tft.println();

    if (REPEAT_CAL) {
      tft.setTextColor(TFT_RED, TFT_BLACK);
      tft.println("Set REPEAT_CAL to false to stop this running again!");
    }

    tft.calibrateTouch(calData, TFT_MAGENTA, TFT_BLACK, 15);

    tft.setTextColor(TFT_GREEN, TFT_BLACK);
    tft.println("Calibration complete!");

    // store data
    File f = SPIFFS.open(CALIBRATION_FILE, "w");
    if (f) {
      f.write((const unsigned char *)calData, 14);
      f.close();
    }
  }
}

After flashing, I open the Serial monitor and when Touching the Display, I can see the values of X, Y & Z change but the UI does not respond to my input

Since I cannot upload the Project here due to size limitation, here is a download Link from dropbox:

Dropbox - GUI Test, Touch not working.zip - Simplify your life

So, what do I have to do or add so that my touch input gets detected? Im a beginner at coding, but Im very good at googling and have been looking for solution online these days, but so far no luck

Did you pay attention to this about TFT_eSPI’s touch support?

Yes, Ive gone through that. Touch and Display are in SPI mode, and the chip select line is also defined.
So which part do you exactly mean? Im confused now, my hardware is working, but there is no reaction with the UI/Events

Ok just want to inform that now I got everything working. Had to includ Touch library and calibrate.

As for the compiling error with

unknown type name ‘lv_obj_t’

That was caused because my Project name had space letter inbetween.
for e.g.: E Bike Menu GUI renamed to E_Bike_Menu_GUI

The Project name is defined in ui.h

#ifndef _E_Bike_Menu_GUI_UI_UI_H
#define _E_Bike_Menu_GUI_UI_UI_H

Now having space letters here will give compiling error.

Porblem solved!

Thanks for your help

1 Like