1. Context
I'm cofounder of this new, free IDE for microcontrollers:
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 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:
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 theATMega4809
with myAtmel-ICE
orAVR 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:
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:
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 optionProgrammer: "Onboard Atmel mEDBD (UNO WiFi Rev2)"
in Arduino IDE? Why does the Burn Bootloader fail?
2.2 Flash firmwareSAMD11U
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 theSAMD11U
chip on the Nano Every board?
But this is just a nice-to-have question. Not my main goal for now.