[closed, success]How to burn firmware for Nano every from bare PCBA board

Go To Last Post
47 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to make a PCBA based on Nano every(Arduino IDE can still identify it as Nano every).

I have studied the documentation :  https://www.arduino.cc/en/Guide/NANOEvery, but I'm still not sure how to finish it.

This is my understanding:

1)burn ATSAMD11D14A firmware; 

    /ArduinoCore-samd    sam_ba_Generic_D11D14AM_SAMD11D14AM.bin

    Arduino use this as the default firmware?

    Do we need to burn it before assmbled?

    Can we burn it after assembled? It said we can reprogramme through IDE, I did not understand what they wrote.

2)burn atmega4809 through Arduino IDE

    There is a menu named "Burn Bootloader" ,I think it is used to do that after select board & programmer.

    Which one is the version for nano every? ( ArduinoCore-avr/bootloaders/atmega8/ ATmegaBOOT-prod-firmware-2009-11-07.hex ?)

Anyone can explain in detail?

Thank you.

 

This topic has a solution.
Last Edited: Wed. Apr 29, 2020 - 02:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
Arduino use this as the default firmware?
No; Arduino software from Arduino repositories.

Nano Every is stated in MuxTO.

Xiao wrote:
Can we burn it after assembled?
Yes

Xiao wrote:
Which one is the version for nano every?
The repository for unified-memory AVR.

https://github.com/arduino/ArduinoCore-megaavr#arduino-core-for-atmega4809-cpu

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The important thing is that you need to get the MuxTO firmware inside the SAMD11. This is what does the actual work of programming the mega4809. How you do it doesn't matter, either via bootloader or via a programmer.

 

Since MuxTO is an Arduino program, to compile it you need some type of Arduino framework that supports the SAMD11. This is where the unofficial support comes in as mentioned in the document on the Arduino site:

Since we don't ufficially support SAMD11 in our SAMD core, the core to be used is the awesome fork by MattairTech. Once you install it you'll be able to compile a basic firmware for MuxTO.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The actual SAMD11 firmware seems to include a bootloader as well as the MuxTO.   https://www.arduino.cc/en/Guide/NANOEvery#toc11

I assume that the bootloader is the mattairtech bootloader, but I don't see much.

You should be able to program the bootloader and/or the MuxTO firmware using an SWD debugger.  If you put only the bootloader in it, you should be able to upload MuxTO using the bootloader.

 

 

2)burn atmega4809 through Arduino IDE

    There is a menu named "Burn Bootloader" ,I think it is used to do that after select board & programmer.

    Which one is the version for nano every? ( ArduinoCore-avr/bootloaders/atmega8/ ATmegaBOOT-prod-firmware-2009-11-07.hex ?)

The 4809 Arduino boards don't use any bootloader; they all have the USB chip act as an UPDI programmer.

You may want a "burn bootloader" to make sure the fuses of the 4809 are set properly.  The "upload sketch" process sets some, but not all, of the fuses.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you,Tangas.

We have to programme the SAMD11 after assembled without huge amount.

 

The simplest and directive way is to burn with programmer, and I have the Atmel-ICE to try.

we should:

1)reseve the pins to connect Atmel-ICE for SAMD11 & ATMEGA4809;

2)make PCBA;

3)burn firmware for both.

 

For both chips provide UPDI, we can use it to programme: + /- / UPDI-avr / UPDI-D11 。

 

And get the firmware binary files:

1)MuxTO for D11.

use arduino IDE to create binary :  https://github.com/arduino/ArduinoCore-megaavr/tree/master/firmwares/MuxTO

Or just use this file: MuxTO.hex .

2)bootloader for 4809.

compile the boot.c to hex file:  https://github.com/arduino/ArduinoCore-megaavr/tree/master/bootloaders

Or use this file: atmega4809_uart_bl.hex

 

Is that right?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How to programme D11 through USB port?

 

The 4809 & D11 are all bare,no firmware to interact with host.

I don't know how can we programme the D11.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

How to programme D11 through USB port?

 

The 4809 & D11 are all bare,no firmware to interact with host.

I don't know how can we programme the D11.

 

From a bare SAMD11 chip, you can either (a) burn the bootloader using a hardware programmer and then subsequently upload sketches over USB, or (b) burn the sketch/program directly using a hardware programmer.

 

Unless you need to constantly upload new sketches, I would avoid using the bootloader.

 

