Compilation error with blank sketch

_xcel_
Posts: 3
Joined: Fri Nov 11, 2022 8:19 pm

Compilation error with blank sketch

Postby _xcel_ » Fri Nov 11, 2022 8:25 pm

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?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Compilation error with blank sketch

Postby chegewara » Tue Nov 15, 2022 10:46 am

My suggestion is to delete arduino-esp32 and install it again.

pipi61
Posts: 60
Joined: Fri Dec 23, 2016 10:58 pm

Re: Compilation error with blank sketch

Postby pipi61 » Wed Nov 16, 2022 9:42 pm

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.

_xcel_
Posts: 3
Joined: Fri Nov 11, 2022 8:19 pm

Re: Compilation error with blank sketch

Postby _xcel_ » Mon Nov 28, 2022 8:08 pm

Sorry, I got no notification about your responses and totally forgot about my post.
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
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?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Compilation error with blank sketch

Postby chegewara » Tue Nov 29, 2022 1:43 am

& was unexpected at this time.
Here is the problem. Arduino is having issue with your user name.

_xcel_
Posts: 3
Joined: Fri Nov 11, 2022 8:19 pm

Re: Compilation error with blank sketch

Postby _xcel_ » Wed Nov 30, 2022 1:37 pm

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.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Compilation error with blank sketch

Postby chegewara » Thu Dec 01, 2022 12:32 am

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 37 guests