Hi, I got a new SenceCap Indicator and I am trying to flash the Home Assistant example.
I was able to build and flash it with a few hours lost with idf.py commands. The device was not configured as esp32s3. I changed the env variable and built.
But I have this issue at boot - LCD memory allocation errors:
I (638) i2c_bus: i2c0 bus inited
I (642) bsp boards: detecting board SenseCAP_Indicator
I (648) bsp boards: Detected board: [SenseCAP_Indicator]
I (659) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (664) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (672) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
I played with the idf.py menuconfig without success.
I tried other examples, with the same issue. It looks like a config issue during build.
I have issues with the Patch as well. With esp-idf release 5.0, I can’t apply the patch
I re-installed the esp-idf 5.0 and patch worked.
I still have the same issue with memory allocation
E (664) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (672) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
I played with all configs in idf.py menuconfig and installed esp-idf 5.1.
Now I can compile, flash and it works. BUT I have a very weird display. The image on the device is flickering and is unusable. This might be related to some frequency issues but I can’t find it.
What a pain to just test an example for a brand-new device using vendors repo… I am far from customizing the device for my needs.
Hi, we apologize for not being aware of your information because the technical support engineers have a rest time on weekends. Our working hours are from 9:00 to 18:00 (Beijing time) from Monday to Friday.
Thanks for the information. Still the community is very quiet on Discord and Forum.
Hopefully supporting engineers will be more helpful during the week.
Hi Yoo, I have the same problem. How do you solve this? Thanks.
I (0) cpu_start: App cpu up.
I (222) cpu_start: Pro cpu start user code
I (223) cpu_start: cpu freq: 160000000 Hz
I (223) cpu_start: Application information:
I (226) cpu_start: Project name: project-Sense_test
I (231) cpu_start: App version: 1
I (236) cpu_start: Compile time: Mar 7 2024 16:00:00
I (242) cpu_start: ELF file SHA256: 93c6bcce6c1919e8...
I (248) cpu_start: ESP-IDF: v5.1.2-dirty
I (253) cpu_start: Min chip rev: v0.0
I (258) cpu_start: Max chip rev: v0.99
I (263) cpu_start: Chip rev: v0.1
I (268) heap_init: Initializing. RAM available for dynamic allocation:
I (275) heap_init: At 3FC99720 len 0004FFF0 (319 KiB): DRAM
I (281) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (288) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (294) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (301) spi_flash: detected chip: winbond
I (305) spi_flash: flash io: dio
W (309) ADC: legacy driver is deprecated, please migrate to `esp_adc/adc_oneshot.h`
I (317) sleep: Configure to isolate all GPIO pins in sleep state
I (324) sleep: Enable automatic switching of GPIO sleep configuration
I (331) app_start: Starting scheduler on CPU0
I (336) app_start: Starting scheduler on CPU1
I (336) main_task: Started on CPU0
I (346) main_task: Calling app_main()
I (346) i2c_bus: i2c0 bus inited
I (356) bsp boards: detecting board SenseCAP_Indicator
I (356) bsp boards: Detected board: [SenseCAP_Indicator]
I (366) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (376) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (386) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4200e3bd PS : 0x00060b30 A0 : 0x8200e9c6 A1 : 0x3fc9d130
0x4200e3bd: lcd_ll_enable_clock at C:/esp/v5.1.2/esp-idf/components/hal/esp32s3/include/hal/lcd_ll.h:43
(inlined by) lcd_rgb_panel_destory at C:/esp/v5.1.2/esp-idf/components/esp_lcd/src/esp_lcd_panel_rgb.c:177
A2 : 0x3fc9e87c A3 : 0x3c038844 A4 : 0x3c038c94 A5 : 0x00000182
A6 : 0x3c038844 A7 : 0x3c038e08 A8 : 0x00000000 A9 : 0x3fc9d0d0
A10 : 0x4201f38c A11 : 0x3c038844 A12 : 0x3c038c94 A13 : 0x3fc9d130
0x4201f38c: vprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/vprintf.c:30
A14 : 0x3fc9d110 A15 : 0x0000000c SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffa
0x400556d5: strlen in ROM
0x400556e5: strlen in ROM
Here are the steps I used to make it work. I think the screen issue is resolved at step 5, with the EXPLORATORY features of IDF to set the correct frequency.
Your error message is related to memory allocation. Recheck your config to enable the PSRAM I think? I am not sure.
to summarize what I have done (Windows host, VSCode) :
1- Install esp-idf in VSCode using extensions (I use VSCode for all my devs).
2- Install IDF using esp-idf extension (I tried 5.0.3 and finally used the 5.1)
3- Start IDF terminal using the plugin (ctrl+shift+p : Open ESP-IDF terminal)
4- Change the environment variables or eps32 is the default target and will overwrite the settings. $env:IDF_TARGET='esp32s3'
5- Play with idf.py menuconfig to find the correct settings (PSRAM, SPI, anything else for custom needs), here I had to enableexploratory features to have 120M available for SPI. Otherwise, it is set to 80M by IDF and the 120M setting in the sdkconfig.default is lost at the first build.
6- Build the firmware as in the wiki with the command idf.py buildoridf.py -p PORT build flash monitor
Note: any change in the menuconfig required me to delete the ./build folder manually or I am having compilation errors. The idf.py [all]clean does not work. I hope I have not missed any step.
Extract of my sdkconfig :
#
# ESP PSRAM
#
CONFIG_SPIRAM=y
#
# SPI RAM config
#
# CONFIG_SPIRAM_MODE_QUAD is not set
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_TYPE_AUTO=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_CLK_IO=30
CONFIG_SPIRAM_CS_IO=26
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
CONFIG_SPIRAM_SPEED_120M=y
# CONFIG_SPIRAM_SPEED_80M is not set
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM_SPEED=120
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
# CONFIG_SPIRAM_USE_MEMMAP is not set
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
CONFIG_SPIRAM_USE_MALLOC=y
CONFIG_SPIRAM_MEMTEST=y
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
# CONFIG_SPIRAM_ECC_ENABLE is not set
# end of SPI RAM config
# end of ESP PSRAM
I’m also trying to build the sensecap-indicator-ha without success so far due to library include (or some of my environment ?)
I’m on Mac M1 with MacOS v14.4.1. I don’t use VScode. Installed CMake, etc via HomeBrew.
Here are the steps I’ve followed so far for IDF install and build :
/Users/facero/Documents/Perso/HomeAssistant-SenseCAP/esp32/esp-idf/components/heap/tlsf/tlsf.c:10:10: fatal error: tlsf.h: No such file or directory
10 | #include "tlsf.h"
| ^~~~~~~~
compilation terminated.
[409/1277] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32s3/esp_memprot.c.obj
ninja: build stopped: subcommand failed.
Missing "tlsf.h" file name found in the following component(s): heap(/Users/facero/Documents/Perso/HomeAssistant-SenseCAP/esp32/esp-idf/components/heap/tlsf/include/tlsf.h).
Maybe one of the components needs to add the missing header directory to INCLUDE_DIRS of idf_component_register call in CMakeLists.txt.
I checked and the tlsf.h is present in the mentionned directory so don’t understand why it cannot find it .
Any idea how to solve this ?
Otherwise if someone is willing to share a binary ready to flash, that would also be super helpful.
Thanks !