Git Product home page Git Product logo

microupdi's People

Contributors

mcudude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microupdi's Issues

connect 4808

Hi, i was able to program the pro micro

if i use arduino to check after the upload the programmer i got following data:

BN: Arduino Uno WiFi Rev2
VID: 03eb
PID: 2145
SN: MICROUPDIPROGRAMMERX

then i hook it up to a 4808 atmel and try to upload the firmware via arduino and get following error:

Global variables use 527 bytes (8%) of dynamic memory, leaving 5617 bytes for local variables. Maximum is 6144 bytes.
avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy
avrdude: bad response to AVR sign-on command: 0xa0
avrdude: retrying with external reset applied
avrdude: bad response to AVR sign-on command: 0xa0
avrdude: retrying with external reset applied
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

An error occurred while uploading the sketch

the programmer is connected via ground and updi to the atmel 4808 chip it is a brand new one. I checked with an oscilloscope the updi pin to see what it is going on. An some bits are showing up.

could it be that it is a permission problem on the linux machine or is there a way to check a kind of simple communication to verify that everything is okay. The atmega 4808 runs on 3.3 volt.

many thanks

cheers

Clone microUPDI not working

Hi Hans,

I built a clone PCB of your design except I changed the 5V/3.3V buffer to a 74LVC1T45 for the serial port (not using at this point). I did the AREF modification on the Micro. Flashed the uUPDI core code fine.

Arduino IDE won't program with the unit. Atmel Studio 7.0 sees the UPDI programmer but only allows ATMega4809 chips. If I try to ID the chip it sees my chip ATTiny816 but won't allow me to program it since it is not a 4809.

Also, tried FLASHing the Mega32u4 manually using the .hex files. Same behavior. Working on Windows 7 64-bit. Any ideas?

Using UART for Debug

Opening UART port to microUPDI does not seem able to handle 115200 nor 9600 baud rate. How to use the debug UART function?

working with Platformio

Hi, I have the microUPDI, can I get it to debug code on an AVR 4809 using Platformio? Any help to configure would be much appreciated.

Question : Can I use 3.3V Pro Micro

If I need to program only 3.3V target, can I use 3.3V Pro micro (I have only this version in hand) or does the firmware going into the pro-micro (8MHz) will not work due to different speed?
I'm pretty sure it will not work until FW is build for 8MHz but worth asking

Does not respont during flashing

Hi,

up till now I tried everything to flash my Pro Micro but during flashing the device does not respond anymore.
To make them available again I flashed bootloader of Micro and Leonardo. After that it is also possible to just upload an simple sketch.

But flashing with microUPDI ist not possible. Here ist my output:

##############################################################################################
mkdir: das Verzeichnis »preproc“ kann nicht angelegt werden: Die Datei existiert bereits
Der Sketch verwendet 0 Bytes (0%) des Programmspeicherplatzes. Das Maximum sind 28672 Bytes.
Globale Variablen verwenden 0 Bytes (0%) des dynamischen Speichers, 2560 Bytes für lokale Variablen verbleiben. Das Maximum sind 2560 Bytes.

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 "/home/itsy/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
     User configuration file is "/home/itsy/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyACM0
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega32U4
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : butterfly
     Description     : Atmel AppNote AVR109 Boot Loader

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/home/itsy/.arduino15/packages/microUPDIcore/hardware/avr/1.0.1/firmwares/mEDBG_UPDI_1.13_modified_suffer.eep"
avrdude: writing eeprom (1024 bytes):

Writing | ################################################## | 100% 3.45s

avrdude: 1024 bytes of eeprom written
avrdude: verifying eeprom memory against /home/itsy/.arduino15/packages/microUPDIcore/hardware/avr/1.0.1/firmwares/mEDBG_UPDI_1.13_modified_suffer.eep:
avrdude: load data eeprom data from input file /home/itsy/.arduino15/packages/microUPDIcore/hardware/avr/1.0.1/firmwares/mEDBG_UPDI_1.13_modified_suffer.eep:
avrdude: input file /home/itsy/.arduino15/packages/microUPDIcore/hardware/avr/1.0.1/firmwares/mEDBG_UPDI_1.13_modified_suffer.eep contains 1024 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 0.12s

