lvgl / lv_port_renesas_ek-ra8d1_gcc

3 stars 3 forks source link

Renesas LVGL not capable of Bare Metal? #10

Open FloHomi opened 5 months ago

FloHomi commented 5 months ago

Hi, The code is, as far I understand, not capable of bare metal. I have some projects without external sram and therefore have only limited recources. renesas_glcdc for example does not check for rtos or not and throws an error.

#ifdef _RENESAS_RA_
    #include "LVGL_thread.h"

I added instead "hal_data.h" to fix the error, but the screen still did not show anything...

Has someone tried it or has a idea?

kisvegabor commented 5 months ago

Thank you for reporting it. We haven't tried without OS yet as it seems FreeRTOS is used in Dave2D too.

@becseya can you take a look at it?

becseya commented 4 months ago

LVGL_thread.h is a core component of this project, it glues everything together. And it does not get generated if the FreeRTOS component is disabled.

Running bare metal would require significant changes, which I would discuss internally before doing so.

FloHomi commented 4 months ago

That would be great! Thanks for all your great work here you two :-)

becseya commented 4 months ago

@jeremy-baker We looked into files generated by FSP, and found that crucial global variables (g_display0_ctrl, g_display0_cfg, g_i2c_master1_ctrl, etc. defined in ra_gen/common_data.c and ra_gen/LVGL_thread.c) are not being generated if FreeRTOS component is removed from the configuration.xml.

Is there a way to support a bare metal application via FSP?

jeremy-baker commented 4 months ago

@becseya you would need to create a new FSP project, and choose No RTOS, and add the required components (you can export the configuration from the existing FreeROTS based project, and import it into the bare metal project configuration). The structure of the code would be different for a bare-metal project, so different include files would be required.

becseya commented 4 months ago

@jeremy-baker what do you mean by "component export"? I've tried the following methods with no success:

jeremy-baker commented 4 months ago

I mean export the configuration of a stack, e.g. exporting the Graphic LCD stack from the configuration of a working project, and importing the configuration into a new project. In the project that already has the stack configured (e.g. Graphics LCD (r_glcdc), right click on the component and select "Export", to export the configuration to an XML file :-

image

Then to import that into a different project, right click in the stacks area of the configurator (the red box shows where I clicked), and select "Import" :-

image.

If you want to export a pin configuration from one project, go to the pins tab of hte configurator, click on "Manage Configuration...", then select the pin configuration to export, and click "Export" :-

image

Import a pin configuration from the same place, using the "Import" button.