Getting error when trying to build & deploy code on Arduino. Error "Spaces in build-related folder paths can cause the build process to fail"
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mohammad Zainullah Khan
le 9 Oct 2022
Réponse apportée : Vikas Chelluru
le 27 Fév 2023
This is the error that I am getting. It might be due to the fact that my Windows Username has a space 'Zain Khan'. I am not sure how to resolve this error.
The model that I am trying to deploy is stored in C:\ProgramData\MATLAB\SupportPackages\R2022a\3P.instrset\aekrev2projectfiles.instrset and the toolboxes being used are installed in C:\Program Files\MATLAB\MATLAB Add-Ons\Toolboxe.
### Starting build procedure for: roverOpenloop_hw
Warning: Unable to remove spaces from file path 'C:/Users/Zain Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1'. Spaces in build-related folder paths can cause the build process to fail. For more information, see Build Process Support for Folder Names with Spaces or Special Characters.
"### Generating static library."
"C:/Program Files/MATLAB/R2022a/bin/win64/gmake" -j5 -C "C:/PROGRA~3/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/ARDUIN~1/STATIC~1" SHELL="%SystemRoot%/system32/cmd.exe" -f samdcomm.mk all
gmake[1]: Entering directory `C:/PROGRA~3/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/ARDUIN~1/STATIC~1'
samdcomm.mk:106: warning: overriding commands for target `C:/Users/Zain'
samdcomm.mk:91: warning: ignoring old commands for target `C:/Users/Zain'
samdcomm.mk:108: warning: overriding commands for target `C:/Users/Zain'
samdcomm.mk:106: warning: ignoring old commands for target `C:/Users/Zain'
samdcomm.mk:110: warning: overriding commands for target `C:/Users/Zain'
samdcomm.mk:108: warning: ignoring old commands for target `C:/Users/Zain'
samdcomm.mk:112: warning: overriding commands for target `C:/Users/Zain'
samdcomm.mk:110: warning: ignoring old commands for target `C:/Users/Zain'
samdcomm.mk:114: warning: overriding commands for target `C:/Users/Zain'
samdcomm.mk:112: warning: ignoring old commands for target `C:/Users/Zain'
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
"C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER=\""Arduino LLC\"" -DUSB_PRODUCT=\""Arduino NANO 33 IoT\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_NANO33_IOT_ -DCRYSTALLESS -DARDUINO_VIRTUAL_COM_PORT -DARDUINO_WIFI_LIB_NINA -DARDUINO_NUM_SERIAL_PORTS=2 -DARDUINO_ARM_CORTEX_M0_PLUS -DARDUINO_ARM -MF"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/SPI.dep" -MT"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/SPI.o" -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot -o "Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/SPI.o" "C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI/SPI.cpp"
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
"C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER=\""Arduino LLC\"" -DUSB_PRODUCT=\""Arduino NANO 33 IoT\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_NANO33_IOT_ -DCRYSTALLESS -DARDUINO_VIRTUAL_COM_PORT -DARDUINO_WIFI_LIB_NINA -DARDUINO_NUM_SERIAL_PORTS=2 -DARDUINO_ARM_CORTEX_M0_PLUS -DARDUINO_ARM -MF"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Wire.dep" -MT"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Wire.o" -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI/SPI.cpp:265:100: fatal error: opening dependency file Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/SPI.dep: No such file or directory
SPIClass SPI1(&PERIPH_SPI1, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_MOSI, PAD_SPI1_TX, PAD_SPI1_RX);
^
ackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot -o "Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Wire.o" "C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire/Wire.cpp"
compilation terminated.
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
"C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER=\""Arduino LLC\"" -DUSB_PRODUCT=\""Arduino NANO 33 IoT\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_NANO33_IOT_ -DCRYSTALLESS -DARDUINO_VIRTUAL_COM_PORT -DARDUINO_WIFI_LIB_NINA -DARDUINO_NUM_SERIAL_PORTS=2 -DARDUINO_ARM_CORTEX_M0_PLUS -DARDUINO_ARM -MF"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Servo.dep" -MT"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Servo.o" -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot -o "Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Servo.o" "C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src/samd/Servo.cpp"
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
"C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON -DUSB_MANUFACTURER=\""Arduino LLC\"" -DUSB_PRODUCT=\""Arduino NANO 33 IoT\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_NANO33_IOT_ -DCRYSTALLESS -DARDUINO_VIRTUAL_COM_PORT -DARDUINO_WIFI_LIB_NINA -DARDUINO_NUM_SERIAL_PORTS=2 -DARDUINO_ARM_CORTEX_M0_PLUS -DARDUINO_ARM -MF"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/variant.dep" -MT"Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/variant.o" -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/SPI -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot -o "Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/variant.o" "C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot/variant.cpp"
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
gmake[1]: Circular C:/Users/Zain <- C:/Users/Zain dependency dropped.
gmake[1]: Circular Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/MW_RebuildSrc_Comm.o <- C:/Users/Zain dependency dropped.
gmake[1]: Circular Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/MW_RebuildSrc_Comm.o <- C:/Users/Zain dependency dropped.
gmake[1]: Circular Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/MW_RebuildSrc_Comm.o <- C:/Users/Zain dependency dropped.
gmake[1]: Circular Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/MW_RebuildSrc_Comm.o <- C:/Users/Zain dependency dropped.
gmake[1]: *** [Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/SPI.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/libraries/Servo/src/samd/Servo.cpp:295:1: fatal error: opening dependency file Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Servo.dep: No such file or directory
}
^
compilation terminated.
C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/libraries/Wire/Wire.cpp:295:3: fatal error: opening dependency file Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Wire.dep: No such file or directory
}
^
compilation terminated.
gmake[1]: *** [Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Servo.o] Error 1
gmake[1]: *** [Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/Wire.o] Error 1
C:/ProgramData/MATLAB/SupportPackages/R2022a/aIDE/portable/packages/arduino/hardware/samd/1.8.9/variants/nano_33_iot/variant.cpp:207:1: fatal error: opening dependency file Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/variant.dep: No such file or directory
}
^
compilation terminated.
gmake[1]: *** [Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1/variant.o] Error 1
gmake[1]: Leaving directory `C:/PROGRA~3/MATLAB/SupportPackages/R2022a/toolbox/target/supportpackages/ARDUIN~1/STATIC~1'
gmake: *** [all] Error 2
The make command returned an error of 2
### Build procedure for roverOpenloop_hw aborted due to an error.
Build Summary
Top model targets built:
Model Action Rebuild Reason
============================================================================
roverOpenloop_hw Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 12.489s
Error(s) encountered while building "roverOpenloop_hw"
0 commentaires
Réponse acceptée
Arun Kumar
le 10 Oct 2022
Modifié(e) : Arun Kumar
le 10 Oct 2022
Hi Mohammad Zainullah Khan,
You are right, the error is due to the space in your username.
The second line in the log clarifies that:
Warning: Unable to remove spaces from file path 'C:/Users/Zain Khan/DOCUME~1/MATLAB/R2022a/ARDUIN~1/ARDUIN~1/FASTER~1'. Spaces in build-related folder paths can cause the build process to fail. For more information, see Build Process Support for Folder Names with Spaces or Special Characters.
This is because the static libraries are generated in the following folder by default:
C:\Users\<username>\Documents\MATLAB\<MATLAB Version>\ArduinoStaticLibrary
Since your username has a space, you are seeing the error.
To fix, this change the environment variable 'ARDUINO_STATIC_LIB_PATH' which will force the creation of static libraries in some other folder.
setenv('ARDUINO_STATIC_LIB_PATH',<new path for static libraries>)
For example:
setenv('ARDUINO_STATIC_LIB_PATH','C:\ProgramData\MATLAB\StaticLibs')
Hope this helps!
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!