avrdude: verifying ...
avrdude: 1024 bytes of eeprom verified
avrdude: reading input file "/home/itsy/.arduino15/packages/microUPDIcore/hardware/avr/1.0.1/firmwares/mEDBG_UPDI_1.13_AREF_fix.hex"
avrdude: writing flash (32768 bytes):

Writing | ###########################################avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: write block
***failed;

I'm stuck. Unable to flash the Arduino Pro Micro as microUPDI programmer

Hello,

I have a working Pro Micro. Uploaded the Pro Micro Test Code and I get blinking LEDs.

When I select microUPDI Firmware Uploader from the boards menu and click the upload button I get an error.

FQBN: microUPDIcore:avr:microupdi
Using board 'microupdi' from platform in folder: C:\Users\jacco\AppData\Local\Arduino15\packages\microUPDIcore\hardware\avr\1.0.2
Using core 'arduino' from platform in folder: C:\Users\jacco\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\jacco\AppData\Local\Arduino15\packages\microUPDIcore\hardware\avr\1.0.2/scripts/dummy-preproc-macros-command.bat C:\Users\jacco\AppData\Local\Temp\arduino\sketches\AE9949AC16C921D4D53471318DBE9348/preproc ctags_target_for_gcc_minus_e.cpp
Error while detecting libraries included by C:\Users\jacco\AppData\Local\Temp\arduino\sketches\AE9949AC16C921D4D53471318DBE9348\sketch\sketch_apr19a.ino.cpp
Generating function prototypes...
C:\Users\jacco\AppData\Local\Arduino15\packages\microUPDIcore\hardware\avr\1.0.2/scripts/dummy-preproc-macros-command.bat C:\Users\jacco\AppData\Local\Temp\arduino\sketches\AE9949AC16C921D4D53471318DBE9348/preproc ctags_target_for_gcc_minus_e.cpp
The system cannot find the path specified.
exit status 1

Compilation error: exit status 1

What path can't be found? What am I missing?

Flashing firmware times out, then bricks board

Using a brand new Pro Micro 5V board from here, plugging it into the computer and following the instructions from here give me a timeout after maybe 60 seconds.

Der Sketch verwendet 0 Bytes (0%) des Programmspeicherplatzes. Das Maximum sind 28672 Bytes.
Globale Variablen verwenden 0 Bytes (0%) des dynamischen Speichers, 2560 Bytes für lokale Variablen verbleiben. Das Maximum sind 2560 Bytes.
Erzwinge Reset durch öffnen/schließen mit 1200 bps auf dem Port COM30
PORTS {COM1, COM30, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, COM31, } => {COM31, }
Found upload port: COM31
C:\Users\Max\AppData\Local\Arduino15\packages\microUPDIcore\hardware\avr\1.0.1/scripts/avrdude-wrapper.bat C:\Users\Max\Desktop\Programming Stuff\arduino-1.8.13\hardware\tools\avr/bin/avrdude C:\Users\Max\Desktop\Programming Stuff\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf atmega32u4 avr109 COM31 57600 C:\Users\Max\AppData\Local\Arduino15\packages\microUPDIcore\hardware\avr\1.0.1 C:\Users\Max\AppData\Local\Temp\arduino_build_545881 
Beim Hochladen des Sketches ist ein Fehler aufgetreten

The lines saying

Sketch uses 0 Bytes of program memory. The maximium is 28672 bytes.
Global variables use 0 Bytes..
Forcing reset by opening/closing at 1200bps on COM30
[...]
Found upload port: COM31
[command]
An error occured while uploading the sketch.

^After that I still have COM31 but consequent upload attempts yield

Erzwinge Reset durch öffnen/schließen mit 1200 bps auf dem Port COM31
processing.app.debug.RunnerException
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2071)
	at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Fehler beim Ansprechen des seriellen Ports "COM31".
	at processing.app.Serial.touchForCDCReset(Serial.java:107)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
	... 5 more
Caused by: jssc.SerialPortException: Port name - COM31; Method name - openPort(); Exception type - Port busy.
	at jssc.SerialPort.openPort(SerialPort.java:164)
	at processing.app.Serial.touchForCDCReset(Serial.java:101)
	... 6 more

I then have to manually kill the avrdude.exe process.

After that, my board isn't recognized by my PC anymore.

Trying to connect a button between RST and GND and pressing it once or twice after the USB plug is inserted also doesn't make a difference. (Or holding RST during insertion and then releasing it).