Note that the Mattair bootloader takes 4K of the SAMD11's 16K flash, and may not have room for the MuxTO code (depending on which version of the Mattair core you are using).

 

I use a Segger J-link on my SAMD11 projects. Your board needs to expose the following SAMD11 pins for programming:  VDD, GND, SWDCLK (PA30), and SWDIO (PA31). Reset (PA28) doesn't seem to be required. You could use a 'proper' Cortex debug header (Samtech FTSH-105-01 5x2 0.05") but I usually use a standard 0.1" header and cables, as they're cheaper and more robust.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You make me chaos :)

I thought MuxTO.hex is the firmware of SAMD11 &  ATmegaBOOT-prod-firmware-2009-11-07.hex is the firmware of ATMEGA4809.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to your explain, the MuxTO.hex is the code to simulate USB function?

And the bootloader of SAMD11 is used to refresh MuxTO.hex?

If so, just burn MuxTO is enough indeed.

Do we need to configure the fuse? or leave them with default.

 

 

I did not notice the difference of bootloader & firmware before.

Bootloader is used to refresh firmware or application more easy.

Firmware is the application to realise functions.

Last Edited: Fri. Jan 17, 2020 - 07:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you guys,I nearly understand the concept and method to burn.

There is a last question to clarify , I hope someone can confirm for me.
I am not a hardware engineer, I don’t know if we can burn samd11 & atmega4809 without interfering each other based on current design of nano every?(Through UPDI)
Can samd11&4809 can share the vdd pin?acturally they’re different:3v/5v.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I assume you are using the Nano Every schematic as the basis of your design ? https://content.arduino.cc/asset...

 

>> Can samd11&4809 can share the vdd pin?acturally they’re different:3v/5v

 

No. The power design is:

 

 - a buck regulator circuit around IC1, which steps down the input voltage to 5V

 - a USB connector which also provides 5V

 - a 3.3V regulator

 

The SAMD11 is powered from 3.3V

The 4809 is powered from 5V

 

 

There are voltage-level shift circuits between the SAMD11 and the 4809, on the RX0, TX0 and UPDI signals, using Q1 and Q2.

 

>> I don’t know if we can burn samd11 & atmega4809 without interfering each other based on current design of nano every?(Through UPDI)

 

Connector J2 is the SWD hardware programming interface for the SAMD11. You can use this to upload the MuxTo program. Or you could upload a bootloader and then use the USB connection to upload the MuxTO program. Your choice.

 

Once programmed, the SAMD11 then acts as a hardware programmer for the 4809.

 

It may be easier to imagine the SAMD11 as a completely separate circuit that just happens to be integrated on the same board as the 4809.

 

Make sense ?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  1. Program SAMD11 bootloader using SWD debugger, test points, and AS7 or openocd or something.
  2. upload SAMD11 "firmware" over USB using Arduino IDE or bossac  https://www.arduino.cc/en/Guide/...
  3. Set initial ATmega4809 fuses, probably using IDE, but maybe avrdude directly.
  4. Upload ATmega4809 "sketches" using UPDI (via the Arduino IDE.)

 

All of those might be possible from within the Arduino IDE.

 

Note that on the Every, the SAMD11 performs TWO function - it is a UPDI programmer for uploading sketches to the 4809, AND it is a USB/Serial converter for providing serial connectivity from the 4809 to the host computer.
 

This does assume that you've done a full "clone" of the Every, rather than some modification.  You CAN replace the SAMD11 with a random USB/Serial converter, and use a serial bootloader in the 4809.
Optiboot was recently modified (well, more like re-written) to support 4809 and similar chips.  https://github.com/Optiboot/opti...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Arduino's mega4809 bootloader is from Microchip for Arduino Uno WiFi Rev2; its ESP32 has the UPDI signal though don't know if UPDI programming software exists for ESP32.

https://github.com/arduino/ArduinoCore-megaavr/blob/master/bootloaders/boot.c#L31

it's on sale :

ARDUINO UNO WiFi REV2

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
Can samd11&4809 can share the vdd pin?acturally they’re different:3v/5v.

 

They can, but you would need to run both at 3V, because 5V would burn the SAMD11. However, at 3V the mega4809 can only run at about half speed (10 MHz).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Acoording to the advices of obevel、westfw & Tangas,

I think it is better to provide independent UPDI programme interface for SAMD11 & 4809 if we want to make a mass of PCBA, 

