Esp32s3 sense as mass storage

Hello, im new to this forum
I have been using esp32c3 and s3s for a couple of weeks
Yesterday, i received my first esp32s3 sense with the aim to use in part as a mass storage device
I have found a few tinyUSB examples but struggling to get them to work as they are not specific to the Sense so SPI chip select and SS pins are confusing me
Are there any examples for Seeed ESP32S3 Sense for using this device as a USB mass storage device?
Thanks in advance for any pointers
Tiggr

the S3 is the hardest one it use… what is a mass storage device?

Hi. Mass storage device
USB memory stick
There are libraries out there that when a seed s3 sense is connectted to an SD card, it will appear in windows Explorer as an external USB drive
These libraries are not for the Seeed S3 Sense so the pin mapping is different
CS is straightforward as the Seeed sense says the CS is GPIO21
SPI MISO, MOSI and CLK are default
Another define is labelled as SS but i cant find this on the Sense

intersting… post more information… so you talking about adding a USB A port and connecting a thumb drive… or using the micro SD slot?.. If you are trying to use the Micro SD on the camera board then know that it does not work like Arduino SD cards… It has its own dedicated high speed spi bus

Essentially this but for the ESP32S3 Sense
I would have thought this would have been ported to the ESP32s that have native USB like the Xiao C3, S3 and Sense but the sketches dont work on them even though some of the examples look like the should work with dufferent pin mapping

This but its in not in arduino code

Hi there,
and Welcome here…
So what did you try?
I was able to make it work with no issue?
Upon reset it opens the Xiao ESP32S3 in File manager.


HTH
GL :slight_smile: PJ
:v:

I used the Xiao Expansion board with SD built in Works great.

I have tried most of the examples in the Tiny USB library
What code did you use, and are there any settings in ‘Tools’ i need to change?

Hi there,
Yes. Its the mass storage example. USBMSC.ino
GL :slight_smile: PJ
:v:

I changed the name from ESP32S2 to ESP32S3 only.

Hi there,
Run this one first to verify the SD card is working properly is what I do.

#include <SPI.h>
#include <SD.h>
#include "FS.h"

File myFile;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while(!Serial);              // Execute after turning on the serial monitor
  delay(500);

  Serial.print("Initializing SD card...");

  pinMode(D2, OUTPUT);          // Modify the pins here to fit the CS pins of the SD card you are using.
  if (!SD.begin(D2)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");

  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("/test.txt", FILE_WRITE);          // The path to read and write files needs to start with "/"

  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
    // close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }

  // re-open the file for reading:
  myFile = SD.open("/test.txt");                       // The path to read and write files needs to start with "/"
  if (myFile) {
    Serial.println("test.txt:");

    // read from the file until there's nothing else in it:
    while (myFile.available()) {
      Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
}

void loop() {
  // nothing happens after setup
}

serial output should be this:

Initializing SD card...initialization done.
Writing to test.txt...done.
test.txt:
testing 1, 2, 3.
ESP-ROM:esp32s3-20210327

HTH
GL :slight_smile: PJ
:v:

Hi, school boy error
It recognised the sense as a drive once i had umplugged it thrn plugged it back in again
I now have a new issue :rofl:
The Sense’s port no longer appears so i cant upload any sketches
Arrrrggghh

Hi there,
LOL, You have to put it in bootLoader mode. after making it a drive
, great job working through it, You changed the tools menu too then?
Noting the warning in the text of the Code.

HTH
GL :slight_smile: PJ
:v:
For others:

/*********************************************************************
 Adafruit invests time and resources providing this open source code,
 please support Adafruit and open-source hardware by purchasing
 products from Adafruit!

 MIT license, check LICENSE for more information
 Copyright (c) 2019 Ha Thach for Adafruit Industries
 All text above, and the splash screen below must be included in
 any redistribution
*********************************************************************/

/* This example expose SD card as mass storage using
 * SdFat Library
 */

#include "SPI.h"
#include "SdFat.h"
#include "Adafruit_TinyUSB.h"

const int chipSelect = 10;

// File system on SD Card
SdFat sd;

SdFile root;
SdFile file;

// USB Mass Storage object
Adafruit_USBD_MSC usb_msc;

// Set to true when PC write to flash
bool fs_changed;

// the setup function runs once when you press reset or power the board
void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);

  // Set disk vendor id, product id and revision with string up to 8, 16, 4 characters respectively
  usb_msc.setID("Adafruit", "SD Card", "1.0");

  // Set read write callback
  usb_msc.setReadWriteCallback(msc_read_cb, msc_write_cb, msc_flush_cb);

  // Still initialize MSC but tell usb stack that MSC is not ready to read/write
  // If we don't initialize, board will be enumerated as CDC only
  usb_msc.setUnitReady(false);
  usb_msc.begin();

  Serial.begin(115200);
  //while ( !Serial ) delay(10);   // wait for native usb

  Serial.println("Adafruit TinyUSB Mass Storage SD Card example");

  Serial.print("\nInitializing SD card ... ");
  Serial.print("CS = "); Serial.println(chipSelect);

  if ( !sd.begin(chipSelect, SD_SCK_MHZ(50)) )
  {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    while (1) delay(1);
  }

  // Size in blocks (512 bytes)
#if SD_FAT_VERSION >= 20000
  uint32_t block_count = sd.card()->sectorCount();
#else
  uint32_t block_count = sd.card()->cardSize();
#endif

  Serial.print("Volume size (MB):  ");
  Serial.println((block_count/2) / 1024);

  // Set disk size, SD block size is always 512
  usb_msc.setCapacity(block_count, 512);

  // MSC is ready for read/write
  usb_msc.setUnitReady(true);

  fs_changed = true; // to print contents initially
}

void loop()
{
  if ( fs_changed )
  {
    root.open("/");
    Serial.println("SD contents:");

    // Open next file in root.
    // Warning, openNext starts at the current directory position
    // so a rewind of the directory may be required.
    while ( file.openNext(&root, O_RDONLY) )
    {
      file.printFileSize(&Serial);
      Serial.write(' ');
      file.printName(&Serial);
      if ( file.isDir() )
      {
        // Indicate a directory.
        Serial.write('/');
      }
      Serial.println();
      file.close();
    }

    root.close();

    Serial.println();

    fs_changed = false;
    delay(1000); // refresh every 0.5 second
  }
}

// Callback invoked when received READ10 command.
// Copy disk's data to buffer (up to bufsize) and
// return number of copied bytes (must be multiple of block size)
int32_t msc_read_cb (uint32_t lba, void* buffer, uint32_t bufsize)
{
  bool rc;

#if SD_FAT_VERSION >= 20000
  rc = sd.card()->readSectors(lba, (uint8_t*) buffer, bufsize/512);
#else
  rc = sd.card()->readBlocks(lba, (uint8_t*) buffer, bufsize/512);
#endif

  return rc ? bufsize : -1;
}

// Callback invoked when received WRITE10 command.
// Process data in buffer to disk's storage and 
// return number of written bytes (must be multiple of block size)
int32_t msc_write_cb (uint32_t lba, uint8_t* buffer, uint32_t bufsize)
{
  bool rc;

  digitalWrite(LED_BUILTIN, HIGH);

#if SD_FAT_VERSION >= 20000
  rc = sd.card()->writeSectors(lba, buffer, bufsize/512);
#else
  rc = sd.card()->writeBlocks(lba, buffer, bufsize/512);
#endif

  return rc ? bufsize : -1;
}

// Callback invoked when WRITE10 command is completed (status received and accepted by host).
// used to flush any pending cache.
void msc_flush_cb (void)
{
#if SD_FAT_VERSION >= 20000
  sd.card()->syncDevice();
#else
  sd.card()->syncBlocks();
#endif

  // clear file system's cache to force refresh
  sd.cacheClear();

  fs_changed = true;

  digitalWrite(LED_BUILTIN, LOW);
}

You do need to change the Tools menu selection for "USB-OTG(TinyUSB)
HTH
GL :slight_smile: PJ
:v:

Yes. I did notice the USB OTG setting
One of the few things i got right with this board
Im not at home now but i will work through it agsin later. The documentation is pretty good from what ive seen but one or two holes for newbies like me
Thank you for all your assistance with yhis
:star_struck:

1 Like

just when i thought it was all over, PJ
i tried the above sketch and it brought up multiple issues when it tried to compile
im proper out of my depth on this one, so i will be eternally grateful if you can point out where i am going wrong (again)
Thank you
T

7c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_inquiry_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:70: multiple definition of tud_msc_inquiry_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:133: first defined here
c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_test_unit_ready_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:79: multiple definition of tud_msc_test_unit_ready_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:156: first defined here
c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_capacity_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:86: multiple definition of tud_msc_capacity_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:177: first defined here
c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_read10_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:111: multiple definition of tud_msc_read10_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:233: first defined here
c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_write10_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:124: multiple definition of tud_msc_write10_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:246: first defined here
c:/users/dickhead/appdata/local/arduino15/packages/esp32/tools/esp-xs3/2302/bin/…/lib/gcc/xtensa-esp32s3-elf/12.2.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\Dickhead\AppData\Local\Temp\arduino-core-cache\core_98204d0b639d21dc3e39931c8f0d0b48.a(USBMSC.cpp.o): in function tud_msc_scsi_cb': C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\cores\esp32/USBMSC.cpp:138: multiple definition of tud_msc_scsi_cb’; C:\Users\Dickhead\AppData\Local\Temp\arduino-sketch-5470C80684560499573BD06C50BC00E3\libraries\Adafruit_TinyUSB_Arduino\arduino\msc\Adafruit_USBD_MSC.cpp.o:c:\Users\Dickhead\Documents\Arduino\libraries\Adafruit_TinyUSB_Arduino\src\arduino\msc/Adafruit_USBD_MSC.cpp:190: first defined here
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for “SPI.h”
Used: C:\Users\Dickhead\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\SPI
Not used: C:\Users\Dickhead\Documents\Arduino\libraries\SPI
exit status 1

Compilation error: exit status 1

