Evaluating Square Line for Renesas RA6M3 family

What do you want to achieve?

Our company is evaluating Square line for different platforms. One important uC family for us is Renesas RA6M3, but we haven’t seen Square Line support in regards so far (v1.3.2)

What have you tried so far?

I’m in direct contact with Renesas and they tell me they’ll support in next Renesas FSP (Flexible Support package) LVGL. They redirect me to


But there I find and implementation using RT-Thread, Keil MDK compiler and a specific Software architecture oriented to a specific 3rd party Kit. It’s using RT-Thread Studio, where I find a check box regarding Support Square Line studio.

Inspecting Square line Studio V1.3.2 I’m not able to see Renesas RA6M3 target for code generation.

At this point I have some questions:

Is really possible to use Square Line to easily design navigations for RA6M3 the same way we could do for other uC’s, such as ST ? Do we need extra work ? How ?

If so, are we necessarily linked to the set of tools/tool chains offered by RT-Thread ? In case of Renesas we’re interested in using Square Line, e2studio, freeRTOS and gcc compiler.

Thanks in advance,

Ignasi Villagrasa

Hi Ignasi,

There there stages of making SquareLine Studio work on any board:

  1. Make the display work. It means just to be able to display an image, paint it to red, etc without LVGL and SquareLine
  2. Port LVGL to the board. If 1) is done, usually it’s quite simple. See Porting — LVGL documentation
  3. Export the UI files from SquareLine right into your project. These files are platform independent and can be integrated into any project. After that you just need to call ui_init() the create the UI.

So my question is, 1) is already working for you?

Hi Gabor,

Thanks for your answer. Just let me explain where we’re blocked.

Step 1. ok without problems.

Step 2. We have followed Porting documentation https://docs.lvgl.io/8.0/porting/index.html:


Added lvgl plus lv_conf.h file
Included need coded to init, config and register lvlg
Included code to init RA6M driver
Call to lvgl example

At this point project compiles and runs, but nothing is displayed.

It seems I’m not able to upload files for revision. Just let me know how to proceed.

Thanks in avance,


Please check the followings:


//your driver init

//Paint the screen to green just to be sure it's working

//Use the code from here: https://docs.lvgl.io/8.3/intro/index.html#why-do-i-see-only-garbage-on-the-screen


We have applied your suggestion about put screen in green, but is not working either
Our guess is that we’re missing something at my_flush_cb related to r_gldc
Now looks like:
void my_flush_cb (lv_disp_drv_t* displaydrv, const lv_area_t* area, lv_color_t* color_p)



Thnks !!!

Hi, Gabor.

Could you check if our guess about my_flush_cb, reported by my colleague Pjbesora, is in the right direction ?

Thanks in advance,

You are most definitely missing something! You need to actually write something to the buffer that r_glcdc uses for drawing to the display. Most likely it is called fb_background. Check the settings for the driver in your configuration.

I have already gotten LVGL working on RA6M3(G), perhaps this forum post points you in the right direction… How to port LVGL to the RA6M3 processor? - #3 by Tinus - Get started - LVGL Forum

Here is the simplest function I could make that writes the pixels to the GLCDC framebuffer:

void simple_buffer_flush_cb(lv_disp_drv_t* disp_drv, const lv_area_t* area, lv_color_t* color_p)
    int32_t x = 0;
    int32_t y = 0;
    uint32_t drawPos = 0;
    for(y = area->y1; y <= area->y2; y++) {
        for(x = area->x1; x <= area->x2; x++) {
            drawPos = (uint32_t)(y * disp_drv->hor_res + x);

            uint8_t col1 = (uint8_t)(color_p->full & 0xff);
            uint8_t col2 = (uint8_t)(color_p->full >> 8);

            frameBuffer[drawPos * 2] = col1;
            frameBuffer[(drawPos * 2)+1] = col2;



the framebuffer variable in this case is a globally defined variable that points to fb_background[0]. This is all very specific to Renesas BSP functionality though, so I suggest we move these technical details over to the LVGL forums where they belong.

Kind regards

Thnks a lot
We will test these and if new questions arise, will be posted at LVGL forum

I’ve been able to make the display run with your comments. The key was using fb_background

Thanks again

1 Like

Regarding the original question for this topic, once the proper buffer update is applied to the callback, it has been possible to integrate a basic ui generated with SquareLine into the project and display it.
So topic can be closed as solved.
Thanks again