Skip to content

Latest commit

 

History

History
134 lines (86 loc) · 7.27 KB

If-your-sketch-doesnt-upload.md

File metadata and controls

134 lines (86 loc) · 7.27 KB
title id
If your sketch doesn't upload
4403365313810

Learn what to do if you’re having issues uploading a sketch to your Arduino device.


Try these steps in order {#top}

  1. Check your sketch for errors
  2. Select the correct board and port
  3. Check board connection
  4. Try a bootloader reset if your board supports it
  5. Check for busy or blocked ports
  6. Delete corrupted files
  7. Check the console output
  8. Board-specific troubleshooting

Check your sketch for errors {#check-sketch-for-errors}

Click the Verify button Verify button to compile your sketch without uploading it. If you still get an error, see If your sketch doesn't compile.

Back to top

Select the correct board and port {#select-the-correct-board-and-port}

Make sure the correct board and port are selected. You can do this using the board selector or the Tools > Board and Tools > Port menus. For detailed instructions, see Select the right port and board. Then, try uploading your sketch again.

Tip

If you're unsure which port is being used, try disconnecting and reconnecting your board. Then, close and reopen the board selector or the Tools > Port menu to refresh the list.

Back to top

Check board connection {#check-board-connection}

Follow the instructions below to ensure a proper setup. After each step, try uploading your sketch again.

  1. Disconnect jumper cables: Disconnect jumper cables, shields or other devices from the board’s pins, as they may interfere with upload.
  2. Reconnect your board: Disconnect and reconnect the board to reset its power. Confirm that the power LED (often labeled “ON”) is lit.
  3. Use a data USB Cable: Connect your board with a data USB cable, not a charging-only cable.
  4. Test the USB cable: Confirm the cable is working by testing it with another device or trying a different cable.
  5. Connect directly: Connect the board directly to your computer instead of through a USB hub.
  6. Remove unneeded USB devices: Disconnect any unnecessary USB devices that might be using the ports.
  7. Try a different USB port: If the board is still not detected, try a different USB port on your computer.

Back to top

Try a bootloader reset if your board supports it {#bootloader-reset}

Many Arduino boards have native USB functionality. On these boards, USB communication is handled by the same microcontroller that runs the sketch. This means that the sketch running on the board may interfere with the upload process, for example by causing the board to reset.

You can stop the sketch from running by activing the board's bootloader.

Note

AVR-based boards like UNO R3, Mega, and the classic Nano have dedicated USB-to-serial chips, which allow sketches to be uploaded regardless of the sketch currently running on the main microcontroller. These boards do not have a bootloader mode.

  1. Find the reset button on the board.

  2. Press the button two times in quick succession.

    The RESET button on Arduino Zero with an "x2" label graphic.

  3. An on-board LED will fade in and out, indicating that the board is in bootloader mode.

  4. Select the correct port for your board from the Tools > Port menu or the board selector, as the port may change when the bootloader runs.

Back to top

Check for busy or blocked ports {#busy-port}

After each step, try uploading your sketch again.

  1. Ensure only one instance of the Arduino IDE and serial monitor is active, and close other applications that may be using the serial port.
  2. If the issue persists, restart your computer.
  3. If you are using Linux, see Fix port access on Linux.
  4. If none of the above worked, see Find and stop process blocking a port for advanced troubleshooting.

Back to top

Delete corrupted files {#delete-corrupted-files}

If your board is detected by Arduino IDE but uploads fail, corrupted files might be the cause. To solve this:

  1. Delete the Arduino15 folder.
  2. Restart Arduino IDE.
  3. Reinstall the board package.
  4. Try uploading your sketch again.

Back to top

Check the console output {#check-the-console-output}

Note

Exit status 1 only indicates that the upload process has failed. Look for the preceding lines in the error output for more specific information about the failure.

Common upload errors often involve dfu-util and avrdude utilities. Learn how to solve:

Back to top

Board-specific troubleshooting {#board-specific-troubleshooting}

Back to top


Still need help?

Note

Please include this information:

Tags: problem uploading to board, problema subiendo a la placa, https://www.arduino.cc/en/Guide/Troubleshooting, 360003198300, 上传失败, 上传出错, 업로드, problème de téléversement vers la carte, téléverser, проблема загрузки в плату, マイコンボードに書き込めない, マイコンボードに書き込もうとしましたが、エラーが発生しました, problem beim hochladen auf das board, problema di caricamento sulla scheda, 업로딩