Arduino IDE code uploading errors

Hi,

All the libraries are updated, the compilation runs successfully and I can see that "Arduino Com 4" shows at the windows' device manager while the board is connected and dissapears when I disconnect the board. The on light is on at the Arduino Uno board when it is connected with the USB cable, the reset button makes the lights flash on the board when I press it. I've been uploading code to this board with another PC with no problems. But when I try to upload the code with my desktop PC to the Arduino Uno board I get this error:

Arduino:1.8.15 (Windows 7), Tarjeta:"Arduino Uno"

c:\program files (x86)\arduino\arduino-builder -dump-prefs -logger=machine -hardware c:\program files (x86)\arduino\hardware -hardware C:\Users\m\AppData\Local\Arduino15\packages -tools c:\program files (x86)\arduino\tools-builder -tools c:\program files (x86)\arduino\hardware\tools\avr -tools C:\Users\m\AppData\Local\Arduino15\packages -built-in-libraries c:\program files (x86)\arduino\libraries -libraries C:\Users\m\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10815 -build-path C:\Users\m\AppData\Local\Temp\arduino_build_762535 -warnings=none -build-cache C:\Users\m\AppData\Local\Temp\arduino_cache_894850 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\m\Documents\Arduino\sketch_adc\sketch_adc.ino

c:\program files (x86)\arduino\arduino-builder -compile -logger=machine -hardware c:\program files (x86)\arduino\hardware -hardware C:\Users\m\AppData\Local\Arduino15\packages -tools c:\program files (x86)\arduino\tools-builder -tools c:\program files (x86)\arduino\hardware\tools\avr -tools C:\Users\m\AppData\Local\Arduino15\packages -built-in-libraries c:\program files (x86)\arduino\libraries -libraries C:\Users\m\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10815 -build-path C:\Users\m\AppData\Local\Temp\arduino_build_762535 -warnings=none -build-cache C:\Users\m\AppData\Local\Temp\arduino_cache_894850 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\m\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\m\Documents\Arduino\sketch_adc\sketch_adc.ino

avrdude: can't open input file C:\Users\m\AppData\Local\Temp\arduino_build_762535/sketch_adc.ino.hex: No such file or directory

avrdude: read from file 'C:\Users\m\AppData\Local\Temp\arduino_build_762535/sketch_adc.ino.hex' failed

Ha ocurrido un error mientras se enviaba el sketch

(Last line reads in english: An error has occurred while the sketch was being sent)

Using the Windows' file explorer I can see sketch_adc.ino.cpp file located at:

C:\Users\m\AppData\Local\Temp\arduino_build_762535\sketch

But there is no .hex file (with the current date and time) there or at:

C:\Users\m\AppData\Local\Temp\arduino_build_762535

(the time and date in this PC are correct)

Or anywhere in my hard disk (I used the file search with the parameter: *.hex)

I am wondering why the last part of the route the IDE is looking at has a forward slash instead of a backslash...

C:\Users\m\AppData\Local\Temp\arduino_build_762535/sketch_adc.ino.hex

I have mblock installed in this PC, which integrates with the IDE, can that be causing a problem?

Many thanks
Best Regards

Marcelo

@lw3eov
The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

This is normal and expected. The reason is thatthe first part of the path is generated by Windows, but the second part is defined as part of the upload "recipe", which must be used on Linux and macOS in addition to Windows. Windows supports both \ and / as path separators, but Linux and macOS only support /, so in order to make it work on all operating systems it's required to use /:

This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single upload to see if the problem goes away, then turn the antivirus back on.

If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allow list" so it doesn't interfere with compilation.

Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to not interfere with the Arduino software.

Why are you focused on the time and date?

I used the "copy error messages" button but I forgot the code tags, now I added them. I have Malwarebytes installed but it is not resident in memory, it only works when I execute it. I have not used it on that Windows session and I cannot see it in the task manager. There is no other antivirus in my PC. Please be aware that the code compiles without producing any error, it is only a problem when I try to upload it to the Arduino Uno board with this desktop PC. I mentioned the time and date as there are other hex files generated by the Arduino IDE in my PC but those were made when I was playing with Proteus simulation about a week ago. I also want to mention that I am using a solid state drive and it is fine so far (as someone may suggest that the problem can be with a bad drive).

Something really weird happened now: I am now using the Arduino IDE under Xubuntu with the same file that contains the same code as before and it is showing me some errors I made during the writing of the code (like missing ";"), but those errors were not showing in the Arduino IDE for Windows! Here you can see a video of the compilation process under Windows of some text that can never compile! (I suggest to select a reduced playback speed and expand the video to make that window bigger): ScreenCapture_2021-6-28 14.39.59

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