Compilation error 1 , even though I use the example code from Arduino IDE

FQBN: esp32:esp32:esp32_family
Using board 'esp32_family' from platform in folder: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.2
Using core 'arduino' from platform in folder: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.2

cmd /c if exist "C:\\Users\\Admin\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025101-14988-1v7e3mc.ptup\\Server\\partitions.csv" COPY /y "C:\\Users\\Admin\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025101-14988-1v7e3mc.ptup\\Server\\partitions.csv" "C:\\Users\\Admin\\AppData\\Local\\arduino\\sketches\\6B48D7AE7F8FA01BA4EDE3BF1E5BDC79\\partitions.csv"
cmd /c if not exist "C:\\Users\\Admin\\AppData\\Local\\arduino\\sketches\\6B48D7AE7F8FA01BA4EDE3BF1E5BDC79\\partitions.csv" if exist "\\partitions.csv" COPY "\\partitions.csv" "C:\\Users\\Admin\\AppData\\Local\\arduino\\sketches\\6B48D7AE7F8FA01BA4EDE3BF1E5BDC79\\partitions.csv"
cmd /c if not exist "C:\\Users\\Admin\\AppData\\Local\\arduino\\sketches\\6B48D7AE7F8FA01BA4EDE3BF1E5BDC79\\partitions.csv" COPY "C:\\Users\\Admin\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.2\\tools\\partitions\\{build.partitions}.csv" "C:\\Users\\Admin\\AppData\\Local\\arduino\\sketches\\6B48D7AE7F8FA01BA4EDE3BF1E5BDC79\\partitions.csv"
The system cannot find the file specified.
exit status 1

Compilation error: exit status 1

Could anyone help with how to fix this? Here’s the code, it is from the BLE categories from the ESP32-C3 example

/*
    Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleServer.cpp
    Ported to Arduino ESP32 by Evandro Copercini
    updates by chegewara
*/

#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

// See the following for generating UUIDs:
// https://www.uuidgenerator.net/

#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");

  BLEDevice::init("Long name works now");
  BLEServer *pServer = BLEDevice::createServer();
  BLEService *pService = pServer->createService(SERVICE_UUID);
  BLECharacteristic *pCharacteristic =
    pService->createCharacteristic(CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);

  pCharacteristic->setValue("Hello World says Neil");
  pService->start();
  // BLEAdvertising *pAdvertising = pServer->getAdvertising();  // this still is working for backward compatibility
  BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
  pAdvertising->addServiceUUID(SERVICE_UUID);
  pAdvertising->setScanResponse(true);
  pAdvertising->setMinPreferred(0x06);  // functions that help with iPhone connections issue
  pAdvertising->setMinPreferred(0x12);
  BLEDevice::startAdvertising();
  Serial.println("Characteristic defined! Now you can read it in your phone!");
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(2000);
}

You should not be too impatient. Those in the know might be sleeping; give it 24 hours to go around the world.

I did successfully compile your sketch for an ESP32C3 Dev Module; which board did you select (so we can test)?

Two things stand out in your compile output

I've never seen esp32_family but that is not the holy grail; for my compile output the first few lines are

FQBN: esp32:esp32:esp32c3
Using board 'esp32c3' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.2
Using core 'esp32' from platform in folder: C:\Users\bugge\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.2

Note the reference to esp32c3.

{build.partitions} should have been replaced by the verify (copile) process by something else. In my compile output

cmd /c if not exist "C:\\Users\\bugge\\AppData\\Local\\arduino\\sketches\\ACE393BB60D878A98AFF2CDDFD5EEC31\\partitions.csv" COPY "C:\\Users\\bugge\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.2\\tools\\partitions\\default.csv" "C:\\Users\\bugge\\AppData\\Local\\arduino\\sketches\\ACE393BB60D878A98AFF2CDDFD5EEC31\\partitions.csv"

These two things lead me to believe that the installation of the ESP32 platform might be corrupt.
You can try to downgrade the board package to e.g. 3.3.1 and see if that solves the problem. If so, you can next upgrade it again.

Oh ok , thank you so much for the board i use esp32-C3 and selected it from COM port

The COM port is not relevant at this stage. I don't have ESP32 based boards and can compile.

I don't think there is a "ESP32-C3" option in the IDE. What does the below say on your system in the IDE?

image

image

here’s , but i can change it to ESP32 Dev module

You should change it to some "ESP32C3" version.

I've tried to select what you selected from the drop down (I usually don't use it) but it's not found.

And tried to find it under tools → boards → esp32 but I might have missed it.

I would suggest to follow the earlier advice to downgrade the board package and see if that solves the problem; and next upgrade.

When I change the board to ESP32 dev module, it just works and is done compiling. Thanks

I have esp32 version 3.0.7 installed. Right near the top of Arduino15/packages/esp32/hardware/esp32/3.0.7/boards.txt

##############################################################
### DO NOT PUT BOARDS ABOVE THE OFFICIAL ESPRESSIF BOARDS! ###
##############################################################

# Generic definition to be used for USB discovery of CDC/JTAG
esp32_family.name=ESP32 Family Device
esp32_family.hide=true
esp32_family.vid.0=0x303a
esp32_family.pid.0=0x1001
esp32_family.upload_port.0.vid=0x303a
esp32_family.upload_port.0.pid=0x1001
esp32_family.build.board=ESP32_FAMILY

##############################################################

esp32c2.name=ESP32C2 Dev Module
esp32c2.hide=true

esp32c2.bootloader.tool=esptool_py
esp32c2.bootloader.tool.default=esptool_py

Note the hide=true. It's a little stub with a bunch of stuff missing, not just the build.partitions. The comment describes its actual use.

The second board is the only other one with hide=true, in 3.0.7 at least.

Apparently accidentally (or incompletely) unhidden in 3.3.2

1 Like

As said, I'm not familiar with ESP32 boards so I don't know the differences. But why did you not select ESP32C3 Dev Module as I did.