For we can burn the MuxTO & bootloader through UPDI faster.

 

  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:

  1. Program SAMD11 bootloader using SWD debugger, test points, and AS7 or openocd or something.
  2. upload SAMD11 "firmware" over USB using Arduino IDE or bossac  https://www.arduino.cc/en/Guide/...
  3. Set initial ATmega4809 fuses, probably using IDE, but maybe avrdude directly.
  4. Upload ATmega4809 "sketches" using UPDI (via the Arduino IDE.)

 

All of those might be possible from within the Arduino IDE.

 

Note that on the Every, the SAMD11 performs TWO function - it is a UPDI programmer for uploading sketches to the 4809, AND it is a USB/Serial converter for providing serial connectivity from the 4809 to the host computer.
 

This does assume that you've done a full "clone" of the Every, rather than some modification.  You CAN replace the SAMD11 with a random USB/Serial converter, and use a serial bootloader in the 4809.
Optiboot was recently modified (well, more like re-written) to support 4809 and similar chips.  https://github.com/Optiboot/opti...

 

You clarified my questions quiet clearly, you should post earlier:) 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,I get it,thank you!

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the benefit of future searchers, here's the quick route to burning the MuxTO code onto a SAMD11 (on Linux):

 

1. install the Mattair core for the D11

a. in the Arduino IDE Preferences dialog, add an Additional Boards Manager URL: https://www.mattairtech.com/soft...

b. in the Arduino IDE Boards Manager, install "MattairTech SAM D|L|C core for Arduino - Beta build" version 1.6.18-beta-b1

2. download the bootloader binary: https://github.com/arduino/Ardui...

3. burn the bootloader to the D11 using your preferred hardware programmer, e.g. a J-Link

4. you should now see a new USB device (lsusb displays "Bus 002 Device 013: ID 2341:5058 Arduino SA", macOS displays "MuxTO BL")

5. using the Arduino IDE Boards Manager, install the MegaAVR board support package

6. use the bossac command line to upload the MuxTO binary:

~/.arduino15/packages/MattairTech_Arduino/tools/bossac/1.7.0-mattairtech-3/bossac -i -d --port=ttyACM0 -U true -i -e -w -v ~/.arduino15/packages/arduino/hardware/megaavr/1.8.5/firmwares/MuxTO
 

You can build both components from source but you'll have to patch the Mattair source with the many Arduino changes: https://github.com/arduino/Ardui...

 

To upload a sketch to e.g. a 4809:

 

1. wire up the SAMD11 board to the 4809 board (TX, RX and UPDI, GND and maybe +V)

2. in the Arduino IDE, select:

Tools->Board->Arduino Nano Every

Tools->Port->/dev/ttyACM0 (Arduino Nano Every)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

I get the custermised board at last.

Trying to burn D11 & ATMEGA4809 through ATMEL-ICE.

There are problems.

 

1) failed burn the bootloader provided by you :

 

but success for ArduinoCore-samd/bootloaders/zero/binaries/sam_ba_Generic_D11D14AM_SAMD11D14AM.bin

 

2) I upload the bootloader for ATMEGA4809;

I use this firmware : Arduino\hardware\arduino\avr\bootloaders\atmega8\ATmegaBOOT.hex

I don't know if it right or not.

 

3) use arduino IDE upload blink programme.

board : arduino nano every

but the device name displayed as "MattairTech Xeno Mini" .

The reason should be the wrong firmware of D11.

But how to correct it?

Last Edited: Mon. Apr 27, 2020 - 02:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You may be posting in the wrong place. While it's true this forum is "Arduino" the fact that it's a sub-forum on an AVR site rather suggests it's only about AVR based Arduini. You might be better posting a question about SAM/ARM based Arduino on their own iste.

 

But anyway are ARMs really programmed with .bin not .hex or .elf files ??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

2) I upload the bootloader for ATMEGA4809;

I use this firmware : Arduino\hardware\arduino\avr\bootloaders\atmega8\ATmegaBOOT.hex

That bootloader is for an ATMEGA8, not an ATMEGA4809!!!

 

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1


I'm very confused (an easy state to get to!):

 

 

All the signs here are that it is a SAM (ARM) chip that is being programmed. It's a SAM .bin file in a SAM directory being programmed into an ATSAM using SWD  which is the SAM/ARM software debug interface method. So what has this got to do with a 4809 ??

 

