Description
trying to run bare project with one obj in esp32 but screen does not open, the setup in pinmode is the same probably display and buffer setup are not the same. Demo is what is is as lv_port_32 and my project uses in half the two templates inside the lvgl/examples/porting
The timer is copied by the demo project.
What MCU/Processor/Board and compiler are you using?
esp32, esp-idf5.0.1
What LVGL version are you using?
8.3/release
Code to reproduce
My main.c is now
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_freertos_hooks.h"
#include "freertos/semphr.h"
#include "esp_timer.h"
#include "esp_system.h"
#include "driver/gpio.h"
#include "lvgl/lvgl.h"
#include "lvgl_helpers.h"
#include "lv_port_disp.h"
#include "lv_port_indev.h"
SemaphoreHandle_t xGuiSemaphore;
static void run_application(void);
static void lv_tick_task(void *arg);
static void guiTask(void *pvParameter);
void app_main(void)
{
xTaskCreatePinnedToCore(guiTask, "gui", 4096*2, NULL, 0, NULL, 1);
}
static void run_application(void){
lv_obj_t * scr = lv_disp_get_scr_act(NULL);
/*Create a Label on the currently active screen*/
lv_obj_t * label1 = lv_label_create(scr);
/*Modify the Label's text*/
lv_label_set_text(label1, "Hello\nworld");
/* Align the Label to the center
* NULL means align on parent (which is the screen now)
* 0, 0 at the end means an x, y offset after alignment*/
lv_obj_align(label1, LV_ALIGN_CENTER, 0, 0);
}
static void lv_tick_task(void *arg) {
(void) arg;
lv_tick_inc(portTICK_PERIOD_MS);
}
static void guiTask(void *pvParameter) {
(void) pvParameter;
xGuiSemaphore = xSemaphoreCreateMutex();
lv_init();
lvgl_driver_init();
lv_port_disp_init();
lv_port_indev_init();
const esp_timer_create_args_t periodic_timer_args = {
.callback = &lv_tick_task,
.name = "periodic_gui"
};
esp_timer_handle_t periodic_timer;
ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, portTICK_PERIOD_MS * 1000));
run_application();
while (1) {
/* Delay 1 tick (assumes FreeRTOS tick is 10ms */
vTaskDelay(pdMS_TO_TICKS(10));
/* Try to take the semaphore, call lvgl related function on success */
if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY)) {
lv_task_handler();
xSemaphoreGive(xGuiSemaphore);
}
}
vTaskDelete(NULL);
}
Screenshot and/or video
what you see on monitro are differences on buffer size etc. here are the printscreens