Close

How to setup Arduino IDE full support (including binary upload) for my board.

A project log for ATMega4809 developing board project

Very new chip by Microchip(Atmel) ATmega4809 has a very unique CPLD like logic and also promised to be applied to next Arduino, why not try!

kodera2tkodera2t 12/07/2018 at 04:332 Comments

Here is the way.

First of all, please add megaavr support (4809 support) in your arduino IDE by installing "Arduino UNO WiFi Rev2" in board manager. Also please confirm normally compiling "blink" or "bareminimum" without any issue in Arduino IDE. If they are ok, now the time to add support!

  1. Download avrdude.conf including 4809 setting.

The author of UART-UPDI programmer, Elatingas releases avrdude.conf including various UPDI supported MCU setting. Just download "avrdude.conf" and save it to

The above position is the case of OSX. Version may be different for your case. (of course, "kodera2t" is the username and please replace it with your account name). This file swapping is not harmful (not affect on another board support).

2. Find megaavr setting folder in your system.

If UNO WiFi Rev2 is correctly installed, the files above should be installed in the directly indicated in the top of above image (also "kodera2t" is the username).

3. Edit "platform.txt"

Open "platform.txt" and find the -Pusb in "tools.avrdude.upload.pattern" and replace it with {serial.port} as above. and save it.

4. Edit "boards.txt"

Please find "uno2018.upload.protocol=xplanedmini_updi" and replace it with "jtag2updi" (Here I've changed the board name but it does not matter, as you wish.)

                                                              That's all!!!

You will see the board name in the Tools menu and select proper port and click upload in Arduino IDE... then

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

         System wide configuration file is "/Users/kodera2t/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/etc/avrdude.conf"
         User configuration file is "/Users/kodera2t/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.SLAB_USBtoUART
         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:              6.00
  hardware version:              1
S_MCU:
  boot-loader FW version:        1
  firmware version:              6.00
  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: 6.00
         S_MCU hardware version: 1
         S_MCU firmware version: 6.00
         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.02s

avrdude: Device signature = 0x1e9651 (probably m4809)
avrdude: erasing chip
avrdude: reading input file "/var/folders/pc/619jfjbj3ns28tb77tr37tch0000gn/T/arduino_build_134019/OLED_4809_sample_code.ino.hex"
avrdude: writing flash (15038 bytes):

Writing | ################################################## | 100% 3.67s

avrdude: 15038 bytes of flash written

avrdude done.  Thank you.

YES! Now simply Arduino IDE is enough to enjoy my 4809 challenger board! 

Actual operation can be found in the following movie...

Discussions

kodera2t wrote 12/08/2018 at 01:25 point

Yeah! Mega3209 is also a family of AVR8. I hope lots of board and people will use them!

  Are you sure? yes | no

Michael Best wrote 12/07/2018 at 15:46 point

Nice, I got some ATMega3209 and breakout boards, glad to see other projects are already off the ground.

  Are you sure? yes | no