Lv_scr_act: no display registered to get its top layer

Infinte loop at running hello world tutorial

I’ve built a project where i would like to display the hello world tutorial.

What MCU/Processor/Board and compiler are you using?

I’m compiling on ESP32 Wrover Kit 4.1v.

What do you want to achieve?

I want to run the tutorial without problems.

What have you tried so far?

I’ve created the CMakeList after the tutorial for esp32. I’ve added the library to a “blink.c” project template. It is runnable, if the app_main function si empty, the program is flashed without problems. I’ve included “lv_tutorial_hello_world.h” and called the “lv_tutorial_hello_world()” function. It runs but it enters a infinte loop with the following warning (see “warning.jpg”).
I’ve added 4 screenshots with the running logs.

Code to reproduce

Add the relevant code snippets here.

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "sdkconfig.h"
#include "../components/lv_port_esp32/components/lv_examples/lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.h"

void app_main(void)
{
	lv_tutorial_hello_world();
}

Screenshot and/or video

You also need to register a display.

It appears that you are trying to create your own project. In that case, you should be following the initialization steps outlined in the documentation.

1 Like

I think you added https://github.com/lvgl/lv_port_esp32 to your project, if so you can copy the main file of the lv_port_esp32 repo into your project main and edit some lines, from the top of my head (I don’t have a Wrover kit available to test it):

Instead of

#include "lv_examples/lv_apps/demo/demo.h"

include

#include "lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.h"

and instead of

demo_create();

in line 111 place

lv_tutorial_hello_world();