# ERROR: avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description

**URL:** <https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800>\
**Category:** Uploading\
**Created:** [November 26, 2023, 9:42pm UTC](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800 "2023-11-26T21:42:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![innovadjc](https://avatars.discourse-cdn.com/v4/letter/i/bc79bd/32.png) [@innovadjc](https://forum.arduino.cc/u/innovadjc)\
**Post date:** [November 26, 2023, 9:42pm UTC](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800/1 "2023-11-26T21:42:35Z")

</div>

I'm new to this so I'm hoping it's just something dumb...

I'm using IDE 2.2.1 and a Nano Every board and uploading code that compiled fine and when it's done uploading I get this:

**avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description**

Any guidance you could provide would be appreciated.

**Here's the code I'm uploading:**

```arduino
#include "ServoEasing.hpp"
ServoEasing servoTop;
ServoEasing servoBottom;
const int action_pin = 2;
int location = 31;
// Below numbers should be adjusted in case the facemask does not close/open to desired angle
int bottom_closed = 107;
int top_closed = 167;
int bottom_open = 20;
int top_open = 20;
void setup()
{
pinMode(action_pin, INPUT_PULLUP);
servoTop.attach(9);
servoBottom.attach(10);
setSpeedForAllServos(190);
servoTop.setEasingType(EASE_CUBIC_IN_OUT);
servoBottom.setEasingType(EASE_CUBIC_IN_OUT);
synchronizeAllServosStartAndWaitForAllServosToStop();
}
void loop()
{
int proximity = digitalRead(action_pin);
if (proximity == LOW)
{
if (location > bottom_open) {
servoTop.setEaseTo(top_open);
servoBottom.setEaseTo(bottom_open);
synchronizeAllServosStartAndWaitForAllServosToStop();
location = bottom_open;
delay(600);
} else {
servoTop.setEaseTo(top_closed);
servoBottom.setEaseTo(bottom_closed);
synchronizeAllServosStartAndWaitForAllServosToStop();
location = bottom_closed;
delay(600);
}
}
}

```

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [November 26, 2023, 9:47pm UTC](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800/2 "2023-11-26T21:47:51Z")

</div>

> **[avrdude: jtagmkII\_initialize(): Cannot locate 'flash' and 'boot' memories in...](https://support.arduino.cc/hc/en-us/articles/4405239282578-avrdude-jtagmkII-initialize-Cannot-locate-flash-and-boot-memories-in-description)**
>
> This error has mostly been reported for the Arduino Nano Every
> 
> When a sketch is successfully compiled and uploaded, the Arduino IDE console output may indicate
> ”avrdude: jtagmkII\_initialize(): Can...

TL;DR:

> is often a spurious warning (not an error) which can be safely ignored.

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 26, 2023, 11:43pm UTC](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800/3 "2023-11-26T23:43:29Z")

</div>

> avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description

This is because the NanoEvery does not use a bootloader, and the memory is not divided into flash and boot segments like the AT328 devices.

The warning was due to an issue with avrdude not recognizing this situation, but the upload proceeded as normal.

> avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description  
> avrdude: AVR device initialized and ready to accept instructions

This has since been fixed in avrdude.

> <https://github.com/avrdudes/avrdude/pull/789>
>
> This PR adds support for the @ElTangas' jtag2updi programmer and brings some imp…rovements too:
> 
> \* Baudrates higher than 115200 are now supported
> \* jtagmkii.c has been patched to accept devices with \`has\_updi=true\`. This "hack" was borrowed from Arduino's implementation. They have a board, the Arduino Nano Every, that uses the jtag2updi as its programmer.
> 
> ~There exist other non-critical "problems" too, like the \`avrdude: jtagmkII\_initialize(): Cannot locate "flash" and "boot" memories in description\` error you're always getting when programming a target (see https://github.com/ElTangas/jtag2updi/issues/54), but I haven't been able to find an elegant solution to this.~
> Also been solved
> 
> Closes #517

The megaavr core uses an older version of avrdude which has the issue

```arduino
megaavr
avrdude: Version 6.3-20190619

```

MegaCoreX uses a more recent version, and does not give the warning message

```arduino
MegaCoreX
avrdude: Version 7.1-arduino.1

```

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 24, 2024, 11:43pm UTC](https://forum.arduino.cc/t/error-avrdude-jtagmkii-initialize-cannot-locate-flash-and-boot-memories-in-description/1193800/4 "2024-05-24T23:43:32Z")

</div>

Closed on May 24, 2024, 11:43pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
