|
| 1 | +--- |
| 2 | +title: "If you see a \"jtagmkII_initialize(): Cannot locate 'flash' and 'boot' memories in description\" message when uploading to Nano Every" |
| 3 | +id: 4405239282578 |
| 4 | +--- |
| 5 | + |
| 6 | +When uploading a sketch to **Arduino Nano Every**, this warning message may appear in the console output: |
| 7 | + |
| 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](#about) |
| 17 | +* [How to tell if the sketch was uploaded](#how-to-tell-if-the-sketch-was-uploaded) |
| 18 | +* [What you can do](#what-you-can-do) |
| 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: |
| 33 | + |
| 34 | +``` |
| 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 |
| 38 | +``` |
| 39 | + |
| 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 {#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 enabled, 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 | + |
| 59 | + 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). |
| 60 | + |
| 61 | +* Use a third-party board package with a newer version of avrdude, such as [MegaCoreX](https://github.com/MCUdude/MegaCoreX). |
| 62 | + * Installation instructions for MegaCoreX can be found [here](https://github.com/MCUdude/MegaCoreX?tab=readme-ov-file#boards-manager-installation). |
| 63 | + |
| 64 | +<!-- markdownlint-disable-file HC006 --> |
0 commit comments