Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after flash #7

Closed
OperatorB opened this issue Jun 21, 2024 · 9 comments
Closed

Crash after flash #7

OperatorB opened this issue Jun 21, 2024 · 9 comments

Comments

@OperatorB
Copy link

Compilation was not turnkey process, anyways I face an issue after flashing. The core keeps panicing and bootlooping due to memory problem.

Below you can find some of the serial log:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3810,len:0x178c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xcbc
load:0x403cc700,len:0x2d9c
entry 0x403c9914
I (27) boot: ESP-IDF v5.2.2 2nd stage bootloader
I (27) boot: compile time Jun 21 2024 18:54:04
I (27) boot: Multicore bootloader
I (30) boot: chip revision: v0.2
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode : DIO
I (43) boot.esp32s3: SPI Flash Size : 16MB
I (48) boot: Enabling RNG early entropy source...
I (54) boot: Partition Table:
I (57) boot: ## Label Usage Type ST Offset Length
I (64) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (72) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (79) boot: 2 factory factory app 00 00 00010000 00200000
I (87) boot: 3 storage Unknown data 01 82 00210000 00080000
I (94) boot: End of partition table
I (98) esp_image: segment 0: paddr=00010020 vaddr=3c070020 size=1add4h (110036) map
I (127) esp_image: segment 1: paddr=0002adfc vaddr=3fc97300 size=0301ch ( 12316) load
I (129) esp_image: segment 2: paddr=0002de20 vaddr=40374000 size=021f8h ( 8696) load
I (134) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=69d40h (433472) map
I (219) esp_image: segment 4: paddr=00099d68 vaddr=403761f8 size=11058h ( 69720) load
I (242) boot: Loaded app from partition at offset 0x10000
I (242) boot: Disabling RNG early entropy source...
I (254) cpu_start: Multicore app
I (254) esp_psram: Found 2MB PSRAM device
I (254) esp_psram: Speed: 40MHz
I (674) esp_psram: SPI SRAM memory test OK
I (683) cpu_start: Pro cpu start user code
I (683) cpu_start: cpu freq: 160000000 Hz
I (683) cpu_start: Application information:
I (686) cpu_start: Project name: IDF-ESP_LCD-LVGL
I (692) cpu_start: App version: 6f95b09-dirty
I (697) cpu_start: Compile time: Jun 21 2024 18:53:56
I (703) cpu_start: ELF file SHA256: 63f7c4866...
I (709) cpu_start: ESP-IDF: v5.2.2
I (714) cpu_start: Min chip rev: v0.0
I (718) cpu_start: Max chip rev: v0.99
I (723) cpu_start: Chip rev: v0.2
I (728) heap_init: Initializing. RAM available for dynamic allocation:
I (735) heap_init: At 3FCBAFC0 len 0002E750 (185 KiB): RAM
I (741) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (747) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (753) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (760) esp_psram: Adding pool of 2048K of PSRAM memory to heap allocator
I (768) spi_flash: detected chip: generic
I (772) spi_flash: flash io: dio
W (776) i2c: This driver is an old driver, please migrate your application code to adapt driver/i2c_master.h
I (787) sleep: Configure to isolate all GPIO pins in sleep state
I (793) sleep: Enable automatic switching of GPIO sleep configuration
I (801) main_task: Started on CPU0
I (811) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (811) main_task: Calling app_main()
I (821) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (831) st7796: LCD panel create success, version: 1.2.1
I (1061) LVGL: Starting LVGL task
E (1061) LVGL: lvgl_port_add_disp_priv(272): Not enough memory for LVGL buffer (buf2) allocation!
assert failed: bsp_display_start wt32sc01plus.c:332 (disp = lvgl_port_add_disp(&disp_cfg))

I try to debug in the meantime however I am also open for suggestions.

@sukesh-ak
Copy link
Owner

There is an option to disable dual buffer in the config.

Not enough memory for LVGL buffer (buf2) allocation!

@sukesh-ak
Copy link
Owner

I will test again but not sure when.

@OperatorB
Copy link
Author

OperatorB commented Jun 22, 2024

I did a fresh git clone and now your demo works. The issue was that I changed esp_lvgl_port version from 2.0.0 to 2.2.2 inside idf_components.yml. But still a thing that was missing was the CONFIG_LV_USE_OBSERVER to be enabled via menuconfig. Please add this info to the readme.
Thank you for your repo!
I start building my hobby project.

@sukesh-ak
Copy link
Owner

I did a fresh git clone and now your demo works. The issue was that I changed esp_lvgl_port version from 2.0.0 to 2.2.2 inside idf_components.yml. But still a thing that was missing was the CONFIG_LV_USE_OBSERVER to be enabled via menuconfig. Please add this info to the readme. Thank you for your repo! I start building my hobby project.

If you do this (as per readme), observer should work fine
image

@sukesh-ak
Copy link
Owner

There is an issue where lvgl needs to fix it, so that it can be easier as discussed here
espressif/esp-bsp#318

and here lvgl/lvgl#6010

@sukesh-ak
Copy link
Owner

I will upgrade to latest esp_lvgl_port and test next week. Meanwhile please read the README.md for the commands used to compile with all defaults set

# Build with "WT32-SC01 Plus" specific configuration
idf.py -D SDKCONFIG_DEFAULTS="sdkconfig.wt32sc01plus" build
idf.py -p <PORT> flash monitor

@OperatorB
Copy link
Author

You are right, I forgot to untick the "Check this to not use custom lv_conf.h" inside menuconfig.
Thanks for the issue tags.
I have read the issues and I am not sure what would be the most elegant way. I agree that developers with the same hardware should have spend less time with config and more time with their project sw development. In the same time menuconfig is and will be a useful config tool which is frequently utilized with esp-idf platform.

@OperatorB
Copy link
Author

Conclusion: If idf_components.yml in this repo still uses esp_lvgl_port v2.0.0 do not change it to newer version.

@sukesh-ak
Copy link
Owner

Conclusion: If idf_components.yml in this repo still uses esp_lvgl_port v2.0.0 do not change it to newer version.

Will test with latest version when I get time next :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants