When there is an error the IDE will print relevant information in the console. Learn how to resolve common errors.
Check that the board is powered. The power LED should be lit (typically marked ON or POWER) on the board. If not, check your connections.
Toolsmenu option, check that the correct
Make sure you are clicking the Upload button and not the Verify button.
Your sketch cannot be uploaded to the board unless it compiles. Many compilation errors will contain a line number where the error occurred.
If you're unsure whether your error is due to compilation, you can click the Verify button. This will compile and verify the sketch without uploading it to the board. When the sketch is compiled correctly the output will look similar to this.
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.
Board and port selection
||Select a board|
||Select a port|
||Install missing platform|
avrdude: stk500_recv(): programmer is not responding
avrdude:stk500_getsync() attempt X of 10: not in sync
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_open(): can't open device "portName": no such file or directory
avrdude: ser_open(): can't open device "portName": the system cannot find the file specified.
avrdude: ser_open(): can't open device "portName": access is denied.
avrdude: ser_open(): can't open device "portName": permission denied
avrdude: ser_open(): can't open device "portName": the semaphore timeout period has expired.
avrdude: stk500v2_getsync(): timeout communicating with programmer
To learn more about these errors and how to resolve them, see this page.
Is your error not listed?
Check that your board is powered
The power LED should be lit (typically marked ON or POWER) on the board.
Check board connections
Make sure the USB cable is fully inserted into your board and PC.
Check that your USB cable is working. Test it with a different device, or try using a different USB cable. Make sure it is a data cable, a charge-only cable will not work.
The black anti-static foam that some boards are shipped with can interfere with the board. If it's attached to the board, remove it.
Remove any connections to digital pins 0(RX) and 1(TX). These pins are used for communication with your computer. Connecting anything to these pins can interfere with uploading. You can attach the components back to these pins once the program has been successfully uploaded.
If you're using a USB hub, try connecting the board directly to a USB port on the computer.
If possible, try a USB 2.0 port.
Make sure any required drivers for the USB serial chip on your Arduino are installed.
Check board selection
Make sure you have selected the correct board in
Tools > Board. Most common boards are found in the
Arduino AVR Boards package.
If you're unsure which package your board is in, or if that package is missing from the list, go to the Boards Manager
Tools > Board > Board Manager... and search for your board name. Find the package that includes your board in the listed boards, and note the package name. If it's not installed, click Install to install the latest version (selected by default). If you have an older version, click Update.
You can now select your board under
Tools > Board, under the board package name.
Check port selection
Make sure you have selected the port of your Arduino board from the
Tools > Port menu. The correct port may be labeled with the board name, but not always. If you are unsure which port your board is connected to, try disconnecting it. Then reconnect it, and take note if a new port appears.
Check that your platform is installed
Open the Board Manager through the menu.
Tools > Board > Board Manager....
Search for your board name, and find the package with your board listed. Note the package name.
If it's not installed, click
Install. The IDE will install the platform, and an INSTALLED label will display next to the package name.
Close the Board Manager.
Select your board under your package name in
Tools > Boardmenu.
If you have a board with native USB (e.g. Leonardo, Micro, MKR), a bootloader reset can resolve the problem.
Connect the board to the computer.
Ensure you've selected the right serial port in the IDE.
Hit the reset button on the board.
Within two seconds after pressing the reset button, click Upload.
The loopback test
If your board is an Uno, Mega, or Nano board, you can do a loopback test. This will rule out faulty hardware.
If the loopback test passes, the problem may be due to a corrupted bootloader. In this case, burning a fresh bootloader may solve the issue. Keep in mind that this is an advanced procedure. Use the links below to get started.
- General overview on bootloader burning
- Using an Atmel ICE Programmer with an MKR board
- Using two Arduino Mega boards
- Using two Arduino UNO boards
- Burning the Nano using a UNO