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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Squareline Studio example to LVGL 9.1 #31

Merged

Conversation

aliphys
Copy link
Member

@aliphys aliphys commented Jun 7, 2024

As described in #29 , SquareLine Studio now:

  • Supports LVGL9.1
  • Allows for export of the library/UI files

This PR modifies the existing squarelinestudio_lvgl_v8.ino sketch, in line with the updates made to SquareLine Studio to undo regressions. 馃専

Closes #29

@aliphys
Copy link
Member Author

aliphys commented Jun 7, 2024

When compiling the squarelinestudio_lvgl.ino sketch new libraries/UI folder from Squareline Studio with LVGL9.1, there is an undefined reference to ui_init().

C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\13EED99990BB5BE14B654F6C77474EA5\sketch\objs.a(squarelinestudio_lvgl.ino.cpp.o): In function `setup':
C:\GitHub\Arduino\Arduino_GigaDisplay\examples\lvgl\squarelinestudio_lvgl/squarelinestudio_lvgl.ino:37: undefined reference to `ui_init'
collect2.exe: error: ld returned 1 exit status

Using library Arduino_H7_Video at version 1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.1.3\libraries\Arduino_H7_Video 
Using library Arduino_GigaDisplayTouch at version 1.0.1 in folder: C:\Users\Ali Jahangiri\Documents\Arduino\libraries\Arduino_GigaDisplayTouch 
Using library Wire in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.1.3\libraries\Wire (legacy)
Using library lvgl at version 9.1.0 in folder: C:\Users\Ali Jahangiri\Documents\Arduino\libraries\lvgl 
Using library Portenta_SDRAM at version 1.0 in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.1.3\libraries\Portenta_SDRAM 
Using library ea_malloc in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.1.3\libraries\ea_malloc (legacy)
exit status 1

Compilation error: exit status 1

I see that the following line is not changed between the previous version:

@leonardocavagnis can you advise on this?

Copy link

github-actions bot commented Jun 7, 2024

Memory usage change @ d9d24d7

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table
Board examples/backlight/SimpleBacklight
flash
% examples/backlight/SimpleBacklight
RAM for global variables
% examples/basic/ArduinoLogoDrawing
flash
% examples/basic/ArduinoLogoDrawing
RAM for global variables
% examples/basic/SimpleText
flash
% examples/basic/SimpleText
RAM for global variables
% examples/camera/display_camera
flash
% examples/camera/display_camera
RAM for global variables
% examples/gfx/geometrical-shapes
flash
% examples/gfx/geometrical-shapes
RAM for global variables
% examples/gfx/hello-world
flash
% examples/gfx/hello-world
RAM for global variables
% examples/gfx/touch-switch
flash
% examples/gfx/touch-switch
RAM for global variables
% examples/imu/accelerometer
flash
% examples/imu/accelerometer
RAM for global variables
% examples/imu/gyroscope
flash
% examples/imu/gyroscope
RAM for global variables
% examples/lvgl/bar_lvgl
flash
% examples/lvgl/bar_lvgl
RAM for global variables
% examples/lvgl/button_lvgl
flash
% examples/lvgl/button_lvgl
RAM for global variables
% examples/lvgl/check_radio_lvgl
flash
% examples/lvgl/check_radio_lvgl
RAM for global variables
% examples/lvgl/image_lvgl
flash
% examples/lvgl/image_lvgl
RAM for global variables
% examples/lvgl/imu_orientation
flash
% examples/lvgl/imu_orientation
RAM for global variables
% examples/lvgl/slider_lvgl
flash
% examples/lvgl/slider_lvgl
RAM for global variables
% examples/microphone/PDMSerialPlotter
flash
% examples/microphone/PDMSerialPlotter
RAM for global variables
% examples/rgb/SimpleRGB
flash
% examples/rgb/SimpleRGB
RAM for global variables
% examples/rgb/blink
flash
% examples/rgb/blink
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/backlight/SimpleBacklight<br>flash,%,examples/backlight/SimpleBacklight<br>RAM for global variables,%,examples/basic/ArduinoLogoDrawing<br>flash,%,examples/basic/ArduinoLogoDrawing<br>RAM for global variables,%,examples/basic/SimpleText<br>flash,%,examples/basic/SimpleText<br>RAM for global variables,%,examples/camera/display_camera<br>flash,%,examples/camera/display_camera<br>RAM for global variables,%,examples/gfx/geometrical-shapes<br>flash,%,examples/gfx/geometrical-shapes<br>RAM for global variables,%,examples/gfx/hello-world<br>flash,%,examples/gfx/hello-world<br>RAM for global variables,%,examples/gfx/touch-switch<br>flash,%,examples/gfx/touch-switch<br>RAM for global variables,%,examples/imu/accelerometer<br>flash,%,examples/imu/accelerometer<br>RAM for global variables,%,examples/imu/gyroscope<br>flash,%,examples/imu/gyroscope<br>RAM for global variables,%,examples/lvgl/bar_lvgl<br>flash,%,examples/lvgl/bar_lvgl<br>RAM for global variables,%,examples/lvgl/button_lvgl<br>flash,%,examples/lvgl/button_lvgl<br>RAM for global variables,%,examples/lvgl/check_radio_lvgl<br>flash,%,examples/lvgl/check_radio_lvgl<br>RAM for global variables,%,examples/lvgl/image_lvgl<br>flash,%,examples/lvgl/image_lvgl<br>RAM for global variables,%,examples/lvgl/imu_orientation<br>flash,%,examples/lvgl/imu_orientation<br>RAM for global variables,%,examples/lvgl/slider_lvgl<br>flash,%,examples/lvgl/slider_lvgl<br>RAM for global variables,%,examples/microphone/PDMSerialPlotter<br>flash,%,examples/microphone/PDMSerialPlotter<br>RAM for global variables,%,examples/rgb/SimpleRGB<br>flash,%,examples/rgb/SimpleRGB<br>RAM for global variables,%,examples/rgb/blink<br>flash,%,examples/rgb/blink<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@aliphys aliphys force-pushed the squarelineStudioLVGL9 branch 2 times, most recently from a0f0608 to 17ab800 Compare June 7, 2024 08:12
Co-authored-by: Leonardo Cavagnis <[email protected]>
@aliphys
Copy link
Member Author

aliphys commented Jun 7, 2024

Following recommendations from @leonardocavagnis , the example now works. The UI folder must be located within the Arduino/libraries folder of the local installation, not the sketch itself.
image

@aliphys aliphys marked this pull request as ready for review June 7, 2024 08:18
Copy link

github-actions bot commented Jun 7, 2024

