Esp32 board library error?

Hello developers,

I'm having trouble compiling code for esp32 board. I have chose sample code from examples but that too is giving error I suspect some problem with esp32 board Library. Also want to mention that I have installed latest library and tried various old Arduino ide but same problem is coming. Any suggestions will be helpful. Thank you.

Operating system : windows 10, 64bit
Arduino ide version : 1.8.15
Esp32 library : 1.0.6
Boards manager link : https://dl.espressif.com/dl/package_esp32_index.json

-Board library downloaded from Arduino ide boards manager

Code:

/*
    This sketch demonstrates how to scan WiFi networks.
    The API is almost the same as with the WiFi Shield library,
    the most obvious difference being the different file you need to include:
*/
#include "WiFi.h"

void setup()
{
  Serial.begin(115200);

  // Set WiFi to station mode and disconnect from an AP if it was previously connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  Serial.println("Setup done");
}

void loop()
{
  Serial.println("scan start");

  // WiFi.scanNetworks will return the number of networks found
  int n = WiFi.scanNetworks();
  Serial.println("scan done");
  if (n == 0) {
    Serial.println("no networks found");
  } else {
    Serial.print(n);
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i) {
      // Print SSID and RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(WiFi.SSID(i));
      Serial.print(" (");
      Serial.print(WiFi.RSSI(i));
      Serial.print(")");
      Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? " " : "*");
      delay(10);
    }
  }
  Serial.println("");

  // Wait a bit before scanning again
  delay(5000);
}

Error message:

Arduino: 1.8.15 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"




F:\WORK\arduino-1.8.15\arduino-builder -dump-prefs -logger=machine -hardware F:\WORK\arduino-1.8.15\hardware -hardware C:\Users\Drive&Control\AppData\Local\Arduino15\packages -tools F:\WORK\arduino-1.8.15\tools-builder -tools F:\WORK\arduino-1.8.15\hardware\tools\avr -tools C:\Users\Drive&Control\AppData\Local\Arduino15\packages -built-in-libraries F:\WORK\arduino-1.8.15\libraries -libraries C:\Users\Drive&Control\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32:PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -ide-version=10815 -build-path C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_build_126161 -warnings=all -build-cache C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_cache_107581 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.esptool_py.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -verbose C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_modified_sketch_937852\WiFiScan.ino

F:\WORK\arduino-1.8.15\arduino-builder -compile -logger=machine -hardware F:\WORK\arduino-1.8.15\hardware -hardware C:\Users\Drive&Control\AppData\Local\Arduino15\packages -tools F:\WORK\arduino-1.8.15\tools-builder -tools F:\WORK\arduino-1.8.15\hardware\tools\avr -tools C:\Users\Drive&Control\AppData\Local\Arduino15\packages -built-in-libraries F:\WORK\arduino-1.8.15\libraries -libraries C:\Users\Drive&Control\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32:PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none -ide-version=10815 -build-path C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_build_126161 -warnings=all -build-cache C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_cache_107581 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-1.22.0-97-gc752ad5-5.2.0.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0 -prefs=runtime.tools.esptool_py.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -prefs=runtime.tools.esptool_py-3.0.0.path=C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.0.0 -verbose C:\Users\DRIVE&~1\AppData\Local\Temp\arduino_modified_sketch_937852\WiFiScan.ino

Using board 'esp32' from platform in folder: C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

Using core 'esp32' from platform in folder: C:\Users\Drive&Control\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

cmd /c if exist "C:\\Users\\DRIVE&~1\\AppData\\Local\\Temp\\arduino_modified_sketch_937852\\partitions.csv" copy /y "C:\\Users\\DRIVE&~1\\AppData\\Local\\Temp\\arduino_modified_sketch_937852\\partitions.csv" "C:\\Users\\DRIVE&~1\\AppData\\Local\\Temp\\arduino_build_126161\\partitions.csv"

& was unexpected at this time.

exit status 1

Error compiling for board ESP32 Dev Module.

Any code will give same error message so I'm guessing its esp32 board library error.

What is your partition scheme?

I don't understand

Well, one of the errors points to a partition issue. So I was just wondering which partition scheme you are using.

If you look at the Arduino IDE there are some words File, Edit, Sketch, Tool, Help.

Clicking on the word Tool you can see other words like; Partition Scheme. What partition scheme are you using with your ESP32?

Which ESP board are you using?