Running Arduino 1.8.15 with ESP board version 2.0.5, I am trying to program a new NodeMCU-32-S2 (AI Thinker board) as "ESP32S2 Dev Module". Even with a blank sketch (no code in the loop and setup functions), compilation fails:
& was unexpected at this time.
exit status 1
Error compiling for board ESP32S2 Dev Module.
(using default settings for upload speed, USB, memory etc).
If I switch to a builtin Arduino (e.g. the Duemilanove for which I have been programming sketches several during years), compilation is succesful and upload can be done.
Since I could not find any related error messages through Google, I am consulting this forum. Can anyone suggest me how to start the debugging?
Compilation error with blank sketch
Re: Compilation error with blank sketch
My suggestion is to delete arduino-esp32 and install it again.
Re: Compilation error with blank sketch
Hi!
What is the full verbose error message?
Check the path and filename of the file, do not contain special characters, spaces, international characters, etc.
What is the full verbose error message?
Check the path and filename of the file, do not contain special characters, spaces, international characters, etc.
Re: Compilation error with blank sketch
Sorry, I got no notification about your responses and totally forgot about my post.
The verbose hint pointed out what the problem is:
So now the next problem. I reinstalled Arduino on another drive (D:\Arduino) and moved my sketches there. But when downloading the ESP32 platform it is stored in the same Users\<>\Appdata\Local folder again. How can I ensure the files are downloaded on my D:\ drive?
The verbose hint pointed out what the problem is:
Code: Select all
Using board 'esp32s2' from platform in folder: C:\Users\m&m\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5
Using core 'esp32' from platform in folder: C:\Users\m&m\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5
cmd /c if exist "C:\\Users\\m&m\\AppData\\Local\\Temp\\.arduinoIDE-unsaved20221028-6544-1f72gj0.0b94g\\sketch_nov28a\\partitions.csv" COPY /y "C:\\Users\\m&m\\AppData\\Local\\Temp\\.arduinoIDE-unsaved20221028-6544-1f72gj0.0b94g\\sketch_nov28a\\partitions.csv" "C:\\Users\\m&m\\AppData\\Local\\Temp\\arduino-sketch-3220BBB9036BF3AE1EB74409F8364C19\\partitions.csv"
& was unexpected at this time.
exit status 1
Compilation error: exit status 1
Re: Compilation error with blank sketch
Here is the problem. Arduino is having issue with your user name.& was unexpected at this time.
Re: Compilation error with blank sketch
In the end I managed to resolve this by creating a new windows account and move the data there. Problem resolved.
What did not work:
- manually force the file locations for sketch, arduino IDE, ESP32 platform data, libraries etc
- install the Arduino IDE in portable mode. This fails because during compilation, some files are stored in a temp dir in the %USER% folder. There is no way to force another location, even in portable mode.
Being unable to overrule the temp file location is a strange thing because it breaks the whole portability. I don't fully understand if this is because of the arduino environment or the esp32 platform implementation itself - still the compilation issue only exists for this platform, not for the default arduino duemilanove compilation flow.
What did not work:
- manually force the file locations for sketch, arduino IDE, ESP32 platform data, libraries etc
- install the Arduino IDE in portable mode. This fails because during compilation, some files are stored in a temp dir in the %USER% folder. There is no way to force another location, even in portable mode.
Being unable to overrule the temp file location is a strange thing because it breaks the whole portability. I don't fully understand if this is because of the arduino environment or the esp32 platform implementation itself - still the compilation issue only exists for this platform, not for the default arduino duemilanove compilation flow.
Re: Compilation error with blank sketch
Thats the arduino IDE setup where temp is located, nothing to do with esp32.
Who is online
Users browsing this forum: No registered users and 135 guests