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!
- 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
![](https://cdn.hackaday.io/images/4216031544155977172.png)
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.
![](https://cdn.hackaday.io/images/9275991544156339696.png)
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"
![](https://cdn.hackaday.io/images/7428011544156499607.png)
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"
![](https://cdn.hackaday.io/images/2431791544156770739.png)
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!!!
![](https://cdn.hackaday.io/images/1823221544157052840.png)
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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Yeah! Mega3209 is also a family of AVR8. I hope lots of board and people will use them!
Are you sure? yes | no
Nice, I got some ATMega3209 and breakout boards, glad to see other projects are already off the ground.
Are you sure? yes | no