Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE) #361

Closed
vivanovc opened this issue May 7, 2024 · 2 comments
Closed

Bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE) #361

vivanovc opened this issue May 7, 2024 · 2 comments
Assignees
Milestone

Comments

@vivanovc
Copy link

vivanovc commented May 7, 2024

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();
}

Note: Different font sizes have to be enabled in lv_conf.h file already located in C:\Users{username}\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.1.1\libraries\Arduino_H7_Video\src\lv_conf.h
Find the FONT USAGE section, here you can see all the font sizes. See https://docs.arduino.cc/tutorials/giga-display-shield/lvgl-guide/#text

  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 vivanovc changed the title EEZ Studio 0.12.0 bug and fixes with Arduino Giga R1 WiFi (Arduino IDE). EEZ Studio 0.12.0 bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE). May 7, 2024
@mvladic mvladic self-assigned this May 8, 2024
@mvladic mvladic added this to the M19 milestone May 8, 2024
@mvladic
Copy link
Contributor

mvladic commented May 9, 2024

  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"

Fixed. This was error in LVGL templates where instead of #include "lvgl/lvgl.h" it should be //${eez-studio LVGL_INCLUDE}.

@mvladic
Copy link
Contributor

mvladic commented May 9, 2024

  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));

This example and other LVGL examples with the same error are fixed now.

@prasimix prasimix changed the title EEZ Studio 0.12.0 bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE). Bugs and fixes with Arduino Giga R1 WiFi (Arduino IDE) May 9, 2024
@mvladic mvladic closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants