probably a silly quiestion...

Hi. I have just got a new elegoo mega 2560. when i am trying to upload new sketches i get the error messages:

c:\program files (x86)\arduino\hardware\tools\avr\bin../lib/gcc/avr/7.3.0/../../../../avr/bin/ar.exe: unable to rename '

C:\Users\rober\AppData\Local\Temp\arduino_build_366938\core\core.a'; reason: Permission denied

exit status 1
Error compiling for board Arduino Mega or Mega 2560.

I have an idea that this is because i was trying to compile and upload new sketches while the board was still plugged into the usb on my computer. (Being lazy and not unplugging it while starting something new).

It seems to resolve if I unplug it while recompiling/verifying new sketches.

so I am just checking in to see if this makes sense, or if it is some underlying problem I am not seeing.

You can manually delete the core.a file that can't be renamed. If you want to play it safe, rename it to e.g. core.a.old.

You can change sketches, create new ones, compile etc while your board is connected, no need to disconnect every time.

sterretje

thanks i will try it. i was always able to reprogram with an unoR3 plugged in but thought it might be a difference in the boards.