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

Unable to use the iostream header file in cpp project (GIT8266O-730) #1152

Open
3 tasks
ankit-thealchemist opened this issue Nov 28, 2021 · 1 comment
Open
3 tasks

Comments

@ankit-thealchemist
Copy link

Environment

  • Development Kit: Nodemcu

  • IDF version (git rev-parse --short HEAD to get the commit id.): 35c9415
    ver 3.4

  • Development Env: make

  • Operating System: [Windows

  • Power Supply: [USB

Problem Description

I am compiling a program in cpp. when ever I use the header file iostream, on flashing my module keep restarting. I tried other cpp headers like fstream and string. they both just work fine.

The program works fine with esp32.

//Detailed problem description goes here.

Expected Behavior

program should compile flawlessly and able to use the std::cout with that

Actual Behavior

node mcu in boot loop

Steps to repropduce

  1. step1 just add line #include
  2. ...

// It helps if you attach a picture of your setup/wiring here.

Code to reproduce this issue

// the code should be wrapped in the ```cpp tag so that it will be displayed better.
#include "esp_log.h"
#include <iostream>

extern "C" void app_main();
void app_main()
{
    std::cout<<"hello World";
}

// If your code is longer than 30 lines, GIST is preferred.

Debug Logs

Debug log goes here.
Please copy the plain text here for us to search the error log. Or attach the complete logs but leave the main part here if the log is *too* long.

Other items if possible

  • sdkconfig file (attach the sdkconfig file from your project folder)
  • elf file in the build folder (note this may contain all the code details and symbols of your project.)
  • coredump (This provides stacks of tasks.)
@github-actions github-actions bot changed the title Unable to use the iostream header file in cpp project Unable to use the iostream header file in cpp project (GIT8266O-730) Nov 28, 2021
@msojocs
Copy link

msojocs commented Mar 2, 2025

Add log.

(47) boot: ESP-IDF 3.4.0+sha.b951a86 2nd stage bootloader␛[0m
␛[0;32mI (48) boot: compile time 15:35:43␛[0m
␛[0;32mI (48) boot: SPI Speed      : 40MHz␛[0m
␛[0;32mI (51) boot: SPI Mode       : DIO␛[0m
␛[0;32mI (55) boot: SPI Flash Size : 4MB␛[0m
␛[0;32mI (59) boot: Partition Table:␛[0m
␛[0;32mI (63) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000␛[0m
␛[0;32mI (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000␛[0m
␛[0;32mI (85) boot:  2 factory          factory app      00 00 00010000 000f0000␛[0m
␛[0;32mI (92) boot:  3 ������k���Lk�␂^�*���␃ unknown          ff ff ffffffff ffffffff␛[0m
␛[0;32mI (100) boot: End of partition table␛[0m
␛[0;32mI (104) esp_image: segment 0: paddr=0x00010010 vaddr=0x40210010 size=0x9e488 (648328) map␛[0m
␛[0;32mI (113) esp_image: segment 1: paddr=0x000ae4a0 vaddr=0x402ae498 size=0x2f630 (194096) map␛[0m
␛[0;32mI (121) esp_image: segment 2: paddr=0x000ddad8 vaddr=0x3ffe8000 size=0x00714 (  1812) load␛[0m
␛[0;32mI (130) esp_image: segment 3: paddr=0x000de1f4 vaddr=0x40100000 size=0x00080 (   128) load␛[0m
␛[0;32mI (139) esp_image: segment 4: paddr=0x000de27c vaddr=0x40100080 size=0x05884 ( 22660) load␛[0m
␛[0;32mI (148) boot: Loaded app from partition at offset 0x10000␛[0m
Stack canary watchpoint triggered (uiT)

Backtrace: 0x40100c9b:0x3ffec0d0 0x4022ba49:0x3ffec0f0 0x40260fb8:0x3ffec100 0x40260b32:0x3ffec110 0x40260e53:0x3ffec120 0x402610e3:0x3ffec140 0x4026112a:0x3ffec150 0x40260b41:0x3ffec170 0x40260e53:0x3ffec180 0x402610e3:0x3ffec1a0 0x4026112a:0x3ffec1b0 0x40260b41:0x3ffec1d0 0x40260e53:0x3ffec1e0 0x402610e3:0x3ffec200 0x4026112a:0x3ffec210 0x40260b41:0x3ffec230 0x40260e53:0x3ffec240 0x402610e3:0x3ffec260 0x4026112a:0x3ffec270 0x40260b41:0x3ffec290 0x40260e53:0x3ffec2a0 0x402610e3:0x3ffec2c0 0x4026112a:0x3ffec2d0 0x40260b41:0x3ffec2f0 0x40260e53:0x3ffec300 0x402610e3:0x3ffec320 0x4026112a:0x3ffec330 0x40260b41:0x3ffec350 0x40260e53:0x3ffec360 0x402610e3:0x3ffec380 0x4026112a:0x3ffec390 0x40260b41:0x3ffec3b0 0x40260e53:0x3ffec3c0 0x402610e3:0x3ffec3e0 0x4026112a:0x3ffec3f0 0x40260b41:0x3ffec410 0x40260e53:0x3ffec420 0x402610e3:0x3ffec440 0x4026112a:0x3ffec450 0x40260b41:0x3ffec470 0x40260e53:0x3ffec480 0x402610e3:0x3ffec4a0 0x4026112a:0x3ffec4b0 0x40260b41:0x3ffec4d0 0x40260e53:0x3ffec4e0 0x402610e3:0x3ffec500 0x4026112a:0x3ffec510 0x40260b41:0x3ffec530 0x40260e53:0x3ffec540 0x402610e3:0x3ffec560 0x4026112a:0x3ffec570 0x40260b41:0x3ffec590 0x40260e53:0x3ffec5a0 0x402610e3:0x3ffec5c0 0x4026112a:0x3ffec5d0 0x40260b41:0x3ffec5f0 0x40260e53:0x3ffec600 0x402610e3:0x3ffec620 0x4026112a:0x3ffec630 0x40260b41:0x3ffec650 0x40260e53:0x3ffec660 0x402610e3:0x3ffec680 0x4026112a:0x3ffec690 0x40260b41:0x3ffec6b0 0x40260e53:0x3ffec6c0 0x402610e3:0x3ffec6e0 0x4026112a:0x3ffec6f0 0x40260b41:0x3ffec710 0x40260e53:0x3ffec720 0x402610e3:0x3ffec740 0x4026112a:0x3ffec750 0x40260b41:0x3ffec770 0x40260e53:0x3ffec780 0x402610e3:0x3ffec7a0 0x4026112a:0x3ffec7b0 0x40260b41:0x3ffec7d0 0x40260e53:0x3ffec7e0 0x402610e3:0x3ffec800 0x4026112a:0x3ffec810 0x40260b41:0x3ffec830 0x40260e53:0x3ffec840 0x402610e3:0x3ffec860 0x4026112a:0x3ffec870 0x40260b41:0x3ffec890 0x40260e53:0x3ffec8a0 0x402610e3:0x3ffec8c0 0x4026112a:0x3ffec8d0 0x40260b41:0x3ffec8f0 0x40260e53:0x3ffec900 0x402610e3:0x3ffec920 0x4026112a:0x3ffec930 0x40260b41:0x3ffec950 0x40260e53:0x3ffec960 0x402610e3:0x3ffec980 0x4026112a:0x3ffec990 0x40260b41:0x3ffec9b0 0x40260e53:0x3ffec9c0 0x402610e3:0x3ffec9e0 0x4026112a:0x3ffec9f0 0x40260b41:0x3ffeca10 0x40260e53:0x3ffeca20 0x402610e3:0x3ffeca40 0x4026112a:0x3ffeca50 0x40260b41:0x3ffeca70 0x40260e53:0x3ffeca80 0x402610e3:0x3ffecaa0 0x4026112a:0x3ffecab0 0x40260b41:0x3ffecad0 0x40260e53:0x3ffecae0 0x402610e3:0x3ffecb00 0x4026112a:0x3ffecb10 0x40260b41:0x3ffecb30 0x40260e53:0x3ffecb40 0x402610e3:0x3ffecb60 0x4026112a:0x3ffecb70 0x40260b41:0x3ffecb90 0x40260e53:0x3ffecba0 0x402610e3:0x3ffecbc0 0x4026112a:0x3ffecbd0 0x40260b41:0x3ffecbf0 0x40260e53:0x3ffecc00 0x402610e3:0x3ffecc20 0x4026112a:0x3ffecc30 0x40260b41:0x3ffecc50 0x40260e53:0x3ffecc60 0x402610e3:0x3ffecc80 0x4026112a:0x3ffecc90 0x40260b41:0x3ffeccb0 0x40260e53:0x3ffeccc0 0x402610e3:0x3ffecce0 0x4026112a:0x3ffeccf0 0x40260b41:0x3ffecd10 0x40260e53:0x3ffecd20 0x402610e3:0x3ffecd40 0x4026112a:0x3ffecd50 0x40260b41:0x3ffecd70 0x40260e53:0x3ffecd80 0x402610e3:0x3ffecda0 0x4026112a:0x3ffecdb0 0x40260b41:0x3ffecdd0 0x40260e53:0x3ffecde0 0x402610e3:0x3ffece00 0x4026112a:0x3ffece10 0x402722f1:0x3ffece30 0x402723f8:0x3ffece40 0x402614c8:0x3ffece60 0x4026133d:0x3ffece90 0x40212398:0x3ffeceb0 0x402123c3:0x3ffecec0 0x4021609f:0x3ffeced0

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