Program the ATmega32U4 without boot loader via USB


Recommended Posts


I'm working on a project to get a C64 emulator running on the Papilio DUO. I have a working setup using uno2iec program to emulate the disk drive, but this still requires a laptop connected to the board.

I found a project named sd2iec, that uses the SD card to load disk images of, but the compiled program is too big to fit on the ATMega32U4 together with a bootloader. So I need a way to program the AVR directly.
I Googled for documentation on how to use the bootloader program routine to upload my software as well, but couldn't find any.

Is there a way to program the AVR on the Papilio DUO without bootloader via USB using for example avrdude?

Kind regards, Paul

Link to comment
Share on other sites

I found the answer myself :

In the IDE : File -> Upload using programmer

Or use the Papilio_DUO_ArduinoISP.bit to turn the FPGA into a programmer, and interface with avrdude

# papilio-prog -f <path to bit file>/Papilio_DUO_ArduinoISP.bit 
#  avrdude -C <path to avrdude config>/avrdude.conf -v -patmega32u4 -cstk500v1 -P/dev/ttyUSB1 -b57600 <Other arguments>

WARNING: please make sure what you are doing, if you change the fuse bits to the wrong settings, it can make your atmega32u4 totally useless, and the chip will have to be replaced.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.