XIAO: Trouble Compiling - Error while detecting libraries - exit status 1

Hello. Am new to the XIAO community. Excited to be here.

I have a new XIAO connected to a Win 10 machine via USB C and Arduino IDE Version: 2.0.1 on Comm 12. The board installed without issue and I am able to load the Fade Sketch without issue & I can see VIN/PID under board info.

When I try to compile a different sketch, I am being tole there is an error detecting libraries. Happens consistently regardless if I select Upload or just compile. Tried following the path but failed.

This is the full text of the error msg.

Using board ‘seeed_XIAO_m0’ from platform in folder: C:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3
Using core ‘arduino’ from platform in folder: C:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3
Detecting libraries used…
“C:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++” -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions “-D__SKETCH_NAME__=”"“BMT” “2.ino”""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 “-DUSB_MANUFACTURER=“Seeed”” “-DUSB_PRODUCT=“Seeed XIAO M0"” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src” -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 “-DUSB_MANUFACTURER=“Seeed”” “-DUSB_PRODUCT=“Seeed XIAO M0"” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\variants\XIAO_m0” “C:\Users\domin\AppData\Local\Temp\arduino-sketch-0DC5B57FA986BD92C6E400ECBBAEB96F\sketch\BMT 2.ino.cpp” -o nul
arm-none-eabi-g++: error: 2.ino””": Invalid argument
Error while detecting libraries included by C:\Users\domin\AppData\Local\Temp\arduino-sketch-0DC5B57FA986BD92C6E400ECBBAEB96F\sketch\BMT 2.ino.cpp
Generating function prototypes…
“C:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++” -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions “-D__SKETCH_NAME__=”"“BMT” “2.ino”""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 “-DUSB_MANUFACTURER=“Seeed”” "-DUSB_PRODUCT=“Seeed XIAO M0"” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src” -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 “-DUSB_MANUFACTURER=“Seeed”” "-DUSB_PRODUCT=“Seeed XIAO M0"” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\cores\arduino” “-IC:\Users\domin\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.3\variants\XIAO_m0” “C:\Users\domin\AppData\Local\Temp\arduino-sketch-0DC5B57FA986BD92C6E400ECBBAEB96F\sketch\BMT 2.ino.cpp” -o “C:\Users\domin\AppData\Local\Temp\arduino-sketch-0DC5B57FA986BD92C6E400ECBBAEB96F\preproc\ctags_target_for_gcc_minus_e.cpp”

exit status 1

Compilation error: exit status 1

I can upload the code if it helps.

The actual reported error is:

C:\Users\domin\AppData\Local\Temp\arduino-sketch-0DC5B57FA986BD92C6E400ECBBAEB96F\sketch\BMT 2.ino.cpp”“ -o nul
arm-none-eabi-g++: error: 2.ino””": Invalid argument

The last line indicates the compilere is looking for file “2.ino” splitting intended file name at space.
You are on Windows with the IDE (which I am unfamiliar with) - but the sketch name is
BMT 2.ino which gets converted to “BMT 2.ino.cpp” and it seems the space is creating problems for compiler. Maybe rename sketch to “BMT_2.ino” and see what happens.

Winner! Winner! Chicken dinner.

I am both thankful and embarrassed to say that your proposed solution worked perfectly.

Did a quick Save As and uploaded without issue. You just helped me finish the last piece of a project build… now to do some 3D printing.

Have a great evening.