LVGL display project for ESP32

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

LVGL display project for ESP32

Postby ujurmsde » Sun Aug 01, 2021 7:55 am

I am using the library for display on my AWS EduKit M5 Core2. The library works when I have uploaded some code on the board but it does not work when I upload the code after I restart the board.

https://github.com/lvgl/lv_port_esp32

I have checked weather the pin configs are correct using pinmaps on the following website

https://docs.m5stack.com/en/core/core2_for_aws

Screenshot for idf.py menuconfig.

https://ibb.co/rvMjnJN

felmue
Posts: 69
Joined: Mon Nov 16, 2020 2:55 pm

Re: LVGL display project for ESP32

Postby felmue » Sun Aug 01, 2021 11:42 am

Hello @ujurmsde

my guess is that the library sample code doesn't know about the power chip (AXP192) used in M5Core2 which according to the schematic controls multiple aspects of the device including the backlight and reset of the display.

May I suggest you checkout the following example using the LVGL library which has been adapted to the M5Core2? https://github.com/ropg/m5core2_esp-idf_demo

Thanks
Felix

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Re: LVGL display project for ESP32

Postby ujurmsde » Sun Aug 01, 2021 1:52 pm

Hi @felmue,

The library works fine.

Intially I had an issue. Then I comment out the line and it worked. I will post details latter.
../components/lvgl_esp32_drivers/lvgl_helpers.c:152:5: error: unknown type name 'spi_dma_chan_t'; did you mean 'spi_signal_conn_t'?
spi_dma_chan_t dma_chan = SPI_DMA_DISABLED;
^~~~~~~~~~~~~~
spi_signal_conn_t
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Re: LVGL display project for ESP32

Postby ujurmsde » Sat Aug 07, 2021 10:27 am

There is still some issue I am not able to figure out. For example the following code does not work in app_main()

Also, if I have saparate task to perform the given printing task, it does not work.

I tried to add the #include "core2forAWS.h" hearder and try if that works.

Code: Select all

Core2ForAWS_Init();
    	Core2ForAWS_Display_SetBrightness(80);
    	xSemaphoreTake(xGuiSemaphore, portMAX_DELAY);

	//lvgl_i2c_locking(i2c_manager_locking());

	//lv_init();
	//lvgl_driver_init();
	lv_obj_t *label = lv_label_create(lv_scr_act(), NULL);
	lv_label_set_text(label, "Drag me");
	lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
	
	// Needs to be pinned to a core
	//xTaskCreatePinnedToCore(&example_obj, "gui", 4096*2, NULL, 0, NULL, 1);
	
	printf("Running...\n");
	fflush(stdout);
	xSemaphoreGive(xGuiSemaphore);

Who is online

Users browsing this forum: lucacusso and 33 guests