(hence my previous point about posting in a place where they know more about ARM chips!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
You might be better posting a question about SAM/ARM based Arduino on their own iste

Or, as it's direct programming with Atmel-ICE from Atmel Studio, perhaps try

 

In-System Debuggers and Programmers (ARM-related)

 

or

 

Atmel Studio (ARM-related)

 

are ARMs really programmed with .bin not .hex or .elf files ??

The ARM itself neither knows nor cares anything about these files or formats - that's a matter for whatever programmer is used.

 

Atmel-ICE can certainly program from Hex and ELF

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Apr 27, 2020 - 03:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Last try:

1) burn D11 with : sam_ba_arduino_MuxTO_SAMD11D14AM.bin (from MattmairTech)

2) burn ATMEGA4809 with : Arduino15\packages\arduino\hardware\megaavr\1.8.5\firmwares\MuxTO\MuxTO.hex

3) try to upload sketch to board,failed:

Last Edited: Mon. Apr 27, 2020 - 03:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which part, exactly, do you not understand ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

in #19, Xiao wrote:
Trying to burn D11 & ATMEGA4809 through ATMEL-ICE

Surely, that would be two separate operations:

  • burn the D11 file to the  D11 through ATMEL-ICE using SWD;
  • burn ATMEGA4809 file to the ATMEGA4809  through ATMEL-ICE using [whatever it uses].

 

and would require a programming interface connection to each micro. Does your "customised" board have that ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
[whatever it uses].

4809 datasheet wrote:
– Single-pin Unified Program Debug Interface (UPDI)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

in #19, Xiao wrote:
Trying to burn D11 & ATMEGA4809 through ATMEL-ICE

Surely, that would be two separate operations:

  • burn the D11 file to the  D11 through ATMEL-ICE using SWD;
  • burn ATMEGA4809 file to the ATMEGA4809  through ATMEL-ICE using [whatever it uses].

 

and would require a programming interface connection to each micro. Does your "customised" board have that ?

Yes,I reserved port to burn code for D11 & 4809.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely, Step 6 in #18 is about getting the D11 to program the AVR ?

 

If you're programming both chips direct from Atmel Studio via Atmel-ICE, then all that's irrelevant ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


obdevel:

 

As your guideline,

1) burn the D11 (sam_ba_arduino_MuxTO_SAMD11D14AM.bin); (should use the download function of github, otherwise the file changed)

2) burn the 4809 (MuxTO.hex) 

3) upload blink to board. failed still.

 

what I HAVE DONE IS RIGHT?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

1) burn the D11 (sam_ba_arduino_MuxTO_SAMD11D14AM.bin); (should use the download function of github, otherwise the file changed)

2) burn the 4809 (MuxTO.hex) 

 

Why are you burning MuxTO to both chips? Only the D11 is the programmer chip; the Mega4809 is the target, you don't need to burn MuxTO there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So,what should burn to it?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Didn't you say you'd understood  that in #16 ?

 

EDIT

 

In #16, you wrote:

westfw wrote:
Note that on the Every, the SAMD11 performs TWO function - it is a UPDI programmer for uploading sketches to the 4809, AND it is a USB/Serial converter for providing serial connectivity from the 4809 to the host computer.

You clarified my questions quiet clearly, you should post earlier:) 

 

So you have something like this:

 

 

So you load firmware into the D11 to make it act as the combined USB-to-UART and UPDI programmer.

 

That means that the SAM can then program your Arduino sketch directly into the ATmega over UPDI without the need for any bootloader in the AVR.

 

So you don't need to program anything into the AVR during manufacturing!

 

 

 

EDIT 2

 

SO the SAM is acting rather like the mEDBG on an XPlained board ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Apr 28, 2020 - 02:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use a j-link and the Segger software tools to program the SAMD11 over SWD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
So,what should burn to it?

 

Your test program.

 

edit: i mean, burn your test program into the mega using the samd11 programming interface (jtag2updi), which should become active once you burn MuxTO into the D11.

 

edit2: if you still have errors, this is probably some communication problem with the MuxTO D11 firmware. To diagnose it, it's better not to use the Arduino IDE, use avrdude directly with verbose output. This will provide several clues on what is going wrong.

Last Edited: Tue. Apr 28, 2020 - 02:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
I have studied the documentation :  https://www.arduino.cc/en/Guide/NANOEvery,

That would appear to be user documentation?

 

Is there not separate/additional documentation somewhere for people trying to manufacture ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

obdevel wrote:

