ESP32-CAM PSRAM Initialization failure and Timed out waiting for packet header Error

Hi All. I have been using Arduino since long. I am right now working on ESP32-CAM to capture image and store in the memory card. The steps I have taken are :

  1. I am using an FTDI USB to TTL Converter to let communicate PC with ESP32-CAM through Arduino IDE, the connections are as per below :
    USB to TTL ESP32-CAM
    Vcc Vcc
    Gnd Gnd
    Tx Rx
    Rx Tx
    Note : I have connected the IO0 pin of ESP32-CAM to Gnd to let it get flashed.

  2. In the Arduino IDE Version 1.8.16, I have set up the ESP32 Library using the Boards manager and set "https://dl.espressif.com/dl/package_esp32_index.json,
    http://arduino.esp8266.com/stable/package_esp8266com_index.json" in the File->Preferences section.

  3. I have opened the File->Examples->ESP32->Camera->CameraWebServer code and set the Board to ESP32 Wrover Module with Partition Scheme Huge App (3 MB No OTA/1 MB SPIFFS) (Every other Partition scheme setting was throwing compilation errors) with setting camera in the code as CAMERA_MODEL_WROVER_KIT
    When I compile the code with my ssid and password, the code gets compiled successfully, but when I upload it, following happens :

Using library WiFi at version 1.0 in folder: C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi 
"C:\\Users\\Shaunak\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-size" -A "C:\\Users\\Shaunak\\AppData\\Local\\Temp\\arduino_build_833798/CameraWebServer.ino.elf"
Sketch uses 2594790 bytes (82%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56256 bytes (17%) of dynamic memory, leaving 271424 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header


When I open the press the "Reset" Pin, I get the following data :

e⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮LS⸮⸮⸮⸮⸮2*4)⸮⸮⸮ia⸮eAQ⸮Oׅ⸮⸮⸮⸮⸮⸮⸮Q⸮
+⸮⸮⸮A⸮emAQ⸮⸮I_Ɓ⸮⸮⸮⸮⸮⸮*⸮%uu⸮EjR⸮⸮⸮⸮⸮A⸮⸮⸮⸮ e򲌐⸮⸮⸮⸮C⸮W⸮U⸮⸮⸮Y⸮Aeob ⸮⸮e⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮LS⸮⸮⸮⸮⸮2*4)⸮⸮⸮ia⸮eaAPRԃ⸮⸮⸮⸮⸮⸮⸮%U⸮5⸮Mb⸮⸮⸮⸮ia⸮ag@(Ӑ⸮⸮⸮⸮⸮⸮eE⸮E⸮{zQ%5	⸮⸮⸮⸮⸮g󩰚⸮⸮⸮⸮**⸮⸮•⸮5	⸮⸮տ⸮r⸮⸮⸮⸮⸮⸮⸮⸮E⸮⸮ia⸮aaY⸮_䲶⸮⸮⸮⸮⸮⸮⸮.⸮E⸮⸮ia⸮aaY⸮dߤ⸮⸮⸮⸮⸮⸮⸮⸮⸮E⸮⸮ia⸮aaem拉⸮⸮⸮⸮⸮⸮,⸮+⸮A⸮e⸮I5	⸮⸮⸮⸮t0⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮YK⸮j⸮⸮⸮⸮ya⸮g⸮f氐⸮⸮⸮⸮⸮⸮⸮⸮NjR⸮⸮⸮⸮ia⸮ia0⸮⸮⸮⸮⸮⸮⸮YK⸮⸮⸮⸮⸮2*⸮⸮AA⸮⸮⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮C!⸮+K⸮⸮⸮⸮⸮AaaiaaXl定⸮⸮⸮⸮⸮⸮Y⸮⸮⸮Aa⸮iaap0⸮⸮⸮⸮⸮e[0;32mI (29) boot: ESP-IDF v4.1-dirty 2nd stage bootloadere[0m
e[0;32mI (30) boot: compile time 16:15:01e[0m
e[0;32mI (30) boot: chip revision: 1e[0m
e[0;32mI (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
e[0;32mI (40) boot.esp32: SPI Speed      : 40MHze[0m
e[0;32mI (44) boot.esp32: SPI Mode       : DIOe[0m
e[0;32mI (49) boot.esp32: SPI Flash Size : 4MBe[0m
e[0;32mI (53) boot: Enabling RNG early entropy source...e[0m
e[0;32mI (59) boot: Partition Table:e[0m
e[0;32mI (62) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
e[0;32mI (70) boot:  0 nvs              WiFi data        01 02 00009000 00005000e[0m
e[0;32mI (77) boot:  1 otadata          OTA data         01 00 0000e000 00002000e[0m
e[0;32mI (85) boot:  2 app0             OTA app          00 10 00010000 00300000e[0m
e[0;32mI (92) boot:  3 spiffs           Unknown data     01 82 00310000 000f0000e[0m
e[0;32mI (100) boot: End of partition tablee[0m
e[0;32mI (104) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
e[0;32mI (111) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d2048 (1908808) mape[0m
e[0;32mI (847) esp_image: segment 1: paddr=0x001e2070 vaddr=0x3ffbdb60 size=0x04d3c ( 19772) loade[0m
e[0;32mI (855) esp_image: segment 2: paddr=0x001e6db4 vaddr=0x40080000 size=0x00400 (  1024) loade[0m
e[0;32mI (856) esp_image: segment 3: paddr=0x001e71bc vaddr=0x40080400 size=0x08e54 ( 36436) loade[0m
e[0;32mI (878) esp_image: segment 4: paddr=0x001f0018 vaddr=0x400d0018 size=0x9df74 (647028) mape[0m
e[0;32mI (1125) esp_image: segment 5: paddr=0x0028df94 vaddr=0x40089254 size=0x0b6a0 ( 46752) loade[0m
e[0;32mI (1157) boot: Loaded app from partition at offset 0x10000e[0m
e[0;32mI (1157) boot: Disabling RNG early entropy source...e[0m
⸮
SD Size: 30543MB  OK
PSRAM OK 
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40091e23  PS      : 0x00060033  A0      : 0x800923ff  A1      : 0x3ffb1e20  
A2      : 0x3f800000  A3      : 0x0005dc0c  A4      : 0x3f800018  A5      : 0x00000000  
A6      : 0x00060c23  A7      : 0x00000000  A8      : 0x00000001  A9      : 0xffffffff  
A10     : 0x3fbffff4  A11     : 0x00000000  A12     : 0x3fbffff8  A13     : 0x3f800010  
A14     : 0x003fffd8  A15     : 0x00000000  SAR     : 0x00000014  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xffffffff  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  

ELF file SHA256: 0000000000000000

Backtrace: 0x40091e23:0x3ffb1e20 0x400923fc:0x3ffb1e40 0x400817b1:0x3ffb1e60 0x4008198d:0x3ffb1e80 0x40137537:0x3ffb1ea0 0x40137e21:0x3ffb1ec0 0x40138120:0x3ffb1ef0 0x400d0e8d:0x3ffb1f20 0x400d477e:0x3ffb1fb0 0x4008ed92:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6968
load:0x40078000,len:13072
ho 0 tail 12 room 4
load:0x40080400,len:3896
entry 0x40080688
e[0;32mI (31) boot: ESP-IDF v4.1-dirty 2nd stage bootloadere[0m
e[0;32mI (31) boot: compile time 16:15:01e[0m
e[0;32mI (31) boot: chip revision: 1e[0m
e[0;32mI (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
e[0;32mI (41) boot.esp32: SPI Speed      : 40MHze[0m
e[0;32mI (46) boot.esp32: SPI Mode       : DIOe[0m
e[0;32mI (50) boot.esp32: SPI Flash Size : 4MBe[0m
e[0;32mI (55) boot: Enabling RNG early entropy source...e[0m
e[0;32mI (60) boot: Partition Table:e[0m
e[0;32mI (64) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
e[0;32mI (71) boot:  0 nvs              WiFi data        01 02 00009000 00005000e[0m
e[0;32mI (79) boot:  1 otadata          OTA data         01 00 0000e000 00002000e[0m
e[0;32mI (86) boot:  2 app0             OTA app          00 10 00010000 00300000e[0m
e[0;32mI (93) boot:  3 spiffs           Unknown data     01 82 00310000 000f0000e[0m
e[0;32mI (101) boot: End of partition tablee[0m
e[0;32mI (105) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
e[0;32mI (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d2048 (1908808) mape[0m
e[0;32mI (848) esp_image: segment 1: paddr=0x001e2070 vaddr=0x3ffbdb60 size=0x04d3c ( 19772) loade[0m
e[0;32mI (857) esp_image: segment 2: paddr=0x001e6db4 vaddr=0x40080000 size=0x00400 (  1024) loade[0m
e[0;32mI (857) esp_image: segment 3: paddr=0x001e71bc vaddr=0x40080400 size=0x08e54 ( 36436) loade[0m
e[0;32mI (880) esp_image: segment 4: paddr=0x001f0018 vaddr=0x400d0018 size=0x9df74 (647028) mape[0m
e[0;32mI (1126) esp_image: segment 5: paddr=0x0028df94 vaddr=0x40089254 size=0x0b6a0 ( 46752) loade[0m
e[0;32mI (1158) boot: Loaded app from partition at offset 0x10000e[0m
e[0;32mI (1159) boot: Disabling RNG early entropy source...e[0m
E (60) psram: PSRAM ID read error: 0xffffffff

SD Size: 30543MB  OK
PSRAM Initialization Failure
ESP32-CAM-MB

The first two of the last three lines of this output show the memory that the memory card that I have plugged has, and the PSRAM Failure in initializing.
4. The same errors retain when I set the board selection to AI Thinker ESP-32 CAM and camera as CAMERA_MODEL_AI_THINKER

Thank you
Shaunak

The ESP32 CAM (WROOM) already has the 4MB of PSRAM RAM it needs to run. I'm sure you do not need to plug in a memory card if you are using the proper ESP32CAM.

I did not see the normal message sequence of upload a program to the ESP32 CAM.

After the jumper is in place, then press the button, the ESP32CAM will give a message that it is ready for upload. Then start the upload.

That tells me your program tried to read a memory address that is not there.

Install the ESP Exception decoder and use it, look it up on the internet.

Post a pick of your setup. Especially how you've plugged in a memory card.

@Idahowalker

I did not see the normal message sequence of upload a program to the ESP32 CAM.

After the jumper is in place, then press the button, the ESP32CAM will give a message that it is ready for upload. Then start the upload.

I do not get after pressing the reset button before uploading. There is only one button (Reset Button) on my ESP32 CAM.

Install the ESP Exception decoder and use it, look it up on the internet.

Can you please provide the link as I am completely new to it? I do not want to get misdirected.

Here is my setup :


Green wire is for Vcc (5V)
Black wire is for Ground
Yellow and Blue wires are for communication
White wire connects IO0 to Ground

Hj @shaunakvyas21,

The booting sequence goes like this (assuming VCC, GND, RX and TX are all connected):

Connect IO0 to GND while unplugged from computer
Plug programmer in to computer
Press the RST button on the ESP (you should get a "ready for upload" print on the serial monitor)
Upload program

If the waiting for upload message does not appear then no work. In other words the ESP32CAM must indicate it is ready for upload before selecting to upload the program in the IDE.

I see that the flash LED is on in your photo. The default is off.

Could you post an image of the pin side of the connection points?

On another note, I have tried several FTDI modules to find they do not all work the same. I went through several FTDI's modules till I got one to work.

I have had the same problem before:

I solved it by just switching programmers.

Thank you, @idahowalker . I will try another FTDI and let you know.

@kgay9 , Thank you for your response. I followed the same procedure, but I do not get any message.

@kgray9 , which programmers did you use?

@kgray9

  1. I did the connections of FTDI with the module before plugging it to the Computer.
  2. I Connected IO0 to GND while unplugged from computer.
  3. I plugged the FTDI (Programmer) in to the computer
  4. I opened the serial monitor of Arduino
  5. I pressed the RESET button
    Here is the ouput :
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6968
load:0x40078000,len:13072
ho 0 tail 12 room 4
load:0x40080400,len:3896
entry 0x40080688
e[0;32mI (30) boot: ESP-IDF v4.1-dirty 2nd stage bootloadere[0m
e[0;32mI (30) boot: compile time 16:15:01e[0m
e[0;32mI (30) boot: chip revision: 1e[0m
e[0;32mI (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
e[0;32mI (40) boot.esp32: SPI Speed      : 40MHze[0m
e[0;32mI (45) boot.esp32: SPI Mode       : DIOe[0m
e[0;32mI (49) boot.esp32: SPI Flash Size : 4MBe[0m
e[0;32mI (54) boot: Enabling RNG early entropy source...e[0m
e[0;32mI (59) boot: Partition Table:e[0m
e[0;32mI (63) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
e[0;32mI (70) boot:  0 nvs              WiFi data        01 02 00009000 00005000e[0m
e[0;32mI (78) boot:  1 otadata          OTA data         01 00 0000e000 00002000e[0m
e[0;32mI (85) boot:  2 app0             OTA app          00 10 00010000 00300000e[0m
e[0;32mI (93) boot:  3 spiffs           Unknown data     01 82 00310000 000f0000e[0m
e[0;32mI (100) boot: End of partition tablee[0m
e[0;32mI (104) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
e[0;32mI (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d2048 (1908808) mape[0m
e[0;32mI (847) esp_image: segment 1: paddr=0x001e2070 vaddr=0x3ffbdb60 size=0x04d3c ( 19772) loade[0m
e[0;32mI (856) esp_image: segment 2: paddr=0x001e6db4 vaddr=0x40080000 size=0x00400 (  1024) loade[0m
e[0;32mI (857) esp_image: segment 3: paddr=0x001e71bc vaddr=0x40080400 size=0x08e54 ( 36436) loade[0m
e[0;32mI (879) esp_image: segment 4: paddr=0x001f0018 vaddr=0x400d0018 size=0x9df74 (647028) mape[0m
e[0;32mI (1126) esp_image: segment 5: paddr=0x0028df94 vaddr=0x40089254 size=0x0b6a0 ( 46752) loade[0m
e[0;32mI (1158) boot: Loaded app from partition at offset 0x10000e[0m
e[0;32mI (1158) boot: Disabling RNG early entropy source...e[0m
⸮
SD Size: 30543MB  OK
PSRAM OK 
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40091e23  PS      : 0x00060033  A0      : 0x800923ff  A1      : 0x3ffb1e20  
A2      : 0x3f800000  A3      : 0x0005dc0c  A4      : 0x3f800018  A5      : 0x00000000  
A6      : 0x00060c23  A7      : 0x00000000  A8      : 0x00000001  A9      : 0xffffffff  
A10     : 0x3fbffff4  A11     : 0x00000000  A12     : 0x3fbffff8  A13     : 0x3f800010  
A14     : 0x003fffd8  A15     : 0x00000000  SAR     : 0x00000014  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xffffffff  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  

ELF file SHA256: 0000000000000000

Backtrace: 0x40091e23:0x3ffb1e20 0x400923fc:0x3ffb1e40 0x400817b1:0x3ffb1e60 0x4008198d:0x3ffb1e80 0x40137537:0x3ffb1ea0 0x40137e21:0x3ffb1ec0 0x40138120:0x3ffb1ef0 0x400d0e8d:0x3ffb1f20 0x400d477e:0x3ffb1fb0 0x4008ed92:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6968
load:0x40078000,len:13072
ho 0 tail 12 room 4
load:0x40080400,len:3896
entry 0x40080688
e[0;32mI (31) boot: ESP-IDF v4.1-dirty 2nd stage bootloadere[0m
e[0;32mI (31) boot: compile time 16:15:01e[0m
e[0;32mI (31) boot: chip revision: 1e[0m
e[0;32mI (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
e[0;32mI (41) boot.esp32: SPI Speed      : 40MHze[0m
e[0;32mI (46) boot.esp32: SPI Mode       : DIOe[0m
e[0;32mI (50) boot.esp32: SPI Flash Size : 4MBe[0m
e[0;32mI (55) boot: Enabling RNG early entropy source...e[0m
e[0;32mI (60) boot: Partition Table:e[0m
e[0;32mI (64) boot: ## Label            Usage          Type ST Offset   Lengthe[0m
e[0;32mI (71) boot:  0 nvs              WiFi data        01 02 00009000 00005000e[0m
e[0;32mI (79) boot:  1 otadata          OTA data         01 00 0000e000 00002000e[0m
e[0;32mI (86) boot:  2 app0             OTA app          00 10 00010000 00300000e[0m
e[0;32mI (93) boot:  3 spiffs           Unknown data     01 82 00310000 000f0000e[0m
e[0;32mI (101) boot: End of partition tablee[0m
e[0;32mI (105) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
e[0;32mI (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1d2048 (1908808) mape[0m
e[0;32mI (848) esp_image: segment 1: paddr=0x001e2070 vaddr=0x3ffbdb60 size=0x04d3c ( 19772) loade[0m
e[0;32mI (857) esp_image: segment 2: paddr=0x001e6db4 vaddr=0x40080000 size=0x00400 (  1024) loade[0m
e[0;32mI (857) esp_image: segment 3: paddr=0x001e71bc vaddr=0x40080400 size=0x08e54 ( 36436) loade[0m
e[0;32mI (880) esp_image: segment 4: paddr=0x001f0018 vaddr=0x400d0018 size=0x9df74 (647028) mape[0m
e[0;32mI (1126) esp_image: segment 5: paddr=0x0028df94 vaddr=0x40089254 size=0x0b6a0 ( 46752) loade[0m
e[0;32mI (1158) boot: Loaded app from partition at offset 0x10000e[0m
e[0;32mI (1159) boot: Disabling RNG early entropy source...e[0m
E (60) psram: PSRAM ID read error: 0xffffffff

SD Size: 30543MB  OK
PSRAM Initialization Failure
ESP32-CAM-MB

The first one was a Arduino Uno with the atmega328 taken out. The second was just a generic cp2102 from Amazon.

What is the baud rate of your serial monitor set to? It should be 115200baud I think.

As seen from the output on the serial monitor, this is the wrong baud rate.

Your ESP is defective.

Remove the SD card
Connect the Vcc from the FTDI to the 5 V pin on the ESP CAM (not the Vcc pin)
Try a simple blink sketch


//Led is on the reset button side of the board
void setup() {
  pinMode(33, OUTPUT);
}
void loop() {
  digitalWrite(33, LOW);//on
  delay (1000);
  digitalWrite(33, HIGH);//off
  delay (1000);
}
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

Is the message that is being looked for.

@Idahowalker @ZX80 @kgray9

The ESP seems defective. I will try to arrange a new one. Also, I am planning to buy CP2102 instead of FTDI. I will update you when I will get and test with them.

Thank you.

1 Like

I replaced the ESP32 CAM with a new one. I also replaced FTDI USB to TTL with CP2102.
Here is the Picture of my new setup :


Connections
USB to TTL ESP32-CAM
Vcc Vcc
Gnd Gnd
Tx Rx
Rx Tx

Green wire is for Vcc (5V)
Black wire is for Ground
Yellow and Blue wires are for communication
White wire connects IO0 to Ground

Note : I have connected the IO0 pin of ESP32-CAM to Gnd to let it get flashed.
Then I took the following steps :

  1. Opened the serial monitor and pressed the RESET button
    The output is as below :

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

2. Then I minimize the serial monitor and press the **Upload** button. The Arduino informs **Done Uploading**.
Here is the output of Error Console (I am sharing what is important to me as I can not share entire due to forum character limit) : 

-> candidates: [WiFi@2.0.0 WiFi@1.0]
"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue "-IC:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue "-"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/config" "-"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-IC:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue "-IC:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-32\1.0.6\libraries\WiFi\src\WiFiSTA.cpp" -o nul
"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-32\1.0.6/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10816 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD="ESP32_DEV"" "-DARDUINO_VARIANT="esp32"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue "-"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-Generating function prototypes...
DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h"" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-"C:\Users\Shaunak\AppData\Local\Temp\arduino_build_315154/CameraWebServer.ino.elf"
esptool.py v3.0-dev
"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/gen_esp32part.exe" -q "C:\Users\Shaunak\AppData\Local\Temp\arduino_build_315154/partitions.csv" "C:\Users\Shaunak\AppData\Local\Temp\arduino_build_315154/CameraWebServer.ino.partitions.bin"
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Using library WiFi at version 1.0 in folder: C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
"C:\Users\Shaunak\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-size" -A "C:\Users\Shaunak\AppData\Local\Temp\arduino_build_315154/CameraWebServer.ino.elf"
Sketch uses 2594790 bytes (82%) of program storage space. Maximum is 3145728 bytes.
Global variables use 56256 bytes (17%) of dynamic memory, leaving 271424 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM8
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:61:05:17:8f:e0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)...
Hash of data verified.
Compressed 18656 bytes to 12053...
Writing at 0x00001000... (100 %)
Wrote 18656 bytes (12053 compressed) at 0x00001000 in 0.3 seconds (effective 502.5 kbit/s)...
Hash of data verified.
Compressed 2594912 bytes to 2073527...
Writing at 0x00010000... (0 %)
Writing at 0x00014000... (1 %)
Writing at 0x00018000... (2 %)
Writing at 0x0001c000... (3 %)
Writing at 0x00020000... (3 %)
Writing at 0x00024000... (4 %)
Writing at 0x00028000... (5 %)
Writing at 0x0002c000... (6 %)
Writing at 0x00030000... (7 %)
Writing at 0x00034000... (7 %)
Writing at 0x00038000... (8 %)
Writing at 0x0003c000... (9 %)
Writing at 0x00040000... (10 %)
Writing at 0x00044000... (11 %)
Writing at 0x00048000... (11 %)
Writing at 0x0004c000... (12 %)
Writing at 0x00050000... (13 %)
Writing at 0x00054000... (14 %)
Writing at 0x00058000... (14 %)
Writing at 0x0005c000... (15 %)
Writing at 0x00060000... (16 %)
Writing at 0x00064000... (17 %)
Writing at 0x00068000... (18 %)
Writing at 0x0006c000... (18 %)
Writing at 0x00070000... (19 %)
Writing at 0x00074000... (20 %)
Writing at 0x00078000... (21 %)
Writing at 0x0007c000... (22 %)
Writing at 0x00080000... (22 %)
Writing at 0x00084000... (23 %)
Writing at 0x00088000... (24 %)
Writing at 0x0008c000... (25 %)
Writing at 0x00090000... (25 %)
Writing at 0x00094000... (26 %)
Writing at 0x00098000... (27 %)
Writing at 0x0009c000... (28 %)
Writing at 0x000a0000... (29 %)
Writing at 0x000a4000... (29 %)
Writing at 0x000a8000... (30 %)
Writing at 0x000ac000... (31 %)
Writing at 0x000b0000... (32 %)
Writing at 0x000b4000... (33 %)
Writing at 0x000b8000... (33 %)
Writing at 0x000bc000... (34 %)
Writing at 0x000c0000... (35 %)
Writing at 0x000c4000... (36 %)
Writing at 0x000c8000... (37 %)
Writing at 0x000cc000... (37 %)
Writing at 0x000d0000... (38 %)
Writing at 0x000d4000... (39 %)
Writing at 0x000d8000... (40 %)
Writing at 0x000dc000... (40 %)
Writing at 0x000e0000... (41 %)
Writing at 0x000e4000... (42 %)
Writing at 0x000e8000... (43 %)
Writing at 0x000ec000... (44 %)
Writing at 0x000f0000... (44 %)
Writing at 0x000f4000... (45 %)
Writing at 0x000f8000... (46 %)
Writing at 0x000fc000... (47 %)
Writing at 0x00100000... (48 %)
Writing at 0x00104000... (48 %)
Writing at 0x00108000... (49 %)
Writing at 0x0010c000... (50 %)
Writing at 0x00110000... (51 %)
Writing at 0x00114000... (51 %)
Writing at 0x00118000... (52 %)
Writing at 0x0011c000... (53 %)
Writing at 0x00120000... (54 %)
Writing at 0x00124000... (55 %)
Writing at 0x00128000... (55 %)
Writing at 0x0012c000... (56 %)
Writing at 0x00130000... (57 %)
Writing at 0x00134000... (58 %)
Writing at 0x00138000... (59 %)
Writing at 0x0013c000... (59 %)
Writing at 0x00140000... (60 %)
Writing at 0x00144000... (61 %)
Writing at 0x00148000... (62 %)
Writing at 0x0014c000... (62 %)
Writing at 0x00150000... (63 %)
Writing at 0x00154000... (64 %)
Writing at 0x00158000... (65 %)
Writing at 0x0015c000... (66 %)
Writing at 0x00160000... (66 %)
Writing at 0x00164000... (67 %)
Writing at 0x00168000... (68 %)
Writing at 0x0016c000... (69 %)
Writing at 0x00170000... (70 %)
Writing at 0x00174000... (70 %)
Writing at 0x00178000... (71 %)
Writing at 0x0017c000... (72 %)
Writing at 0x00180000... (73 %)
Writing at 0x00184000... (74 %)
Writing at 0x00188000... (74 %)
Writing at 0x0018c000... (75 %)
Writing at 0x00190000... (76 %)
Writing at 0x00194000... (77 %)
Writing at 0x00198000... (77 %)
Writing at 0x0019c000... (78 %)
Writing at 0x001a0000... (79 %)
Writing at 0x001a4000... (80 %)
Writing at 0x001a8000... (81 %)
Writing at 0x001ac000... (81 %)
Writing at 0x001b0000... (82 %)
Writing at 0x001b4000... (83 %)
Writing at 0x001b8000... (84 %)
Writing at 0x001bc000... (85 %)
Writing at 0x001c0000... (85 %)
Writing at 0x001c4000... (86 %)
Writing at 0x001c8000... (87 %)
Writing at 0x001cc000... (88 %)
Writing at 0x001d0000... (88 %)
Writing at 0x001d4000... (89 %)
Writing at 0x001d8000... (90 %)
Writing at 0x001dc000... (91 %)
Writing at 0x001e0000... (92 %)
Writing at 0x001e4000... (92 %)
Writing at 0x001e8000... (93 %)
Writing at 0x001ec000... (94 %)
Writing at 0x001f0000... (95 %)
Writing at 0x001f4000... (96 %)
Writing at 0x001f8000... (96 %)
Writing at 0x001fc000... (97 %)
Writing at 0x00200000... (98 %)
Writing at 0x00204000... (99 %)
Writing at 0x00208000... (100 %)
Wrote 2594912 bytes (2073527 compressed) at 0x00010000 in 50.1 seconds (effective 414.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 119...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (119 compressed) at 0x00008000 in 0.0 seconds (effective 1638.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

 I do not know what to do after this. Please help.

I resolved the issue that was challenging my patience.
Here is what I did :

  1. I removed the connection between IO0 pin and Gnd
  2. I opened the serial monitor of Arduino IDE.
  3. I pressed the on-board RESET button that gave the following output :
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4

.....
WiFi connected
Starting web server on port: '80'
Starting stream server on port: '81'
Camera Ready! Use 'http://192.168.43.40' to connect

  1. I entered the URL 'http://192.168.43.40' and saw the default webpage of ESP32 CAM. I kept settings as they were and clicked the "Get Still" button. Here is the screenshot :

Thank you @Idahowalker @ZX80 @kgray9 for helping me out.

Shaunak

E (60) psram: PSRAM ID read error: 0xffffffff
Same error what should I do sir?

Thanks

Read the thread ?

The problem appeared to have been solved by replacing the ESP32CAM