Compile error with esp32:nodemcu-32s

Hello,

I am working with IDE 2.1.0

When I test and compile - link a sketch it runs and executes normally.

If I save, reopen and recompile it fails giving:

FQBN: esp32:esp32:nodemcu-32s
Using board 'nodemcu-32s' from platform in folder: C:\Users\horac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6
Using core 'esp32' from platform in folder: C:\Users\horac\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6

cmd /c if exist "D:\\AsusCloud\\Electronica\\Arduino\\Development\\R&D\\testedSnippets\\RNT-01-ESP_TO_DATABASE_Test03\\partitions.csv" copy /y "D:\\AsusCloud\\Electronica\\Arduino\\Development\\R&D\\testedSnippets\\RNT-01-ESP_TO_DATABASE_Test03\\partitions.csv" "C:\\Users\\horac\\AppData\\Local\\Temp\\arduino\\sketches\\E4EC290BD0231E8629480313EF122E16\\partitions.csv"
& was unexpected at this time.

exit status 1

Compilation error: exit status 1

What am I missing ?

Thanks a lot,
And very nice day
Horacio

I think the problem is the "&" in the path ( "...\R&D\..." )

Regards

1 Like

Great !!!

Curiosity: I use R&D also for Arduino Uno, and never got this ...
The compile or link syntax are perhaps different, and Arduino Uno does not pass thru that "copy"

Best regards !
Horacio

PS:
Gracias Máximo !
Justificas tu nombre !

The '&' is a special character - used by the Windows command interpreter for combining multiple commands onto a single line.

So, when you have an '&' in a file (or folder) name, you have to "escape" it - to prevent it being taken as indicating a separate command.

Not quite - it means that one did the "escaping" properly, and the other didn't.

You get similar problems with spaces in file/folder names ...

For a simple life, never use any special characters in your file or folder names!

https://www.avrfreaks.net/s/topic/a5C3l000000UY8vEAG/t145039?comment=P-1182240

https://www.itprotoday.com/devops-and-software-development/rem-escaping-reserved-characters-command-line-arguments

Rather it is that such escaping is not needed when using the Uno because its boards platform does not use the Windows command interpreter.

The ESP32 platform is unique when compared to the "Arduino AVR Boards" platform in that it uses the Windows command interpreter to gain logic capabilities that are not provided by the Arduino boards platform framework itself:

https://github.com/espressif/arduino-esp32/blob/1.0.6/platform.txt#L72

recipe.hooks.prebuild.1.pattern.windows=cmd /c if exist "{build.source.path}\partitions.csv" copy /y "{build.source.path}\partitions.csv" "{build.path}\partitions.csv"

Note the cmd /c. The "Arduino AVR Boards" platform doesn't need such capabilities so it doesn't use the Windows command interpreter.

1 Like

Thanks for all the answers !
Best regards
Horacio

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.