# How to burn bootloader on the Nano-Every board?

**URL:** <https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169>\
**Category:** Uploading\
**Created:** [May 22, 2021, 2:35pm UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169 "2021-05-22T14:35:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristof\_mulier](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kristof\_mulier](https://forum.arduino.cc/u/kristof_mulier)\
**Post date:** [May 22, 2021, 2:35pm UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/1 "2021-05-22T14:35:49Z")

</div>

## 1. Context

I'm cofounder of this new, free IDE for microcontrollers:  
[https://embeetle.com](https://embeetle.com)

We're currently making lots of efforts to support Arduino boards and microcontrollers. The Arduino Nano-Every is next.

## 2. Goals

I bought a [**Nano-Every**](https://store.arduino.cc/arduino-nano-every) board from the Arduino shop. Uploading the firmware through the COM-port works just fine. However, I'd also like to burn the default bootloader to the microcontroller, such that we can add this functionality to Embeetle IDE.

As I understand, there are two MCUs on this board:

- `ATMega4809`

- `SAMD11U`

The `ATMega4809` is clearly the central MCU where the sketch files end up. The `SAMD11U` seems to be an auxiliary MCU preconfigured as a USB-to-UART converter.

My main goal now, is to flash the default bootloader to the `ATMega4809`. If that works out well, I can try to flash the firmware of the `SAMD11U` (the same firmware it is preconfigured with), but that's just a bonus.

### 2.1 Flash bootloader `ATMega4809`

I can't see a connector for my `Atmel-ICE` or `AVR ISP mkII`, which I usually use to flash bootloaders. In comparison, the Arduino Uno and Leonardo have an `ICSP` connector at the bottom for that:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/6/8/268a020b9893ac8701a4a5dfe3aabdf0c837c39a.jpeg)

However, the **Nano Every** doesn't have such a connector. There is a 6-pin connector at the bottom (just copper dots, no pins), but that one seems to be connected to the `SAMD11U` MCU.

So here is my first question:

> **Question 1**  
> Can I flash a bootloader to the `ATMega4809` with my `Atmel-ICE` or `AVR ISP mkII`? If yes, how should I connect it?

When looking at the Arduino IDE, there seems to be an option to burn the `ATMega4809` bootloader _without_ an `Atmel-ICE` or `AVR ISP mkII` device:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/e/d/3/ed3c1f6ea515d6a79fd9c5ade1939dcdffd05384.png)

You just have to select:  
`Programmer: "Onboard Atmel mEDBD (UNO WiFi Rev2)"`  
and then click **Burn Bootloader**.

At least, that's what this looks like to me. I'm not sure what this `Programmer: "Onboard Atmel mEDBD (UNO WiFi Rev2)"` actually represents. Is it the `SAMD11U` on the board? When I click **Burn Bootloader** , this is what I get:

```sh
avrdude -avrdude.conf
        -v
        -patmega4809
        -cxplainedmini_updi
        -Pusb
        -Ufuse2:w:0x01:m
        -Ufuse5:w:0xC9:m
        -Ufuse8:w:0x00:m
        -Uflash:w:C:/Users/.../megaavr/1.8.7/bootloaders/atmega4809_uart_bl.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Gebruiker\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port : usb
         Using Programmer : xplainedmini_updi
avrdude: usbhid_open(): No device found
Error while burning bootloader.
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145

avrdude done. Thank you.

```

So here is my second question:

> **Question 2:**  
> What is this option `Programmer: "Onboard Atmel mEDBD (UNO WiFi Rev2)"` in Arduino IDE? Why does the **Burn Bootloader** fail?

&nbsp;

### 2.2 Flash firmware`SAMD11U`

I didn't find a clear list-of-steps to achieve this: burning the default firmware to the `SAMD11U` chip on the **Nano Every**. I understand this is not needed for a Nano Every you buy from the Arduino Store, but I can imagine it is useful for people who design their own board.

> **Question 3:**  
> How exactly do you burn the default firmware to the `SAMD11U` chip on the **Nano Every** board?

But this is just a nice-to-have question. Not my main goal for now.

---

<div class="post-metadata">

**Author:** ![Juraj](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/juraj/32/238785_2.png) [@Juraj](https://forum.arduino.cc/u/Juraj)\
**Post date:** [May 22, 2021, 4:02pm UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/2 "2021-05-22T16:02:46Z")

</div>

> **[UPDI programmer for ATmega4809 and ATtiny816/817](https://www.elektormagazine.com/labs/arduino-for-updi-programming-for-atmega4809-and-tiny816817-with-jtag2updi)**
>
> Some of the latest Microchip AVRs require a UPDI programmer. This guide will show you how to build your own Arduino based programmer using jtag2updi.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [May 22, 2021, 7:33pm UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/3 "2021-05-22T19:33:34Z")

</div>

> [@kristof\_mulier](#):
>
> There is a 6-pin connector at the bottom (just copper dots, no pins), but that one seems to be connected to the `SAMD11U` MCU.

It's connected to both. The pinout is shown on the "full pinout diagram" you can download from the "Documentation" tab of the Nano Every product page.

 ![Clipboard01](https://europe1.discourse-cdn.com/arduino/original/4X/9/0/b/90b640e163518de418e604da037737380c987c43.png)

> [@kristof\_mulier](#):
>
> I'm not sure what this `Programmer: "Onboard Atmel mEDBD (UNO WiFi Rev2)"` actually represents. Is it the `SAMD11U` on the board?

No. That's for the Microchip/Atmel mEDBG programmer, which is integrated onto the [Arduino Uno WiFi Rev2](https://store.arduino.cc/arduino-uno-wifi-rev2) board. The Nano Every does not have an onboard mEDBG programmer.

---

<div class="post-metadata">

**Author:** ![westfw](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/westfw/32/213443_2.png) [@westfw](https://forum.arduino.cc/u/westfw)\
**Post date:** [May 22, 2021, 9:38pm UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/4 "2021-05-22T21:38:42Z")

</div>

Nano every doesn’t use a bootloader.  
The samd11 actually contains chip-programming firmware.

---

<div class="post-metadata">

**Author:** ![Juraj](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/juraj/32/238785_2.png) [@Juraj](https://forum.arduino.cc/u/Juraj)\
**Post date:** [May 23, 2021, 9:27am UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/5 "2021-05-23T09:27:17Z")

</div>

[https://www.arduino.cc/en/Guide/NANOEvery#firmware-for-samd11d14a](https://www.arduino.cc/en/Guide/NANOEvery#firmware-for-samd11d14a)

---

<div class="post-metadata">

**Author:** ![kristof\_mulier](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kristof\_mulier](https://forum.arduino.cc/u/kristof_mulier)\
**Post date:** [May 24, 2021, 9:03am UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/6 "2021-05-24T09:03:34Z")

</div>

Thank you @Juraj , @pert and @westfw for your help!

### Flash firmware to `ATMega4809`

From your replies, I conclude that the `ATMega4809` on the Nano-Every board has _no bootloader_. The `SAMD11U` acts as an on-board programmer device, to flash the firmware onto the `ATMega4809`.

In a way, this situation is comparable to the Nucleo boards from STMicroelectronics. They have an on-board STLink programmer/debugger device which flashes the firmware to the target `STM32` processor.

With these Nucleo boards, you can break off the on-board STLink programmer, and flash the target `STM32` chip with an external device - eg. a JLink, Blackmagic Probe, ...

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/6/2/7627be0eeea51da2255431801605d241d87ef810.png)

Obviously, the Arduino Nano-Every wouldn't work anymore if you cut through it. But is there a way to flash firmware to the `ATMega4809` with an external device (such as an `AVR ISP mkII` or `Atmel-ICE`)?

### Flash firmware to `SAMD11`

To burn firmware into the `SAMD11` chip, Juraj referred to this page:

[https://www.arduino.cc/en/Guide/NANOEvery#firmware-for-samd11d14a](https://www.arduino.cc/en/Guide/NANOEvery#firmware-for-samd11d14a)

There I read:

> To reprogram the `D11`, simply power it while shorting `SWDIO` to `GND` pins. The board will appear as "MuxTo bootloader" and can be reprogammed using bossac or the IDE Upload button if you selected "Arduino MuxTO" target.

The page doesn't mention any external programmer device (such as an `AVR ISP mkII` or `Atmel-ICE`). So my conclusion is that the `SAMD11` keeps its USB interface up and running while the `SWDIO` pin is grounded, using a bootloader to reflash its own firmware. Is that correct?

---

<div class="post-metadata">

**Author:** ![Juraj](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/juraj/32/238785_2.png) [@Juraj](https://forum.arduino.cc/u/Juraj)\
**Post date:** [May 24, 2021, 11:32am UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/7 "2021-05-24T11:32:04Z")

</div>

1. see my first coment to a UPDI programmer and Per's link to pinout of the 6 dots
2. the SAMD11 has a bootloader to replace the firmware.  
additional link to firmware update  
[Serial interface locks up on Nano Every · Issue #51 · arduino/ArduinoCore-megaavr · GitHub](https://github.com/arduino/ArduinoCore-megaavr/issues/51)

---

<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:** [September 21, 2021, 11:32am UTC](https://forum.arduino.cc/t/how-to-burn-bootloader-on-the-nano-every-board/865169/8 "2021-09-21T11:32:07Z")

</div>

Closed on September 21, 2021, 11:32am UTC

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