Skip to content

Commit a90239a

Browse files
committed
Improved and expanded
1 parent 24b0bca commit a90239a

File tree

1 file changed

+52
-5
lines changed

1 file changed

+52
-5
lines changed
Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,61 @@
11
---
2-
title: "avrdude: jtagmkII_initialize(): Cannot locate 'flash' and 'boot' memories in description"
2+
title: "If you see a \"jtagmkII_initialize(): Cannot locate 'flash' and 'boot' memories in description\" message when uploading to Nano Every"
33
id: 4405239282578
44
---
55

6-
> This error has mostly been reported for the _Arduino Nano Every_
6+
When uploading a sketch to **Arduino Nano Every**, this warning message may appear in the console output:
77

8-
When a sketch is successfully compiled and uploaded, the Arduino IDE console output may indicate
8+
```
9+
”avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description"
10+
```
11+
12+
The message is spurious and **does not** indicate a failed sketch upload or any other problem that requires action.
13+
14+
In this article:
15+
16+
* [About the warning message]()
17+
* [How to tell if the sketch was uploaded]()
18+
* [How to handle the message]()
19+
20+
---
21+
22+
## About the warning message {#about}
23+
24+
The warning message occurs because the microcontroller on the Nano Every does not define a boot section that is expected by the version of the **avrdude** upload utility used in the Arduino megaAVR Boards package. Since this does not stop the upload from completing successfully, the warning is spurious, and has been fixed in later versions of avrdude[^1]. Due to compatibility considerations, the Arduino megaAVR Boards package continues to use an older version of avrdude without this fix.
25+
26+
[^1]: <https://github.com/avrdudes/avrdude/pull/789>
27+
28+
---
29+
30+
## How to tell if the sketch was uploaded {#how-to-tell-if-the-sketch-was-uploaded}
31+
32+
If verbose upload output is disabled, a **successful sketch upload** for Nano Every will look something like this:
933

1034
```
11-
”avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description”
35+
Sketch uses 1118 bytes (2%) of program storage space. Maximum is 49152 bytes.
36+
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
37+
avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description
1238
```
1339

14-
which is often a spurious warning (not an error) which can be safely ignored. It does not indicate any problem with the uploaded sketch as long as it was successfully compiled and uploaded to the board. However, if there is an error while compiling and uploading a sketch, it is unrelated to this warning.
40+
If the sketch upload fails, this will be indicated by other error messages, like `avrdude: jtagmkII_getsync(): sign-on command: status -1`. See [Errors when uploading a sketch](https://support.arduino.cc/hc/en-us/articles/4403365313810-Errors-when-uploading-a-sketch) for help.
41+
42+
---
43+
44+
## What you can do
45+
46+
These are some things you can do if you encounter the warning message:
47+
48+
* Ignore the warning message. It will not prevent your sketch from uploading.
49+
* Enable verbose upload output. This will not remove the warning, but the additional console output from avrdude will provide clearer confirmation of a successful upload. When verbose upload output is enable, a successful sketch upload will look something like this:
50+
51+
```
52+
Writing | ################################################## | 100% 0.01s
53+
54+
avrdude: 1 bytes of fuse8 written
55+
56+
avrdude done. Thank you.
57+
```
58+
To enable verbose output, see [Use verbose output in the Arduino IDE](https://support.arduino.cc/hc/en-us/articles/4407705216274-Use-verbose-output-in-the-Arduino-IDE).
59+
60+
* Use a third-party board package with a newer version of avrdude, such as [MegaCoreX](https://github.com/MCUdude/MegaCoreX).
61+
* Installation instructions for MegaCoreX can be found [here](https://github.com/MCUdude/MegaCoreX?tab=readme-ov-file#boards-manager-installation).

0 commit comments

Comments
 (0)