Connector J2 is the SWD hardware programming interface for the SAMD11. You can use this to upload the MuxTo program. Or you could upload a bootloader and then use the USB connection to upload the MuxTO program. Your choice.

Once programmed, the SAMD11 then acts as a hardware programmer for the 4809.

It may be easier to imagine the SAMD11 as a completely separate circuit that just happens to be integrated on the same board as the 4809.

Make sense ?

 

Now, I get something :)

So,we burn nothing to 4809. (guides  in arduino.cc not mention it too)

We just burn the D11.

 

this is the result I tried:

1) burn sam_ba_arduino_MuxTO_SAMD11D14AM.bin to D11 & MuxTO.hex to 4809.

   This is not right, and failed to upload sketch indeed.

2) burn sam_ba_arduino_MuxTO_SAMD11D14AM.bin to D11, erase 4809;

   Failed to  upload sketch too, error is same "avrdude: jtagmkII_getsync(): sign-on command: status -1"

3) burn MuxTO.hex to D11.

   The COM device disappear, can't upload in Arduino IDE

4) burn sam_ba_arduino_MuxTO_SAMD11D14AM.bin to D11 and then MuxTO.hex to D11, same with 3

   The second write procedure clear the 1st one?

5) burn sam_ba_arduino_MuxTO_SAMD11D14AM.bin to D11, use bossac upload MuxTO.hex to D11, failed

    end with "permission denied"

 

I think we can just burn the MuxTO.hex to D11, for we will not reprogramme D11 later.

Why Windows can't recognise it while MuxTO.hex burned only?

 

 

Last Edited: Tue. Apr 28, 2020 - 03:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
guides  in arduino.cc not mention it too

As noted above, presumably because they are user documents - and this is not stuff that a user would be doing ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What a mess. Why don't you just build MuxTO from scratch then upload it to the D11?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:

What a mess. Why don't you just build MuxTO from scratch then upload it to the D11?

 

Man, what I build is same with the file I download.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you even know that your custom board is correct and working?

 

For reference, Have you got a genuine  Nano Every, and are you able to load a "sketch" onto it ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

Do you even know that your custom board is correct and working?

That is what I'm doing.

 

awneil wrote:

or reference, Have you got a genuine  Nano Every, and are you able to load a "sketch" onto it ?

No.

I just copy the design of Arduino,and add some simple funtions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Till now, I make little sense.

 

But I'm not clear about whole map.

For the language knowledge, I missed important information.

 

I want to confirm this question:

The bootloader & firmware is same thing or not?

 

According to word of obdevel, they are different ,I guess:

    1) burn the file from Mattairtech;

    2) upload the MuxTO from arduino directory;

We don't need to do like those if they are same.

 

 

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:

Till now, I make little sense.

 

But I'm not clear about whole map.

For the language knowledge, I missed important information.

 

I want to confirm this question:

The bootloader & firmware is same thing or not?

 

According to word of obdevel, they are different ,I guess:

    1) burn the file from Mattairtech;

    2) upload the MuxTO from arduino directory;

We don't need to do like those if they are same.

 

I did not notify a very basic thing.

bootloader : help to write / rewrite firmware to flash;

firmware : code to execute logic.

 

D11 bootloader : help to reprogramme D11 firmware,  https://github.com/arduino/Ardui...

D11 firmware :  simulate USB device,write arduino sketch to ATMEGA4809,  ~/.arduino15/packages/arduino/hardware/megaavr/1.8.5/firmwares/MuxTO

 

4809 bootloader : needn't 

4809 firmware : any sketch you burn to it through Arduino IDE

 

It is very clear & simple if you understand those basic thing.

For my board, it is ok for D11 bootloader.

Now, try to load the firmware for it.

The error shows failing to change register or flash.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Success to burn the blink into board(though not blink :) )

 

leave some information for beginner.

 

First, make sure you understand these basic thing:

bootloader : help to write / rewrite firmware to flash;

firmware : code to execute logic.

 

Nano every: 

D11 bootloader : help to reprogramme D11 firmware;

D11 firmware :  simulate USB device,write arduino sketch to ATMEGA4809.

 

4809 bootloader : needn't 

4809 firmware : any sketch you burn to it through Arduino IDE

 

It is very clear & simple if you understand those basic thing.

 

 