I'll try and recover my board using an external programmer, but I at least want to document that this was happening to a stock board.

Debug and serial monitor

If I use my microUPDI as a debug tool in MCSudio, it works fine. However, as part of the debug session, I'd like to send and receive chars over USART on my AVR4809. Currently I'm trying to do the serial comms using the Arduino sermon, but the problem I have is when debug is active in MCStudio, the Arduino Sermon is inactive. If I stop the debug session in MCStudio, the Arduino Sermon becomes active again. So my question is - Is it possible to run the debug session and serial data transmit/ receive simultaneously?
thanks.

Create a 12V version of microUPDI

I'm planning to make a 12V version of this programmer. This will allow users to program chips that's had their UPDI line turned into a GPIO pin.

This version will be physically larger than the non-12V version due to increased component count.

We can generate a 12V rail by attaching a diode/capacitor voltage multiplier to the 16 MHz clock output. The frequency should preferably have been lower, but the mEDBG firmware is very limited when it comes to customizability, so that's all we got.

The AVR is very picky when it comes to the 12V pulse. According to sources over at the Avrfreaks forum, the 12V pulse should be between 500 and 1000us long, before puled low for about 100 seconds. This can be accomplished with some careful MOSFET circuitry.

Arduino IDE won't flash Pro Micro

