How to port LVGL to the RA6M3 processor?

Thanks for the reply.
Yesterday I did not get very far with hardware acceleration so indeed trying software rendering first is a better approach.

Following the porting guide, at one point I came across the custom flush callback function and I’m not sure how this works exactly. Could you perhaps explain the following:

  • When is this lv_disp_drv_t.flush_cb callback supposed to be called? Setting a breakpoint to some arbitrary function inside the callback never seems to trigger.
  • What am I supposed to inside this function? I thought LVGL filled the framebuffer and then this framebuffer would have to be passed to the display inside this callback. But now I’m no longer sure.

EDIT: I suppose something would have to be drawn to the framebuffer in order for the callback to trigger.

I’ve now done the following:

#include "app_thread.h"

#include "lvgl.h"

#define TICK_MS_TIME 5

#define DISP_HOR_RES 480
#define DISP_VER_RES 272

//DRAW BUFFER
static lv_disp_draw_buf_t draw_buf;
static lv_color_t buf1[DISP_HOR_RES];

//DISPLAY DRIVER
static lv_disp_drv_t disp_drv;

void my_flush_cb();

const display_status_t* displayStatus;

/* Application Thread entry function */
/* pvParameters contains TaskHandle_t */
void app_thread_entry(void *pvParameters)
{
    FSP_PARAMETER_NOT_USED (pvParameters);

//    SETUP TIMER RELATED FUNCTIONALITY
    xTimerChangePeriod(g_timer_lvgl, pdMS_TO_TICKS(TICK_MS_TIME), 0 );
    xTimerStart(g_timer_lvgl, 0);

    //START LVGL
    lv_init();

//    INIT DRAW BUFFER
    lv_disp_draw_buf_init(&draw_buf, buf1, NULL, DISP_HOR_RES);

    //INIT DISPLAY DRIVER
    lv_disp_drv_init(&disp_drv);
    disp_drv.draw_buf = &draw_buf;
    disp_drv.hor_res = DISP_HOR_RES;
    disp_drv.ver_res = DISP_VER_RES;
    disp_drv.flush_cb = my_flush_cb;

    lv_obj_t* label = lv_label_create(lv_scr_act());
    lv_label_set_text(label, "TEST");
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

    while (1)
    {
        vTaskDelay (1);
    }
}

void g_timer_lvgl_callback(TimerHandle_t xTimer)
{
    FSP_PARAMETER_NOT_USED(xTimer);

    lv_tick_inc(TICK_MS_TIME);
}

void my_flush_cb()
{
    //DO SOMETHING WITH LCD.... (r_gcldc)
    lv_disp_flush_ready(&disp_drv);
}

However, this causes the program to crash immediately, I’ve seen this specific error before when there was not enough memory available for the thread. However I’ve already allocated 0x4000 bytes (16 KB) just to be sure and that doesn’t fix it. Any idea what I could be doing wrong? It runs fine until I try to create the label to draw it to the buffer with lv_obj_t* label = lv_label_create(lv_scr_act());.

Kind regards,
Tinus