-
-
Notifications
You must be signed in to change notification settings - Fork 12
Updated article for troubleshooting uploads [HC-1544] #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ab73166
Update article
Renat0Ribeir0 a3bac57
Update content/Software Support/Upload/If-your-sketch-doesnt-upload.md
Renat0Ribeir0 c30e932
Update content/Software Support/Upload/If-your-sketch-doesnt-upload.md
Renat0Ribeir0 9fe765d
Update content/Software Support/Upload/If-your-sketch-doesnt-upload.md
Renat0Ribeir0 fd4fb20
Update content/Software Support/Upload/If-your-sketch-doesnt-upload.md
Renat0Ribeir0 f0856c9
Update If-your-sketch-doesnt-upload.md
Renat0Ribeir0 3db96af
Merge branch 'errors-when-uploading' of https://github.com/arduino/he…
Renat0Ribeir0 76e119d
Update If-your-sketch-doesnt-upload.md
Renat0Ribeir0 1ae0b9c
Update If-your-sketch-doesnt-upload.md
Renat0Ribeir0 0b39bcf
correct links
Renat0Ribeir0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
172 changes: 0 additions & 172 deletions
172
content/Software Support/Upload/Errors-when-uploading-a-sketch.md
This file was deleted.
Oops, something went wrong.
134 changes: 134 additions & 0 deletions
134
content/Software Support/Upload/If-your-sketch-doesnt-upload.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
--- | ||
title: "If your sketch doesn't upload" | ||
id: 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](#check-sketch-for-errors) | ||
2. [Select the correct board and port](#select-the-correct-board-and-port) | ||
3. [Check board connection](#check-board-connection) | ||
4. [Try a bootloader reset if your board supports it](#bootloader-reset) | ||
5. [Check for busy or blocked ports](#busy-port) | ||
6. [Delete corrupted files](#delete-corrupted-files) | ||
7. [Check the console output](#check-the-console-output) | ||
8. [Board-specific troubleshooting](#board-specific-troubleshooting) | ||
|
||
### Check your sketch for errors {#check-sketch-for-errors} | ||
|
||
Click the  **Verify** button to compile your sketch without uploading it. If you still get an error, see [If your sketch doesn't compile](https://support.arduino.cc/hc/en-us/articles/4402764401554-Compilation-errors-when-uploading). | ||
|
||
[Back to top](#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](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port). 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. | ||
|
||
* If your board does not appear in the list or if the _Tools > Port_ option is disabled, see [If your board is not detected by Arduino IDE](https://support.arduino.cc/hc/en-us/articles/4412955149586-If-your-board-is-not-detected-by-Arduino-IDE). | ||
|
||
[Back to top](#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. | ||
1. *Reconnect your board*: Disconnect and reconnect the board to reset its power. Confirm that the power LED (often labeled “ON”) is lit. | ||
1. *Use a data USB Cable*: Connect your board with a data USB cable, not a charging-only cable. | ||
1. *Test the USB cable*: Confirm the cable is working by testing it with another device or trying a different cable. | ||
1. *Connect directly*: Connect the board directly to your computer instead of through a USB hub. | ||
1. *Remove unneeded USB devices*: Disconnect any unnecessary USB devices that might be using the ports. | ||
1. *Try a different USB port*: If the board is still not detected, try a different USB port on your computer. | ||
|
||
[Back to top](#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. | ||
1. Press the button two times in quick succession. | ||
|
||
 | ||
|
||
1. An on-board LED will fade in and out, indicating that the board is in bootloader mode. | ||
1. 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](#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. | ||
1. If the issue persists, restart your computer. | ||
1. If you are using Linux, see [Fix port access on Linux](https://support.arduino.cc/hc/en-us/articles/360016495679-Fix-port-access-on-Linux). | ||
1. If none of the above worked, see [Find and stop process blocking a port](https://support.arduino.cc/hc/en-us/articles/4407830972050-Find-and-stop-process-blocking-a-port) for advanced troubleshooting. | ||
|
||
[Back to top](#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](https://support.arduino.cc/hc/en-us/articles/360018448279-Open-the-Arduino15-folder) folder. | ||
1. Restart Arduino IDE. | ||
1. [Reinstall the board package](https://support.arduino.cc/hc/en-us/articles/360016119519-Add-boards-to-Arduino-IDE). | ||
1. Try uploading your sketch again. | ||
|
||
[Back to top](#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: | ||
|
||
* [dfu-util errors during upload](https://support.arduino.cc/hc/en-us/articles/11011849739804-dfu-util-errors-when-uploading-exit-status-74){.link-chevron-right} | ||
* ['Error: avrdude' during upload](https://support.arduino.cc/hc/en-us/articles/4401874331410--Error-avrdude-when-uploading){.link-chevron-right} | ||
|
||
[Back to top](#top) | ||
|
||
### Board-specific troubleshooting {#board-specific-troubleshooting} | ||
|
||
* **Arduino Nano**: | ||
|
||
* Ensure the [correct processor is selected](https://support.arduino.cc/hc/en-us/articles/4401874304274-Select-the-right-processor-for-Arduino-Nano). | ||
* You might need to [install FTDI drivers manually](https://support.arduino.cc/hc/en-us/articles/4411305694610-Install-or-update-FTDI-drivers). | ||
|
||
* **Boards with the [WCH CH340 USB chip](https://www.wch-ic.com/products/CH340.html)**: See [avrdude: ser_open(): can't set com-state for COMn](https://support.arduino.cc/hc/en-us/articles/13148652511260-avrdude-ser-open-can-t-set-com-state-for-COMn). | ||
|
||
[Back to top](#top) | ||
|
||
--- | ||
|
||
## Still need help? | ||
|
||
* Visit the [Installation & Troubleshooting category](https://forum.arduino.cc/c/18) in the Arduino forum. | ||
|
||
* [Contact us](https://www.arduino.cc/en/contact-us/): | ||
|
||
> [!NOTE] | ||
> **Please include this information:** | ||
> | ||
> * A [verbose error output](https://support.arduino.cc/hc/en-us/articles/4407705216274) | ||
> * The name of your board | ||
> * Your operating system | ||
> * Your Arduino IDE version | ||
|
||
<p style="display:none;"> | ||
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, 업로딩 | ||
</p> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.