Memory usage change @ bcabf18

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table
Board examples/backlight/SimpleBacklight
flash
% examples/backlight/SimpleBacklight
RAM for global variables
% examples/basic/ArduinoLogoDrawing
flash
% examples/basic/ArduinoLogoDrawing
RAM for global variables
% examples/basic/SimpleText
flash
% examples/basic/SimpleText
RAM for global variables
% examples/camera/display_camera
flash
% examples/camera/display_camera
RAM for global variables
% examples/gfx/geometrical-shapes
flash
% examples/gfx/geometrical-shapes
RAM for global variables
% examples/gfx/hello-world
flash
% examples/gfx/hello-world
RAM for global variables
% examples/gfx/touch-switch
flash
% examples/gfx/touch-switch
RAM for global variables
% examples/imu/accelerometer
flash
% examples/imu/accelerometer
RAM for global variables
% examples/imu/gyroscope
flash
% examples/imu/gyroscope
RAM for global variables
% examples/lvgl/bar_lvgl
flash
% examples/lvgl/bar_lvgl
RAM for global variables
% examples/lvgl/button_lvgl
flash
% examples/lvgl/button_lvgl
RAM for global variables
% examples/lvgl/check_radio_lvgl
flash
% examples/lvgl/check_radio_lvgl
RAM for global variables
% examples/lvgl/image_lvgl
flash
% examples/lvgl/image_lvgl
RAM for global variables
% examples/lvgl/imu_orientation
flash
% examples/lvgl/imu_orientation
RAM for global variables
% examples/lvgl/slider_lvgl
flash
% examples/lvgl/slider_lvgl
RAM for global variables
% examples/microphone/PDMSerialPlotter
flash
% examples/microphone/PDMSerialPlotter
RAM for global variables
% examples/rgb/SimpleRGB
flash
% examples/rgb/SimpleRGB
RAM for global variables
% examples/rgb/blink
flash
% examples/rgb/blink
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/backlight/SimpleBacklight<br>flash,%,examples/backlight/SimpleBacklight<br>RAM for global variables,%,examples/basic/ArduinoLogoDrawing<br>flash,%,examples/basic/ArduinoLogoDrawing<br>RAM for global variables,%,examples/basic/SimpleText<br>flash,%,examples/basic/SimpleText<br>RAM for global variables,%,examples/camera/display_camera<br>flash,%,examples/camera/display_camera<br>RAM for global variables,%,examples/gfx/geometrical-shapes<br>flash,%,examples/gfx/geometrical-shapes<br>RAM for global variables,%,examples/gfx/hello-world<br>flash,%,examples/gfx/hello-world<br>RAM for global variables,%,examples/gfx/touch-switch<br>flash,%,examples/gfx/touch-switch<br>RAM for global variables,%,examples/imu/accelerometer<br>flash,%,examples/imu/accelerometer<br>RAM for global variables,%,examples/imu/gyroscope<br>flash,%,examples/imu/gyroscope<br>RAM for global variables,%,examples/lvgl/bar_lvgl<br>flash,%,examples/lvgl/bar_lvgl<br>RAM for global variables,%,examples/lvgl/button_lvgl<br>flash,%,examples/lvgl/button_lvgl<br>RAM for global variables,%,examples/lvgl/check_radio_lvgl<br>flash,%,examples/lvgl/check_radio_lvgl<br>RAM for global variables,%,examples/lvgl/image_lvgl<br>flash,%,examples/lvgl/image_lvgl<br>RAM for global variables,%,examples/lvgl/imu_orientation<br>flash,%,examples/lvgl/imu_orientation<br>RAM for global variables,%,examples/lvgl/slider_lvgl<br>flash,%,examples/lvgl/slider_lvgl<br>RAM for global variables,%,examples/microphone/PDMSerialPlotter<br>flash,%,examples/microphone/PDMSerialPlotter<br>RAM for global variables,%,examples/rgb/SimpleRGB<br>flash,%,examples/rgb/SimpleRGB<br>RAM for global variables,%,examples/rgb/blink<br>flash,%,examples/rgb/blink<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@aliphys
Copy link
Member Author

aliphys commented Jun 7, 2024

Example also works with LVGL 8.4 (so should not break existing code created previously )
image

@aliphys
Copy link
Member Author

aliphys commented Jun 7, 2024

When comparing compilation time (Intel Core i7-1360P @ 2.20 GHz, 32 GB RAM, Windows 10) between LVGL8.4 and LVGL9.1: LVGL9,1 is about 60% slower.

LVGL Version Compile 1 (m:s) Compile 2 (m:s) Compile 3 (m:s)
8.4 1:41 1:40 1:41
9.1 2:41 2:38 2:34

Between each run, the library cache was emptied by switching the board as described by @per1234 here.

Could possibly be improved by arduino/arduino-cli#2625

Does not cause any breaking changes. So we can continue with the PR.

Copy link
Contributor

@leonardocavagnis leonardocavagnis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good!
Thanks Ali for the help!

Copy link