Hi there,
I used BSP 3.0.2 the newest one FYI, I see you have 3.0.1 loaded. try again.
here was my compiler output…
Scroll right to see the BSP ver.

FQBN: esp32:esp32:XIAO_ESP32S3:USBMode=default
Using board 'XIAO_ESP32S3' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2
Using core 'esp32' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2

cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\partitions.csv" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\partitions.csv"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\partitions.csv" if exist "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\partitions.csv" COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\partitions.csv"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\partitions.csv" COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\partitions\\default_8MB.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\partitions.csv"
cmd /c IF EXIST "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\bootloader.bin" ( COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch_jul13g.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\bootloader.bin" ( COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch_jul13g.ino.bootloader.bin" ) ELSE ( "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6\\esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch_jul13g.ino.bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\bin\\bootloader_qio_80m.elf" ) )
esptool.py v4.6
Creating esp32s3 image...
Merged 1 ELF section
Successfully created esp32s3 image.
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\build_opt.h" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g\\build_opt.h" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\build_opt.h"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\build_opt.h" type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\build_opt.h"
cmd /c type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/file_opts"
Detecting libraries used...
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp-xs3\2302/bin/xtensa-esp32s3-elf-g++ -c @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/cpp_flags -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="XIAO_ESP32S3" -DARDUINO_VARIANT="XIAO_ESP32S3" -DARDUINO_PARTITION_default_8MB -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/defines -IC:\Users\Dude\AppData\Local\Temp\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\sketch_jul13g -iprefix C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/ @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/includes -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/qio_qspi/include -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32 -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\XIAO_ESP32S3 @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221/build_opt.h @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221/file_opts C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221\sketch\sketch_jul13g.ino.cpp -o nul
Generating function prototypes...
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp-xs3\2302/bin/xtensa-esp32s3-elf-g++ -c @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/cpp_flags -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="XIAO_ESP32S3" -DARDUINO_VARIANT="XIAO_ESP32S3" -DARDUINO_PARTITION_default_8MB -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/defines -IC:\Users\Dude\AppData\Local\Temp\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\sketch_jul13g -iprefix C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/ @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/includes -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/qio_qspi/include -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32 -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\XIAO_ESP32S3 @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221/build_opt.h @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221/file_opts C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221\sketch\sketch_jul13g.ino.cpp -o C:\Users\Dude\AppData\Local\Temp\4163511763\sketch_merged.cpp
C:\Users\Dude\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Dude\AppData\Local\Temp\4163511763\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-g++" -MMD -c "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/cpp_flags" -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"XIAO_ESP32S3\"" "-DARDUINO_VARIANT=\"XIAO_ESP32S3\"" -DARDUINO_PARTITION_default_8MB "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/defines" "-IC:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g" -iprefix "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/include/" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/includes" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/qio_qspi/include" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\cores\\esp32" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/build_opt.h" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/file_opts" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch\\sketch_jul13g.ino.cpp" -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch\\sketch_jul13g.ino.cpp.o"
Compiling libraries...
Compiling core...
cmd /c echo -DARDUINO_CORE_BUILD > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/file_opts"
Using precompiled core: C:\Users\Dude\AppData\Local\Temp\arduino\cores\53e03db0979d53f16fb2a6e466477a00\core.a
cmd /c type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/file_opts"
Linking everything together...
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-g++" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_flags" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_scripts" "-Wl,--Map=C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.map" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/lib" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/ld" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/qio_qspi" -Wl,--wrap=esp_panic_handler -Wl,--start-group "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\sketch\\sketch_jul13g.ino.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\cores\\53e03db0979d53f16fb2a6e466477a00\\core.a" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_libs" -Wl,--end-group -Wl,-EL -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.elf"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6/esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB --elf-sha256-offset 0xb0 -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.elf"
esptool.py v4.6
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\gen_esp32part.exe" -q "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.partitions.bin"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\libraries\\Insights" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\gen_insights_package.exe" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221" sketch_jul13g.ino "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024613-12472-odjv7d.553yl\\sketch_jul13g"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\libraries\\ESP_SR" if exist "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\esp_sr\\srmodels.bin" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\esp_sr\\srmodels.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221\\srmodels.bin"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6/esptool.exe" --chip esp32s3 merge_bin -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.merged.bin" --fill-flash-size 8MB --flash_mode keep --flash_freq keep --flash_size keep 0x0 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.bootloader.bin" 0x8000 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.partitions.bin" 0xe000 "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2/tools/partitions/boot_app0.bin" 0x10000 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.bin"
esptool.py v4.6
Wrote 0x800000 bytes to file C:\Users\Dude\AppData\Local\Temp\arduino\sketches\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.merged.bin, ready to flash to offset 0x0

"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-size" -A "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\BB333671E3B55BC508641B0286D2F221/sketch_jul13g.ino.elf"
Sketch uses 317277 bytes (9%) of program storage space. Maximum is 3342336 bytes.
Global variables use 38376 bytes (11%) of dynamic memory, leaving 289304 bytes for local variables. Maximum is 327680 bytes.

HTH
GL :slight_smile: PJ
:v: