You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updates
* Added id to heading
* Various improvements, cleaned up comments.
* Escape < and >
* Update content/Software and Downloads/Upload/Error-avrdude-when-uploading.md
Co-authored-by: Renat0Ribeir0 <86349945+Renat0Ribeir0@users.noreply.github.com>
Co-authored-by: Renat0Ribeir0 <86349945+Renat0Ribeir0@users.noreply.github.com>
Copy file name to clipboardExpand all lines: content/Software and Downloads/IDE Settings/COM-port-number-changes-when-connecting-board-on-different-ports-or-in-bootloader-mode.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ Of course, the COM port number will be reflected on Arduino IDE but this is not
16
16
17
17

18
18
19
+
<h2id="set-COM-port">Manually set a COM port for the board</h2>
20
+
19
21
It is possible to force the COM port to remain with the same number if that is what is required. All that needs to be done is:
20
22
21
23
1. In the `Device manager`, right click on the specific COM port and select `port properties`.
The tool **avrdude** is used to upload sketches to the Arduino boards which use microcontrollers of the AVR architecture. When uploading code to your board in the IDE, avrdude may give an error. Some of the most common errors are listed below.
5
+
When uploading a sketch to your board you may get an error from the **avrdude** utlity:
6
+
7
+
***stk500:**
8
+
*[avrdude: stk500_recv(): programmer is not responding
9
+
avrdude: stk500_getsync() attempt X of 10: not in sync](#avrdude-stk500_recv-and-stk500_getsync)
10
+
*[avrdude: stk500v2_ReceiveMessage(): timeout
11
+
avrdude: stk500v2_getsync(): timeout communicating with programmer](#avrdude-stk500_recv-and-stk500_getsync)
12
+
***ser_open():**
13
+
*[avrdude: ser_open(): can't open device \<port\>: no such file or directory](#avrdude-ser_open-cant-open-device-no-such-file-or-directory)
14
+
*[avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy](#ser_open-device-or-resource-busy)
15
+
*[avrdude: ser_open(): can't open device \<port\>: Resource busy](#ser_open-resource-busy)
16
+
*[avrdude: ser_open(): can't open device \<port\>: permission denied](#ser_open-permission-denied)
17
+
*[avrdude: ser_open(): can't open device \<port\>: access is denied](#ser_open-access-is-denied)
18
+
*[avrdude: butterfly_recv(): programmer is not responding](#avrdude-butterfly_recv)
> **Note:** The error text may be different depending on your system language.
6
25
7
-
*[`avrdude: stk500_recv(): programmer is not responding`](#avrdude-stk500_recv-and-stk500_getsync)
8
-
*[`avrdude: stk500_getsync() attempt X of 10: not in sync`](#avrdude-stk500_recv-and-stk500_getsync)
9
-
*[`avrdude: stk500v2_getsync(): timeout communicating with programmer`](#avrdude-stk500_recv-and-stk500_getsync)
10
-
*[`avrdude: butterfly_recv(): programmer is not responding`](#avrdude-butterfly_recv)
11
-
*[`avrdude: ser_open(): can't open device "portName": no such file or directory`](#avrdude-ser_open-cant-open-device-no-such-file-or-directory)
12
-
*[`avrdude: ser_open(): can't open device "portName": the system cannot find the file specified.`](#check-the-following)
13
-
*[`avrdude: ser_open(): can't open device "portName": access is denied.`](#check-the-following)
14
-
*[`avrdude: ser_open(): can't open device "portName": permission denied`](#check-the-following)
15
-
*[`avrdude: ser_open(): can't open device "portName": the semaphore timeout period has expired.`](#check-the-following)
16
-
*[`avrdude: ser_open(): can't set com-state for "portName"`](#check-the-following)
17
-
18
-
> Text following `avrdude: ser_open():` can appear in a different language if your system language is not set to English.
26
+
---
19
27
20
-
While these errors can be somewhat ambiguous, they are most often caused by failing or incorrectly configured hardware. It is likely that the error can be solved by following this troubleshooting procedure.
28
+
<aid="check-the-following"></a>
21
29
22
-
---
30
+
## General troubleshooting checklist
23
31
24
-
<h2id="check-the-following">Check the following</h2>
32
+
Most errors can be solved by following these steps. After each step, try uploading your sketch again.
25
33
26
-
1. Make sure you have selected the correct board under `Tools > Board`.
34
+
1. Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE)correct board under _Tools > Board_ and _Tools > Port_.
27
35
28
-
2. Make sure to select the correct port under `Tools > Port`.
36
+
* For 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)
29
37
30
-
3. Make sure the board is powered. Try disconnecting and reconnecting the board to the computer, and confirm that the power LED (usually labeled on the board "ON") is lit. On most boards, an orange LED will also blink when the board is plugged in.
38
+
* If your board 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)
31
39
32
-
4. Make sure that you are using a USB data cable (a charge-only cable will not work). Also, check the cable for physical damage.
40
+
2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port. If this doesn't work, try restarting your computer.
33
41
34
-
5. 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.
42
+
3. Reset your board by pressing the RESET button (a white or blue push button).
35
43
36
-
6. Make sure that you have closed the serial monitor.
44
+

37
45
38
-
7. Press the reset button and see if the LED blinks. If the LED doesn't blink there is a high chance that the bootloader of your board is corrupted.
46
+
4. Check port and cable connections:
39
47
40
-
8. Make sure you have updated and installed all the necessary drivers for the board. If you already have the drivers, try reinstalling them.
48
+
* Try disconnecting and reconnecting the board to the computer, and confirm that the power LED (often labeled "ON") is lit.
41
49
42
-
9. Try a complete uninstall (including deleting the [Arduino15 folder](https://support.arduino.cc/hc/en-us/articles/360018448279) of the Arduino IDE. Then reinstall the IDE using the latest version.
50
+
* If possible, connect the board directly to a USB port. Avoid using a USB hub if possible, or try a different hub.
43
51
44
-
10. If your board is an Uno, Mega, or Nano board, you can do a [loopback test](https://support.arduino.cc/hc/en-us/articles/360020366520). This will rule out faulty hardware.
52
+
* Make sure you are using a data transfer USB cable (charge-only cables will not work). Try connecting your board with a different cable, or testing your cable with a different device.
45
53
46
-
11. 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.
54
+
* Remove any unneeded USB devices that may be using the ports.
47
55
48
-
*[General overview on bootloader burning](https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP)
49
-
*[Using two Arduino Mega boards](https://support.arduino.cc/hc/en-us/articles/360012048060)
50
-
*[Using two Arduino UNO boards](https://support.arduino.cc/hc/en-us/articles/360012048080)
56
+
5. Remove any connections to digital pins **0(RX)** and **1(TX)**. Anything connected to these pins can interfere with the upload transfer.
<h3id="avrdude-stk500_recv-and-stk500_getsync">avrdude: stk500_recv() and stk500_getsync()</h3>
62
+
## avrdude: stk500_recv(): programmer is not responding<br>avrdude: stk500_getsync() attempt \<n> of 10: not in sync
57
63
58
64
```
59
65
avrdude: stk500_recv(): programmer is not responding
@@ -63,17 +69,111 @@ avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
63
69
...
64
70
```
65
71
66
-
This error can occur when the selected port has no board. For example, the Bluetooth<sup>®</sup> port might be selected instead of the USB port where the Arduino board is connected.
72
+
1. Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE) correct board under _Tools > Board_ and _Tools > Port_.
73
+
74
+
* For 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)
75
+
76
+
* If your board 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)
77
+
78
+
2. If using the classic Nano, try selecting a different processor in _Tools > Processor_.
79
+
80
+
3. For some boards, a _loopback test_ can be performed, which will rule out problems with the serial chip. It can be done with the following boards:
81
+
82
+
* Arduino Uno (classic)
83
+
* Arduino Uno Rev3
84
+
* Arduino Uno Rev3 SMD
85
+
* Arduino Mega (classic)
86
+
* Arduino Mega2560 Rev3
87
+
* Arduino Mega ADK Rev3
88
+
* Arduino Nano (classic)
89
+
90
+
If the loopback test passes, or if you can't do a loopback test, reprogramming the bootloader may resolve the issue. [ArduinoISP](https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP) can be used for boards with AtMega chips. You can also search for [articles in the Help Center](https://support.arduino.cc/hc/en-us/search?utf8=%E2%9C%93&query=bootloader).
91
+
92
+
---
93
+
94
+
<aid="stk500v2_ReceiveMessage_getsync"></a>
95
+
96
+
## avrdude: stk500v2_ReceiveMessage(): timeout<br>avrdude: stk500v2_getsync(): timeout communicating with programmer
97
+
98
+
Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE) correct board under _Tools > Board_ and _Tools > Port_.
## avrdude: ser_open(): can't open device: No such file or directory
105
+
106
+
```
107
+
avrdude: ser_open(): can't open device "/dev/cu.usbmodem14101": No such file or directory
108
+
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
109
+
```
110
+
111
+
This error can happen if the board on the selected port has been disconnected from the computer, or reassigned to a different port.
112
+
113
+
1. Make sure the correct port is selected in _Tools > Port_.
114
+
115
+
* 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).
116
+
* 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).
117
+
118
+
2. If using the classic Nano, try selecting a different processor in _Tools > Processor_.
119
+
120
+
> 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.
121
+
122
+
---
123
+
124
+
<aid="ser_open-device-or-resource-busy"></a>
125
+
126
+
## avrdude: ser_open(): can't open device \<port\>: Device or resource busy
127
+
128
+
1. Make sure the correct port is selected in _Tools > Port_.
129
+
130
+
2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port.
131
+
132
+
3. Restart your computer.
67
133
68
-
You can select your port in `Tools > Port: "..." > Serial Ports`. 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.
134
+
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).
69
135
70
-
> If you're using an Arduino Nano you also need to [select the correct processor](https://support.arduino.cc/hc/en-us/articles/4401874304274-Select-the-right-processor-for-Arduino-Nano).
136
+
---
137
+
138
+
<aid="ser_open-resource-busy"></a>
139
+
140
+
## avrdude: ser_open(): can't open device \<port\>: Resource busy
141
+
142
+
1. Make sure the correct port is selected in _Tools > Port_.
143
+
144
+
2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port.
145
+
146
+
3. Restart your computer.
147
+
148
+
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).
149
+
150
+
---
71
151
72
-
<!-- TODO: Update when dedicated article is deployed -->
152
+
<aid="ser_open-permission-denied"></a>
73
153
74
-
If the issue persists, [check these steps](#check-the-following).
154
+
## avrdude: ser_open(): can't open device \<port\>: Permission denied
This error can occur on Linux if your user account is part of the `dialout` group. See [Fix port access on Linux](https://support.arduino.cc/hc/en-us/articles/360016495679-Fix-port-access-on-Linux) to resolve the issue.
157
+
158
+
---
159
+
160
+
<aid="ser_open-access-is-denied"></a>
161
+
162
+
## avrdude: ser_open(): can't open device \<port\>: access is denied
163
+
164
+
1. Make sure the correct port is selected in _Tools > Port_.
165
+
166
+
2. Close other instances of Arduino IDE, serial monitors, and other software that may be blocking the port.
167
+
168
+
3. Restart your computer.
169
+
170
+
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).
171
+
172
+
---
173
+
174
+
<aid="avrdude-butterfly_recv"></a>
175
+
176
+
## avrdude: butterfly_recv()
77
177
78
178
```
79
179
avrdude: butterfly_recv(): programmer is not responding
@@ -89,29 +189,44 @@ avrdude: butterfly_recv(): programmer is not responding
89
189
avrdude: error: programmer did not respond to command: exit bootloader
90
190
```
91
191
92
-
Check that you have selected the correct board in `Tools > Board`.
192
+
Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE) correct board under _Tools > Board_ and _Tools > Port_.
93
193
94
-
If the issue persists, [check these steps](#check-the-following).
194
+
For 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).
195
+
196
+
---
95
197
96
-
<h3id="avrdude-ser_open-cant-open-device-no-such-file-or-directory">avrdude: ser_open(): can't open device: No such file or directory</h3>
198
+
<aid="usbhid_open_jtag3_open_common"></a>
199
+
200
+
## avrdude: usbhid_open(): No device found<br>avrdude: jtag3_open_common()
97
201
98
202
```
99
-
avrdude: ser_open(): can't open device "/dev/cu.usbmodem14101": No such file or directory
100
-
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
203
+
avrdude: usbhid_open(): No device found
204
+
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145
205
+
An error occurred while uploading the sketch
101
206
```
102
207
103
-
This error can occur when the board has been disconnected from a selected port. Make sure that the board is connected, and that the correct port is selected from the `Tools > Port` menu.
208
+
Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE) correct board under _Tools > Board_ and _Tools > Port_. In particular, this error can occur when uploading to an Arduino Uno Rev3 or classic, when having _megaAVR Boards > Arduino Uno WiFi Rev2_ as the selected board.
104
209
105
-
If the issue persists, [check these steps](#check-the-following).
210
+
---
106
211
107
-
## Still need help?
212
+
<aid="jtagmkII_getsync"></a>
213
+
214
+
## avrdude: jtagmkII_getsync(): sign-on command: status -1
215
+
216
+
Make sure you have [selected the right board and port](https://support.arduino.cc/hc/en-us/articles/4406856349970-Select-board-and-port-in-Arduino-IDE) correct board under _Tools > Board_ and _Tools > Port_.
217
+
218
+
---
108
219
109
-
You're welcome to ask in the forum, or contact us. Please include this information: Board name, Operation System, IDE or Create Agent version, and error output.
220
+
## Still need help?
110
221
111
222
* Visit the [Avrdude, stk500, Bootloader issues category](https://forum.arduino.cc/c/using-arduino/avrdude-stk500-bootloader-issues/81) in the Arduino forum.
> **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, and your Arduino IDE version.
0 commit comments