Memory usage change @ 1a90344

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table
Board examples/backlight/SimpleBacklight
flash
% examples/backlight/SimpleBacklight
RAM for global variables
% examples/basic/ArduinoLogoDrawing
flash
% examples/basic/ArduinoLogoDrawing
RAM for global variables
% examples/basic/SimpleText
flash
% examples/basic/SimpleText
RAM for global variables
% examples/camera/display_camera
flash
% examples/camera/display_camera
RAM for global variables
% examples/gfx/geometrical-shapes
flash
% examples/gfx/geometrical-shapes
RAM for global variables
% examples/gfx/hello-world
flash
% examples/gfx/hello-world
RAM for global variables
% examples/gfx/touch-switch
flash
% examples/gfx/touch-switch
RAM for global variables
% examples/imu/accelerometer
flash
% examples/imu/accelerometer
RAM for global variables
% examples/imu/gyroscope
flash
% examples/imu/gyroscope
RAM for global variables
% examples/lvgl/bar_lvgl
flash
% examples/lvgl/bar_lvgl
RAM for global variables
% examples/lvgl/button_lvgl
flash
% examples/lvgl/button_lvgl
RAM for global variables
% examples/lvgl/check_radio_lvgl
flash
% examples/lvgl/check_radio_lvgl
RAM for global variables
% examples/lvgl/image_lvgl
flash
% examples/lvgl/image_lvgl
RAM for global variables
% examples/lvgl/imu_orientation
flash
% examples/lvgl/imu_orientation
RAM for global variables
% examples/lvgl/slider_lvgl
flash
% examples/lvgl/slider_lvgl
RAM for global variables
% examples/microphone/PDMSerialPlotter
flash
% examples/microphone/PDMSerialPlotter
RAM for global variables
% examples/rgb/SimpleRGB
flash
% examples/rgb/SimpleRGB
RAM for global variables
% examples/rgb/blink
flash
% examples/rgb/blink
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/backlight/SimpleBacklight<br>flash,%,examples/backlight/SimpleBacklight<br>RAM for global variables,%,examples/basic/ArduinoLogoDrawing<br>flash,%,examples/basic/ArduinoLogoDrawing<br>RAM for global variables,%,examples/basic/SimpleText<br>flash,%,examples/basic/SimpleText<br>RAM for global variables,%,examples/camera/display_camera<br>flash,%,examples/camera/display_camera<br>RAM for global variables,%,examples/gfx/geometrical-shapes<br>flash,%,examples/gfx/geometrical-shapes<br>RAM for global variables,%,examples/gfx/hello-world<br>flash,%,examples/gfx/hello-world<br>RAM for global variables,%,examples/gfx/touch-switch<br>flash,%,examples/gfx/touch-switch<br>RAM for global variables,%,examples/imu/accelerometer<br>flash,%,examples/imu/accelerometer<br>RAM for global variables,%,examples/imu/gyroscope<br>flash,%,examples/imu/gyroscope<br>RAM for global variables,%,examples/lvgl/bar_lvgl<br>flash,%,examples/lvgl/bar_lvgl<br>RAM for global variables,%,examples/lvgl/button_lvgl<br>flash,%,examples/lvgl/button_lvgl<br>RAM for global variables,%,examples/lvgl/check_radio_lvgl<br>flash,%,examples/lvgl/check_radio_lvgl<br>RAM for global variables,%,examples/lvgl/image_lvgl<br>flash,%,examples/lvgl/image_lvgl<br>RAM for global variables,%,examples/lvgl/imu_orientation<br>flash,%,examples/lvgl/imu_orientation<br>RAM for global variables,%,examples/lvgl/slider_lvgl<br>flash,%,examples/lvgl/slider_lvgl<br>RAM for global variables,%,examples/microphone/PDMSerialPlotter<br>flash,%,examples/microphone/PDMSerialPlotter<br>RAM for global variables,%,examples/rgb/SimpleRGB<br>flash,%,examples/rgb/SimpleRGB<br>RAM for global variables,%,examples/rgb/blink<br>flash,%,examples/rgb/blink<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@leonardocavagnis leonardocavagnis merged commit 6536ab5 into arduino-libraries:main Jun 12, 2024
5 checks passed
@aliphys aliphys deleted the squarelineStudioLVGL9 branch June 12, 2024 07:52
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

Successfully merging this pull request may close these issues.

Port squarelinestudio_lvgl_v8.ino to LVGLv9
2 participants