studio icon indicating copy to clipboard operation
studio copied to clipboard

EEZ Studio 0.12.0 bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE).

Open vivanovc opened this issue 1 month ago • 0 comments

Setup: A standard Arduino Giga Display shield was installed on Arduino Giga. The latest Arduino IDE 2.3.2, Windows 10 with PC connection over USB-C on Giga. LVGL 8.9.11 library and the latest Arduino_GigaDisplayTouch and Arduino_H7_Video with dependencies, like Arduino_GigaDisplay_GFX, etc were installed. LVGL examples (from Arduino libraries, not from EEZ) were successfully tested prior work with EEZ Studio.

  1. Bug: In the build files sometimes need to find and replace #include "lvgl/lvgl.h" with #include "lvgl.h" despite in Settings/Build/LVGL include was "lvgl.h"

  2. Not a bug, but a working example of .ino file

#include ".h"
#include "Arduino_GigaDisplayTouch.h"
#include "lvgl.h"

#include <eez-framework.h> // for eez-framwork only
#include "ui.h"

/* Initialize the GIGA Display Shield with a resolution of 800x480 pixels */
Arduino_H7_Video Display(800, 480, GigaDisplayShield);
Arduino_GigaDisplayTouch Touch;

void setup() {
    Display.begin();
    Touch.begin();

    ui_init();
}

void loop() {
    lv_timer_handler();
    ui_tick();
}
  1. For EEZ Framework the following Arduino compiler bugs were found: C:\Users\ivano\Documents\Arduino\EEZ_framework_example\ui.c:7:1: error: unknown type name 'ActionExecFunc' C:\Users\ivano\Documents\Arduino\libraries\eez-framework\src/eez/flow/lvgl_api.h:23:10: fatal error: lvgl/lvgl.h: No such file or directory

To fix add to ui.h the following:

#ifndef EEZ_FOR_LVGL //fix for 'ActionExecFunc'
#define EEZ_FOR_LVGL 
#endif // EEZ_FOR_LVGL

#ifndef LV_LVGL_H_INCLUDE_SIMPLE //fix for lvgl/lvgl.h in lvgl_api.h
#define LV_LVGL_H_INCLUDE_SIMPLE
#endif // LV_LVGL_H_INCLUDE_SIMPLE
  1. Another bug with importing GUI examples, for example LVGL “Smart Home”, 800x480 resolution C:\Users\ivano\Documents\Arduino\EEZ_FW_variables\ui.c:7:5: error: too few arguments to function 'eez_flow_init' eez_flow_init(assets, sizeof(assets), (lv_obj_t **)&objects, sizeof(objects), images, sizeof(images));

To fix correct ui.c as

//define 'actions'
ActionExecFunc actions[] = {  
    0
};

// add 'actions' as the last argument for 'eez_flow_init'
void ui_init() {
    eez_flow_init(assets, sizeof(assets), (lv_obj_t **)&objects, sizeof(objects), images, sizeof(images), actions);
}
  1. Bug of Arduino IDE (not EEZ Studio): sometimes the folders C:\Users\user_name\AppData\Local\Temp\arduino\sketches... might have multiple definitions for the same project. Just delete all these folders.

Note, that "Arduino_H7_Video 7" library officially supports LVGL v8.3.x and not LVGL v9.0.x

vivanovc avatar May 07 '24 21:05 vivanovc