Access is denied when trying to upload sketch

Hello, I'm very new to Arduino IDE. I tried to learn it for my project. The project that I'm working on is based on this : https://www.youtube.com/watch?v=bd96662Rftg

When I tried it I got this error

Using board 'uno' from platform in folder: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Using core 'arduino' from platform in folder: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Detecting libraries used...
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp" -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\SPI\\src" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp" -o nul
Alternatives for MFRC522.h: [MFRC522@1.4.10]
ResolveLibrary(MFRC522.h)
  -> candidates: [MFRC522@1.4.10]
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\SPI\\src" "-IC:\\Users\\Qibbo\\Documents\\Arduino\\libraries\\MFRC522\\src" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp" -o nul
Using cached library dependencies for file: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\SPI\src\SPI.cpp
Using cached library dependencies for file: C:\Users\Qibbo\Documents\Arduino\libraries\MFRC522\src\MFRC522.cpp
Using cached library dependencies for file: C:\Users\Qibbo\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp
Generating function prototypes...
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\SPI\\src" "-IC:\\Users\\Qibbo\\Documents\\Arduino\\libraries\\MFRC522\\src" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp" -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\SPI\\src" "-IC:\\Users\\Qibbo\\Documents\\Arduino\\libraries\\MFRC522\\src" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp" -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp.o"
Compiling libraries...
Compiling library "SPI"
Using previously compiled file: C:\Users\Qibbo\AppData\Local\Temp\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\libraries\SPI\SPI.cpp.o
Compiling library "MFRC522"
Using previously compiled file: C:\Users\Qibbo\AppData\Local\Temp\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\libraries\MFRC522\MFRC522Extended.cpp.o
Using previously compiled file: C:\Users\Qibbo\AppData\Local\Temp\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\libraries\MFRC522\MFRC522.cpp.o
Compiling core...
Using precompiled core: C:\Users\Qibbo\AppData\Local\Temp\arduino-core-cache\core_arduino_avr_uno_654c0c41be1a1455ac39cc13934ad66b.a
Linking everything together...
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\sketch\\rfid_read_personal_data.ino.cpp.o" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\libraries\\MFRC522\\MFRC522.cpp.o" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D\\libraries\\MFRC522\\MFRC522Extended.cpp.o" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/..\\arduino-core-cache\\core_arduino_avr_uno_654c0c41be1a1455ac39cc13934ad66b.a" "-LC:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D" -lm
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.eep"
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.hex"

Using library SPI at version 1.0 in folder: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\SPI 
Using library MFRC522 at version 1.4.10 in folder: C:\Users\Qibbo\Documents\Arduino\libraries\MFRC522 
"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.elf"
Sketch uses 6666 bytes (20%) of program storage space. Maximum is 32256 bytes.
Global variables use 281 bytes (13%) of dynamic memory, leaving 1767 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\Qibbo\AppData\Local\Temp\arduino-sketch-3A9411196FBAAB3BBC43A361B40F8E4D/rfid_read_personal_data.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: ser_open(): can't open device "\\.\COM3": Access is denied.



avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Please help :smiling_face_with_tear:
thank you!

Hi, @cantcode
Welcome to the forum.

What OS are you using?
What version of the IDE are you using?
What model controller are you trying to program?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Does your Arduino appear on COM3 when you connect it to your PC? Check in Device Manager if you are not sure.

I'm using Windows 11, IDE version 2.0.0 and I'm trying to program Arduino UNO

Yes, it does

This might happen if you have your COM port opened somewhere else aswell.
I've seen this message recently, when I tried to run the arduino-cli on the same port, that I had already open in a Serial Monitor in the Arduino IDE.

See also: Compile and Upload .ino file to Aruduino board via arduino-cli - fotografeer.nl, about 1/3 in the post, below " Limitations and Known Issues" and sub-heading "Serial Terminals block access to COM ports".

Try to find anything that might be using your COM port. E.g. a communications program like Putty, a serial monitor in the Fritzing IDE, or even a driver. Make sure they are shut down. Or find another USB port to connect your board to. The key is to make sure that the Arduino IDE is the only thing connecting to the COM port where you have your board attached.

Hi,

This is the new generation version, have you updated it?
2.0.0 is relatively old now.

Have you tried the older PC based type IDE 1.8.19 ?

Tom.. :smiley: :+1: :coffee: :australia:

Does that also happens on the first time? :sweat_smile: This is my very first time using it :sweat_smile: But I'll still check it out, thanks!

I'll try update it.
No, I haven't. I don't have an old PC :sweat_smile:
I'm using on my laptop

Same thing, PC, Laptop, same OS.
Download 1.8.19 IDE.

2.0.x is still in development mode and has bugs.

Tom.. :smiley: :+1: :coffee: :australia:

For me, it happened only when my COM port was already in use by another process. If you just started your computer and only opened up Arduino IDE it is unlikely that another process is already using the port.

Make sure you first select the correct board and COM port. Then expand the board pulldown menu, you should see which you are using. E.g.:

Then see if you can upload the sketch.

Okay, I'll try the older version.

I've tried both of the COM ports
image_2023-01-05_103148540
The result is still the same
I'll try the older version first and I'll update

When I tried on COM 4, I got this error

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"

Sketch uses 6666 bytes (20%) of program storage space. Maximum is 32256 bytes.

Global variables use 281 bytes (13%) of dynamic memory, leaving 1767 bytes for local variables. Maximum is 2048 bytes.

avrdude: ser_open(): can't open device "\\.\COM4": The semaphore timeout period has expired.




Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This is on 1.8.19 version

I've tried it, but it still the same.
Maybe I didn't assembled it right?

Also my laptop says this when I plugged in the board
image_2023-01-05_114036831
I started to think that I didn't assembled it properly :sweat_smile: :smiling_face_with_tear:

I'd advise you to go back to basics and first make sure you can connect and upload.

Only connect one board to your laptop, without any sensors or output devices attached to it. Try to upload the Blink.ino example to with Arduino IDE. If that still fails, try to connect it the board to another USB port and upload Blink.ino again.

I tried uploading Blink to the other COM port

Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Qibbo\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Qibbo\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Qibbo\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path C:\Users\Qibbo\AppData\Local\Temp\arduino_build_964881 -warnings=none -build-cache C:\Users\Qibbo\AppData\Local\Temp\arduino_cache_636863 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\Qibbo\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\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Qibbo\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Qibbo\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Qibbo\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path C:\Users\Qibbo\AppData\Local\Temp\arduino_build_964881 -warnings=none -build-cache C:\Users\Qibbo\AppData\Local\Temp\arduino_cache_636863 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\Qibbo\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\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino

Using board 'uno' from platform in folder: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Using core 'arduino' from platform in folder: C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\sketch\\Blink.ino.cpp" -o nul

Generating function prototypes...

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\sketch\\Blink.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\Qibbo\AppData\Local\Temp\arduino_cache_636863\core\core_arduino_avr_uno_5b40b04534f7645bcef427c7cfcd806f.a

Linking everything together...

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/..\\arduino_cache_636863\\core\\core_arduino_avr_uno_5b40b04534f7645bcef427c7cfcd806f.a" "-LC:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881" -lm

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.eep"

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.elf" "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.hex"

"C:\\Users\\Qibbo\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Qibbo\\AppData\\Local\\Temp\\arduino_build_964881/Blink.ino.elf"

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\Qibbo\AppData\Local\Temp\arduino_build_964881/Blink.ino.hex:i 



avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "C:\Users\Qibbo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM4

         Using Programmer              : arduino

         Overriding Baud Rate          : 115200

avrdude: ser_open(): can't open device "\\.\COM4": The semaphore timeout period has expired.






avrdude done.  Thank you.



Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.


It says this now
Also, I unplugged everything. Just the board

If you can't even upload Blink.ino to a board that is not connected to anything, then I believe it can be 2 things:

  1. The board is malfunctioning. If you have a spare, you could try using that.
  2. More likely, something on your computer is occupying your COM port. Did you have any other devices on this COM port before? Do the other devices use drivers that might still be running as a background process? Do you have multiple Arduino IDE windows open? Try using only one first. Do you have the Serial Terminal open in Arduino IDE? Try closing that first.

If you have access to another computer, where you are allowed to install Arduino IDE, you could also try it there and verify if the problem is with your labtop or with the board.

Hi @cantcode Thanks for your report.

There is a formal bug report that looks similar to your original problem (getting "access denied" error when uploading using Arduino IDE 2.x):

I did some experimentation and found I am able to reproduce the fault under certain specific conditions.

I would like to determine whether you are experiencing the same problem. Please tell me which USB chip your Uno board has. The chip is usually located on the bottom of the board on the end nearest the USB socket.

The common chips:

Microchip ATmega16U2

atmega16u2

FTDI FT232R

WCH CH340


If it isn't clear, alternatively you can provide the link to where you bought the board from and we'll see if we can determine the chip from the product listing.