Using Arduino 1.8.16:
Installed microUPDI flash tool without issue;
selected it;
connected ProMicro to my Mac (Big Sur, 11.6.2 if that's relevant)
Click Upload button: got this:

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 "/Users/lindsay/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/lindsay/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem1464201
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "j>���"; type = *
    Software Version = *.�; Hardware Version = �.�
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader

avrdude done.  Thank you.

Perhap[s it worked in spite of the error messages? Installation instructions say "in Arduino IDE it will show up as an *Arduino UNO WiFi Rev2." I'm not sure where in Arduino that's supposed to show up: as a Port? as a Board? I do find an Arduino UNO WiFi Rev2 board under "Arduino MegaAVR boards", but that entry is there whether I plug in to pro Micro or not.

So --- I'm trying to follow instructions - something's gone wrong for me. Advice appreciated. Thanks!

Outdated readme?

I tried to follow the instructions (https://github.com/MCUdude/microUPDI), but I'm having some issues.

Usage
After the Pro Micro is flashed with mEDBG firmware it will present itself to the computer as an mEDBG CMSIS-DAP device. In Atmel Studio it will show up as a generic mEDBG device, while in Arduino IDE it will show up as an *Arduino UNO WiFi Rev2.

If you're using the microUPDI programmer with megaTinyCore you just select the Onboard Atmel mEDBG option in the Programmers menu. For MegaCoreX it's Atmel mEDBG (microUPDI).

Getting board info ARduino IDE states unknown board. Looking at the device registry in Windows "bus reported device description" states "mEDBG CDC", so I think I managed to make programmer out of my nano (?).

I've downloaded megaTinyCore but there is on Onboard Atmel mEDBG option. Are you able to update your documentation?

Onboard Atmel mEDBG option not present in programmers menu, 'initialization' fails during upload

i cant seem to upload anything to my attiny1616 through the microUPDI. i am new to UPDI programming so im not sure what im doing wrong.

my pro micro was programmed with the microUPDI firmware uploader correctly, and it now shows as 'Arduino Uno WiFi Rev2' under the com port menu.
however there is no option for the 'Onboard Atmel mEDBG' under the programmers menu (see below)
image

when i try to upload a blinky sketch via Upload Using Programmer, this is the output i get:

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

         System wide configuration file is "C:\Users\Mjolnir\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : xplainedmini_updi
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
         AVR Part                      : ATtiny1616
         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   10      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         32   32      0     0     0 0x00 0x00
           flash          0     0     0    0 no      16384   64      0     0     0 0x00 0x00
           eeprom         0     0     0    0 no        256   32      0     0     0 0x00 0x00

         Programmer Type : JTAGICE3_UPDI
         Description     : Atmel AVR XplainedMini in UPDI mode
         ICE hardware version: 0
         ICE firmware version: 1.19 (rel. 57)
         Serial number   : MICROUPDIPROGRAMMERX
         Vtarget         : 3.30 V
         JTAG clock megaAVR/program: 0 kHz
         JTAG clock megaAVR/debug:   0 kHz
         JTAG clock Xmega: 0 kHz
         PDI clock Xmega : 0 kHz

avrdude: Short read, read only 0 out of 64 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x18
avrdude: retrying with external reset applied
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: retrying with external reset applied
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: jtag3_edbg_signoff(): unexpected response 0x81, 0x11
avrdude: jtag3_edbg_signoff(): unexpected response 0x01, 0x00

avrdude done.  Thank you.

Failed programming: uploading error: exit status 1```

seems that initialization has failed on the attiny1616, and i read a little (and understood even less) about the combination reset/updi pin on the attiny1616 and how there might be some kind of internal fuse i need to set or something to allow for programs to be uploaded? 

again im new to UPDI uploading and im not sure if there is like a reset window to program the attiny1616, or if i need to add a resistor to ground on one of the pins etc. OR if its even a problem with the attiny1616, my custom board not being soldered correctly (despite my inspection) or if the microUPDI programmer has some kind of error. is there any resistors i need to set on the microUPDI after uploading the UPDI firmware to the pro micro?

thanks in advance for any help

Can't program ATTiny3216 under SpenceKonde/megaTinyCore

As noted on Usage section of MCUdude/microUPDI README.md, setting Arduino IDE's programmer to Onboard Atmel mEDBG (xplain_mini) (megaTinyCore) doesn't upload a sketch to bare ATTiny3216.

I think -cjtag2updi option of avrdude should be -cxplainedmini_updi.
Should I modify avrdude.conf of megaTinyCore to include xplainedmini_updi.
Am I right?

Forcing reset using 1200bps open/close on port /dev/ttyACM0
/home/t2/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/t2/.arduino15/packages/megaTinyCore/hardware/megaavr/1.0.5/avrdude.conf -v -pattiny3216 -cjtag2updi -P/dev/ttyACM0 -e -Uflash:w:/tmp/arduino_build_880748/Blink.ino.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 "/home/t2/.arduino15/packages/megaTinyCore/hardware/megaavr/1.0.5/avrdude.conf"
         User configuration file is "/home/t2/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : jtag2updi
avrdude: jtagmkII_recv_frame(): timeout
avrdude: jtagmkII_getsync(): sign-on command: status -1
avrdude: jtagmkII_recv_frame(): timeout
avrdude: jtagmkII_getsync(): sign-on command: status -1

Custom UPDI programmer and ATmega4809

I tried to build a stand-alone programmer and a simple board with 4809 but something I didn't do good enough.

UPDI programmer
This programmer I made according to the schematic of an add-on board and the schematic of the Sparkfun Pro Micro 5V.
This programmer is alive and while following the steps here, I flash it, and it goes fine. My PC recognizes it as mEDBG Virtual Port. This part should be ok.

Schematic_UPDI programmer 32u4_2022-01-24

As you can see, there is not much. Only what needs to be.

ATmega4809 board
I followed the barebone schematic here as well. Just solder all the necessary things, but when trying to upload a basic Blink sketch I get errors.

Schematic_ ATmega4809_2022-01-24

On this second board, I didn't solder the 3.3V regulator, LEDs, etc. Only the basic.

I choose MegaCoreX, Atmega4809
Internal clock 16MHz
BOD 2.6V
48 pin standard
Reset pin: Reset
No Bootloader
Programmer mEDBG/microUPDI

To upload I use Sketch->Upload using programmer

How to troubleshoot this? From where to start?
Are my wirings ok?
Did I choose the right options in Arduino IDE?
Do I need a step or two before uploading the sketch?

Thank you in advance.

Failed uploading: uploading error

Hi, I try upload code via
Arduino IDE 2.1.1
avrdude: Version 6.3-20190619
OS: Ubuntu 22.04.3 LTS
target: Arduino nano every

I have this error:

FQBN: arduino:megaavr:uno2018
Using board 'uno2018' from platform in folder: /home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8
Using core 'arduino' from platform in folder: /home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8

Detecting libraries used...
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_REV2 -DARDUINO_ARCH_MEGAAVR -DUNO_WIFI_REV2_328MODE -DMILLIS_USE_TIMERB3 -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/deprecated -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/uno2018 /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_REV2 -DARDUINO_ARCH_MEGAAVR -DUNO_WIFI_REV2_328MODE -DMILLIS_USE_TIMERB3 -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/deprecated -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/uno2018 /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/sketch/Blink.ino.cpp -o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/preproc/ctags_target_for_gcc_minus_e.cpp
/home/duskohu/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_REV2 -DARDUINO_ARCH_MEGAAVR -DUNO_WIFI_REV2_328MODE -DMILLIS_USE_TIMERB3 -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/deprecated -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/uno2018 /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/sketch/Blink.ino.cpp -o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-gcc -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO_WIFI_REV2 -DARDUINO_ARCH_MEGAAVR -DUNO_WIFI_REV2_328MODE -DMILLIS_USE_TIMERB3 -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino/api/deprecated -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino -I/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/uno2018 /home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/variants/uno2018/variant.c -o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/core/variant.c.o
Using precompiled core: /tmp/arduino/cores/arduino_megaavr_uno2018_mode_on_8b0d44deb33bba1a40640d3a4616ea6a/core.a
Linking everything together...
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -Wl,--section-start=.text=0x200 -mmcu=atmega4809 -o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.elf /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/sketch/Blink.ino.cpp.o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/core/variant.c.o /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/../../cores/arduino_megaavr_uno2018_mode_on_8b0d44deb33bba1a40640d3a4616ea6a/core.a -L/tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855 -lm -Wl,-Map,/tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.map
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-objcopy -O binary -R .eeprom /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.elf /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.bin
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.elf /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.eep
/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.elf /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.hex

/home/duskohu/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-size -A /tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.elf
Sketch uses 1510 bytes (3%) of program storage space. Maximum is 48640 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
"/home/duskohu/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/home/duskohu/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega4809 -cxplainedmini_updi -Pusb  -b115200 -e -D "-Uflash:w:/tmp/arduino/sketches/DCA1AD5AE16BFCDE2AFB6F59E4124855/Blink.ino.hex:i" "-Ufuse2:w:0x01:m" "-Ufuse5:w:0xC9:m" "-Ufuse8:w:0x02:m" "-Uflash:w:/home/duskohu/.arduino15/packages/arduino/hardware/megaavr/1.8.8/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 "/home/duskohu/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/duskohu/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : xplainedmini_updi
         Overriding Baud Rate          : 115200
avrdude: usbdev_open(): Found mEDBG CMSIS-DAP, serno: MICROUPDIPROGRAMMERX
avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy
avrdude: max packet size expected 512, but found 64 due to EP 0x81's wMaxPacketSize
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
         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 : JTAGICE3_UPDI
         Description     : Atmel AVR XplainedMini in UPDI mode
         ICE hardware version: 0
         ICE firmware version: 1.19 (rel. 57)
         Serial number   : MICROUPDIPROGRAMMERX
         Vtarget         : 5.00 V
         JTAG clock megaAVR/program: 0 kHz
         JTAG clock megaAVR/debug:   0 kHz
         JTAG clock Xmega: 0 kHz
         PDI clock Xmega : 0 kHz

avrdude: bad response to AVR sign-on command: 0xa0
avrdude: retrying with external reset applied
avrdude: bad response to AVR sign-on command: 0xa0
avrdude: retrying with external reset applied
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Have you ever got your microUPDI working on MacOS Big Sur?

If so, how? For me, avrdude will not communicate with the microUPDI (or any other mEDBG / nEDBG devices) on Big Sur. Most often get something like usbdev_open(): no usable interface found or another usbdev_open() error, and I've not found any way to get it to work.

Firmware upload fails

Hi, I'm using the arduino IDE 1.8.13 and can't get the firmware to upload.
My arduino pro micro has a reset pin and I tried grounding that as the upload started, but it has no effect. Anything else I can try please?

Edit:
Part of the problem is that when I connect the pro micro, although the board shows a continuous red led, device manager does not show a port for it. So I think the upload is using COM1 which just fails.
end edit

error msg from IDE:

Arduino: 1.8.13 (Windows 10), Board: "microUPDI Firmware Uploader"

Sketch uses 0 bytes (0%) of program storage space. Maximum is 28672 bytes.

Global variables use 0 bytes (0%) of dynamic memory, leaving 2560 bytes for local variables. Maximum is 2560 bytes.

Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.