diff --git a/content/Software Support/Upload/Errors-when-uploading-a-sketch.md b/content/Software Support/Upload/Errors-when-uploading-a-sketch.md deleted file mode 100644 index 0f421ac71..000000000 --- a/content/Software Support/Upload/Errors-when-uploading-a-sketch.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "Errors when uploading a sketch" -id: 4403365313810 ---- - -When there is an error the IDE will print relevant information in the console. Learn how to resolve common errors. - ---- - -## Check this first - -These checks will resolve the most common errors: - -* **Check your sketch for errors**. Click the ![Verify button](img/symbol_verify2.png) **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). - -* **Check your board and port selections**. In the top menu bar, make sure the correct board is selected in _Tools > Board_, and that you've selected the right port in _Tools > Port_. Try disconnecting and reconnecting your board if you're unsure which port is being used (close and reopen the Port menu to refresh the list). - - * If you can't find your board in the list, or if the _Tools > Port_ option is missing, see [If your board does not appear in the port menu](https://support.arduino.cc/hc/en-us/articles/4412955149586-If-your-board-does-not-appear-in-the-port-menu). - - * To learn more about port and board selection, see [Select the right port and board](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port). - -* **Check your connections**. Your board needs to be connected with a data USB cable (charge-only cables will not work). Make sure the cable is fully inserted in the port on each end. Try a different USB cable, and avoid hubs and other adapters if possible. Remove connections to the board pins, especially the **0 (RX)** and **1 (TX)** digital pins. - -If you still get an error, you'll find instructions for specific error messages below. - ---- - - - -## List of errors - -> [!NOTE] -> _Exit status 1_ only indicates that the process has failed. Look for preceding lines in the error output for more specific information. - - - - - - -
-

Upload

- -

Compilation error

- -

Other

- -
-

dfu-util

- -

avrdude

- -
- -> [!NOTE] -> Only errors that do not link to other pages are listed below. - - - -### No device found on \ - -``` -An error occurred while uploading the sketch -No device found on -``` - -1. Make sure the correct port is selected in _Tools > Port_. - -2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port. - -3. Restart your computer. - -4. See [Find and stop process blocking a port](https://support.arduino.cc/hc/en-us/articles/4407830972050-Find-and-stop-process-blocking-a-port). - -#### If you are uploading to UNO R4 WiFi - -1. Press and release the button marked "**RESET**" on the board quickly twice. The LED marked "**L**" on the board should now be pulsing. - -2. Select the port of the board from the menu in Arduino IDE. The port might have changed after the previous step, so make sure to verify that it is selected. - -Now try uploading the sketch to your board again. - - - -### Couldn't find a Board on the selected port - -``` -Couldn't find a Board on the selected port. Check that you have the correct port selected. -If it is correct, try pressing the board's reset button after initiating the upload. -``` - -This error can happen if the board on the selected port has been disconnected from the computer, or reassigned to a different port. - -1. Make sure the board is connected to your computer. - -2. Select the board in _Tools > Port_. - - * For step-by-step instructions, see [Select board and port in Arduino IDE](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE). - * If you can't find the port, see [If your board does not appear in the port menu](https://support.arduino.cc/hc/en-us/articles/4412955149586-If-your-board-does-not-appear-in-the-port-menu). - -> [!NOTE] -> On Windows, you can [manually set a port for the board](https://support.arduino.cc/hc/en-us/articles/360016420140#set-COM-port) to stop it from being reassigned. - - - -### jssc.SerialPortException: Port name - \; Method name - openPort(); Exception type - Port busy - -1. Make sure the correct port is selected in _Tools > Port_. - -2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port. - -3. Restart your computer. - -4. See [Find and stop process blocking a port](https://support.arduino.cc/hc/en-us/articles/4407830972050-Find-and-stop-process-blocking-a-port). - ---- - -## 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/). - -> **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 - -

- 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, 업로딩 -

- - diff --git a/content/Software Support/Upload/If-your-sketch-doesnt-upload.md b/content/Software Support/Upload/If-your-sketch-doesnt-upload.md new file mode 100644 index 000000000..2b6fe2cc6 --- /dev/null +++ b/content/Software Support/Upload/If-your-sketch-doesnt-upload.md @@ -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](img/symbol_verify2.png) **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. + + ![The RESET button on Arduino Zero with an "x2" label graphic.](img/zero-reset-button-double.png) + +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 + +

+ 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, 업로딩 +