this is my step to burn for a bare Arduino Nano every PCBA (copy of obdevel's):

1. install the Mattair core for the D11

a. in the Arduino IDE Preferences dialog, add an Additional Boards Manager URL: https://www.mattairtech.com/soft...

b. in the Arduino IDE Boards Manager, install "MattairTech SAM D|L|C core for Arduino"

2. download the bootloader binary: https://github.com/arduino/Ardui... (click the download button, not right click & save as...)

3. burn the bootloader to the D11 using your preferred hardware programmer, atmel-ice( SWD port),in my case;

4. you should now see a new USB device (displays "MuxTO BL")

5. using the Arduino IDE Boards Manager, install the MegaAVR board support package

6. use the bossac command line to upload the MuxTO binary:

~/.arduino15/packages/MattairTech_Arduino/tools/bossac/1.7.0-mattairtech-3/bossac -i -d --port=COM13 -U true -i -e -w -v ~/.arduino15/packages/arduino/hardware/megaavr/1.8.5/firmwares/MuxTO/MuxTO.bin

(failed while using MuxTO.hex)

 

now, windows labled the USB device as "Arduino NANO Every".

Success to upload Blink through Arduino IDE.

 

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\xmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM14
         Using Programmer              : jtag2updi
         Overriding Baud Rate          : 115200
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
  boot-loader FW version:        1
  firmware version:              1.07
  hardware version:              1
S_MCU:
  boot-loader FW version:        1
  firmware version:              6.07
  hardware version:              1
Serial number:                   00:00:00:00:00:00
Device ID:                       JTAGICE mkII
         AVR Part                      : ATmega4809
         Chip Erase delay              : 0 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 0
         StabDelay                     : 0
         CmdexeDelay                   : 0
         SyncLoops                     : 0
         ByteDelay                     : 0
         PollIndex                     : 0
         PollValue                     : 0x00
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           prodsig        0     0     0    0 no         61   61      0     0     0 0x00 0x00
           fuses          0     0     0    0 no          9    0      0     0     0 0x00 0x00
           fuse0          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse1          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse2          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse4          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse5          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse6          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse7          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           fuse8          0     0     0    0 no          1    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0     0     0 0x00 0x00
           data           0     0     0    0 no          0    0      0     0     0 0x00 0x00
           usersig        0     0     0    0 no         64   64      0     0     0 0x00 0x00
           flash          0     0     0    0 no      49152  128      0     0     0 0x00 0x00
           eeprom         0     0     0    0 no        256   64      0     0     0 0x00 0x00

         Programmer Type : JTAGMKII_PDI
         Description     : JTAGv2 to UPDI bridge
         M_MCU hardware version: 1
         M_MCU firmware version: 1.07
         S_MCU hardware version: 1
         S_MCU firmware version: 6.07
         Serial number:          00:00:00:00:00:00
         Vtarget         : 5.0 V

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

Reading | ################################################## | 100% 0.27s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file "C:\Users\xmc\AppData\Local\Temp\arduino_build_451055/Blink.ino.hex"
avrdude: writing flash (1118 bytes):

Writing | ################################################## | 100% 0.85s

avrdude: 1118 bytes of flash written
avrdude: verifying flash memory against C:\Users\xmc\AppData\Local\Temp\arduino_build_451055/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\xmc\AppData\Local\Temp\arduino_build_451055/Blink.ino.hex:
avrdude: input file C:\Users\xmc\AppData\Local\Temp\arduino_build_451055/Blink.ino.hex contains 1118 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.18s

avrdude: verifying ...
avrdude: 1118 bytes of flash verified
avrdude: reading input file "0x01"
avrdude: writing fuse2 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse2 written
avrdude: verifying fuse2 memory against 0x01:
avrdude: load data fuse2 data from input file 0x01:
avrdude: input file 0x01 contains 1 bytes
avrdude: reading on-chip fuse2 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse2 verified
avrdude: reading input file "0xC9"
avrdude: writing fuse5 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse5 written
avrdude: verifying fuse5 memory against 0xC9:
avrdude: load data fuse5 data from input file 0xC9:
avrdude: input file 0xC9 contains 1 bytes
avrdude: reading on-chip fuse5 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse5 verified
avrdude: reading input file "0x00"
avrdude: writing fuse8 (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of fuse8 written
avrdude: verifying fuse8 memory against 0x00:
avrdude: load data fuse8 data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip fuse8 data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of fuse8 verified

avrdude done.  Thank you.
 

 

 

Last Edited: Wed. Apr 29, 2020 - 02:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, glad you were able to make it work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thank you guys