Developing IoT Projects with ESP32

I picked up the book ‘Developing IoT Projects with ESP32’ and am working through things. After struggling to get anything to work with PlatformIO on my Windows machine I switched over to my Mac and got past a good number of hurdles getting as far as working on the first FreeRTOS example. With my project directory found in github.

Things seem to start off but end up in a panic loop and new to this platform I am not sure if I missed some configuration step, if the books instructions are dated, or if I should just write the example off as being busted and move along to the rest of the book. If anyone could give direction it would be appreciated. There is a Discord channel for the book but it appears to be unmaintained and defunct…so asking here.

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376334
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2810,len:0x178c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xcb8
load:0x403cb700,len:0x2db0
entry 0x403c890c
I (18) boot: ESP-IDF 5.3.1 2nd stage bootloader
I (18) boot: compile time Oct 11 2024 20:52:17
I (18) boot: Multicore bootloader
I (21) boot: chip revision: v0.2
I (25) boot.esp32s3: Boot SPI Speed : 80MHz
I (30) boot.esp32s3: SPI Mode       : DIO
I (35) boot.esp32s3: SPI Flash Size : 16MB
I (39) boot: Enabling RNG early entropy source...
I (45) boot: Partition Table:
I (48) boot: ## Label            Usage          Type ST Offset   Length
I (56) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (63) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (71) boot:  2 factory          factory app      00 00 00010000 00100000
I (78) boot: End of partition table
I (82) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=0a734h ( 42804) map
I (98) esp_image: segment 1: paddr=0001a75c vaddr=3fc92c00 size=02a74h ( 10868) load
I (101) esp_image: segment 2: paddr=0001d1d8 vaddr=40374000 size=02e40h ( 11840) load
I (110) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=1accch (109772) map
I (136) esp_image: segment 4: paddr=0003acf4 vaddr=40376e40 size=0bd2ch ( 48428) load
I (153) boot: Loaded app from partition at offset 0x10000
I (153) boot: Disabling RNG early entropy source...
I (165) cpu_start: Multicore app
I (174) cpu_start: Pro cpu start user code
I (174) cpu_start: cpu freq: 160000000 Hz
I (174) app_init: Application information:
I (177) app_init: Project name:     espidf-freertos-ex
I (183) app_init: App version:      1
I (187) app_init: Compile time:     Oct 11 2024 20:52:05
I (193) app_init: ELF file SHA256:  e99f877e2...
I (198) app_init: ESP-IDF:          5.3.1
I (203) efuse_init: Min chip rev:     v0.0
I (208) efuse_init: Max chip rev:     v0.99 
I (213) efuse_init: Chip rev:         v0.2
I (217) heap_init: Initializing. RAM available for dynamic allocation:
I (225) heap_init: At 3FC96078 len 00053698 (333 KiB): RAM
I (231) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (237) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (243) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
I (250) spi_flash: detected chip: gd
I (254) spi_flash: flash io: dio
I (258) sleep: Configure to isolate all GPIO pins in sleep state
I (264) sleep: Enable automatic switching of GPIO sleep configuration
I (272) main_task: Started on CPU0
I (282) main_task: Calling app_main()
I (282) app: application started
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400556c0  PS      : 0x00060930  A0      : 0x820114f5  A1      : 0x3fc98720  
A2      : 0x09310936  A3      : 0x09310934  A4      : 0x000000ff  A5      : 0x0000ff00  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3fc986e0  
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x3fc98964  A13     : 0x00000000  
A14     : 0x3fc98924  A15     : 0x3fc98934  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x09310934  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xffffffff  


Backtrace: 0x400556bd:0x3fc98720 0x420114f2:0x3fc98730 0x4200bd75:0x3fc98a50 0x4201ac65:0x3fc98a80 0x40380925:0x3fc98ab0 0x4200131d:0x3fc98b00 0x4201a443:0x3fc98c30 0x4037a4b5:0x3fc98c60




ELF file SHA256: e99f877e2

Rebooting...

Figured it out the book calls out…

    char buffer[256]{0};
    vTaskList(buffer);
    ESP_LOGI(TAG, "\n%s", buffer);

Turns out 256 bytes of space is not enough to dump the vTaskList too. updating to 512 solves the problem.

1 Like

report you memory problem, and i dont read book, but first enable in platformio,ini file

monitor_filters = esp32_exception_decoder, default

this show you human info from Bactrace

1 Like