I have a problem when i compile my program, on the output compile i have this problem. its too long for before read teh libraries, i dont have antivirus.
"D:\\SKRIPSI\\PROGRAM\\program_final_semuaa_jos\\partitions.csv" COPY /y "D:\\SKRIPSI\\PROGRAM\\program_final_semuaa_jos\\partitions.csv" "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\partitions.csv"
cmd /c if not exist "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\partitions.csv" if exist "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\esp32s3\\partitions.csv" COPY "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\esp32s3\\partitions.csv" "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\partitions.csv"
cmd /c if not exist "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\partitions.csv" COPY "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\tools\\partitions\\default.csv" "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\partitions.csv"
1 file(s) copied.
cmd /c IF EXIST "D:\\SKRIPSI\\PROGRAM\\program_final_semuaa_jos\\bootloader.bin" ( COPY /y "D:\\SKRIPSI\\PROGRAM\\program_final_semuaa_jos\\bootloader.bin" "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\program_final_semuaa_jos.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\esp32s3\\bootloader.bin" ( COPY "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.3\\variants\\esp32s3\\bootloader.bin" "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\program_final_semuaa_jos.ino.bootloader.bin" ) ELSE ( "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.9.dev3\\esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\\Users\\zidan\\AppData\\Local\\Temp\\arduino\\sketches\\96FFA6FD994A9EFEFD6A1CC04EC9C836\\program_final_semuaa_jos.ino.bootloader.bin" "C:\\Users\\zidan\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-489d7a2b-v1\\esp32s3\\bin\\bootloader_qio_80m.elf" ) )
esptool.py v4.8.1
I doubt turning off the verbose output makes the compile appreciably faster.
But what is "long"? Those lines certainly are, which make them hard to read. You should be posting all output with the <CODE/> button in the toolbar. They don't actually do much. Eight shell commands; on Windows, they start with good old cmd
if there's a partitions.csv in the sketch, copy it to the temp directory to build
if that didn't do anything, copy the default board-variant-specific partitions, if any
if that didn't do anything, copy the board-specific default. For that you got "1 file(s) copied"
Next, a very complicated command to copy bootloader.bin from the sketch to the temp build directory; or run esptool to create one. That's the "esptool.py v4.8.1" at the very end announcing itself as it runs
Did you stop there because it was taking too long? Did it hang? The next four
If there's a build_opt.h in the sketch, copy it to the temp build directory
If that didn't do anything, create an empty one
Create an empty file_opts file in the temp build directory
Finally, copy the sdkconfig file from the board platform into the temp build directory
After that, the next phase is announced: "Detecting libraries used..." Everything above might take 5 seconds on the slow side.
You are in the wrong subsection, this is not about a NanoEsp32 but about an ESP32S3 as far as i can tell.
To be honest, i never thought compiling of ESP32 sketches took all that long until i was compiling a big, yet modified sketch while i was on holidays. All of a sudden compile time was increased to 10-15 minutes or more (and there were compile errors every time)
So i am also a little confused about it, since i can not really re-produce this now, and the compile time is more or less what it always was. At the time it seemed every file in every library i included took about 30 seconds or something. It really took forever to get to the first successful compile and i have been wondering if it was because i was offline or something. Anyway as i said i haven't re-created the issue so now a biggish sketch takes about, hold on... 2 minutes on a fast laptop.
I am curious to know what is the actual cause of these really slow compiles. My advice is to persist and wait and at some point it should speed up again once you have completed a successfully compiled version, i suspect there will be some caching done or something.
Hi @zidanmzar. Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the dialog that opens when you select Help > About (or Arduino IDE > About Arduino IDE for macOS users) from the Arduino IDE menus.
I ask because I can tell from the output you shared that you are using an outdated version, and that might be a relevant factor.
Sorry to bud in, but i have a PC where i have both 1.8.19 & the latest 2.3.6 (i was on 2.3.4 but updating is happening as i am typing) but the 'core' installations are shared between versions. Is there something different other than the compilation process (done by the core and included files) between the older and newer IDE versions (because i somehow doubt that)
I would migrate to the newer IDE if the network ports for the ESP8266 would als obe recognized instead of just the ESP32 network ports)
btw still don't think this in the proper subsection of the forum.
That is often a conflict with an antivirus program. Even if you have not installed an antivirus program, Windows 10/11 has Windows Defender by default.
You can see the path of the temporary build folder used by @zidanmzar's IDE here:
Since it is under the arduino subfolder of the system temporary folder (C:\Users\zidan\AppData\Local\Temp), we know that @zidanmzar is using a version of Arduino IDE from the 2.0.4 - 2.3.3 range.
The Arduino IDE developers are tracking this bug here:
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.
The current Development Tools > IDE 2.x forum category is the most appropriate place for topics about long sketch compilation durations.
But how would that explain the return to a normal 2 minutes compile time ? Also i fail to see what it has to do with compile time at all. Upload time or upload connection, port availability etc. Yes i understand. Compilation is just a translation of code by the processors, not network traffic is involved. Or is there ? because imo there really shouldn't be.
Yes but how does the location of these files possibly impact the compilation time ? Either there is access or there is not, but there is no speed difference expected between those locations. You answer how you can see that it is 2.0.4 onwards, but how is that relevant to the compilation. Compilation is an autonomous process by code that is included in the core.
Since @zidanmzar did not provide the information about which Arduino IDE version they are using, I had to use the build folder path shown in the output they shared as an indicator of which IDE version is in use.
The IDE version can be a factor in compilation time, as advancements have been made to improve the efficiency of compilation, and bugs fixed that impacted compilation time. So if @zidanmzar is using a significantly outdated version of Arduino IDE, it might be that the situation could be improved simply by updating to the latest version.
It is not so simple as that. As you guessed, Arduino IDE (actually the Arduino CLI that Arduino IDE uses to perform the compilation) caches the compiled objects and reuses those objects if appropriate on subsequent compilations. Note that the caching is done by Arduino IDE, not by GCC.
Caching dramatically affects the duration of the subsequent compilations. If the caching is not working correctly then the core and library dependencies of the sketch must be compiled from source every single time instead of only once.
Antivirus software may do an "on access"/"real time" scan. This means that when a process is initiated, the antivirus blocks it while it performs a scan. Arduino IDE generates a large number of processes while compiling the sketch, so even if the antivirus only blocks each one for a matter of seconds, this can add up to a very significant increase in the duration of the compilation.
Arduino IDE and Arduino CLI communicate with each other via localhost. So some "network" traffic is involved in that, but purely internal to the machine.
However, it is possible that the antivirus software is communicating over the Internet as part of its scans.
Well that was my guess to begin with. I experienced the compilation of libraries taking a lot of time until the compile was at least successful once the whole process would be re-started from scratch even when the compile error was not related to the library at all. That may or may not be helped, but the compile time of these (relatively) small files took so long that it did seem a tad excessive. As stated before i have not re-created the process and compile time is now down to a decent 2 minutes but it does seem to me that it has more to do with the core than with the IDE.