esp-idf: statement 'cout<

Environment

  • Module or chip used: esp32-d0wdq6 revision 1
  • IDF version (run git describe --tags to find it): v5.0-c2ccc38
  • Build System: idf.py
  • Operating System: |Linu
  • Using an IDE?: vscode
  • Power Supply: external 3.3V

Problem Description

When using cout as shown in the code below, the app crashes in an endless loop without resetting, and displays the errors shown in the logs endlessly, every couple of seconds. There are two different variants of backtrace errors that get produced every time I run the code. No error occurs if I replace cout with a corresponding printf statement.

Code to reproduce this issue

#include <iostream>
#include "esp_event.h"

using std::endl;
using std::cout;

extern "C" void app_main(void)
{
    esp_event_loop_create_default();

    cout<<endl<<"App Running"<<endl;
}

Debug Logs

W (171) boot.esp32: PRO CPU has been reset by WDT.
W (172) boot.esp32: WDT reset info: PRO CPU PC=0x4008870a
0x4008870a: _xt_context_save at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:157

W (172) boot.esp32: WDT reset info: APP CPU PC=0x400882f2
0x400882f2: panic_handler at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/esp_system/port/panic_handler.c:139 (discriminator 1)

W (171) boot.esp32: PRO CPU has been reset by WDT.
W (172) boot.esp32: WDT reset info: PRO CPU PC=0x400886f8
0x400886f8: _xt_context_save at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_context.S:138

W (172) boot.esp32: WDT reset info: APP CPU PC=0x400882f2
0x400882f2: panic_handler at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/esp_system/port/panic_handler.c:139 (discriminator 1)

as well as:

--- idf_monitor on /dev/ttyUSB1 2073600 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

W (171) boot.esp32: PRO CPU has been reset by WDT.
W (172) boot.esp32: WDT reset info: PRO CPU PC=0x4008870a
0x4008870a: spi_flash_protected_read_mmu_entry at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/spi_flash/flash_mmap.c:309

W (172) boot.esp32: WDT reset info: APP CPU PC=0x400882f2
0x400882f2: spi_flash_disable_interrupts_caches_and_other_cpu at /home/moefear/source/esp-idf-v5.0-c2ccc38/components/spi_flash/cache_utils.c:150 (discriminator 1)

Other items if possible

debug.log debug2.log sdkconfig.txt

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17

Commits related to this issue

Most upvoted comments

Because when I tested on an ESP32 WROVER module and vanilla config, then everything worked fine, so I assumed it’s the configuration that has some issues.

that’s not what I meant. I meant if 80MHz/QIO is a problem because of bad module quality, then there should be a good quality module where it would work. did you test that?

because I just tested on both a standard wrover and wroom modules, and the problem persists, even when I set DIO/40MHz. I fully reinstalled esp-idf, after deleting the espressif folder. Although the lcd example now works flawlessly (even when I choose QIO/80MHz), I am still getting the wdt/cpu-reset errors when I use a simple standard empty project with the cout statement, even when I choose DIO/40MHz or use the vanilla sdkconfig.

Hence it seems something more difficult to reproduce (systematically), but not related to flash mode/frequency. Attached is a picture of one of the wroom modules I tested. If it’s necessary to remove the stickers let me know. IMG_20220707_131216