Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

USB Mass Storage bootloader for Arduino UNO R3 with ATmega16U2

NotificationsYou must be signed in to change notification settings

mmoskal/uf2-uno

Repository files navigation

This projects allows flashing of Arduino UNO R3 via USB Mass Storage(i.e., file copy or drag and drop without needed to install any software).

It implements it in firmware of the ATmega16u2 - the USB interface chipon the Arduino UNO. This firmware in turn talks to theoptiboot bootloaderrunning on the main ATmega328p chip.

The mass storage interface accepts files inUF2format. The new format (i.e., not.hex and not.bin) is necessary to implementa reliable mass storage flashing in the 512 bytes of RAM of the ATmega. The UF2 repositorycontains some conversion tools, and recent PXT versions havepxt hex2uf2 command.

There's now ablog post up about how itworks and how it came about.

Building

$ git clone https://github.com/abcminiuser/lufa lufa$ cd lufa/Projects$ git clone https://github.com/mmoskal/uf2-uno$ cd uf2-uno$ make

I'm using LUFA170418 right now. You need to haveavr-gcc etc inPATH.I'm using 4.9.

Installing

Check outbinary releases.

  • place the ATmega in DFU update mode by shorting two pins sticking out closest to the USB plug
  • under macOS or Linux installdfu-programer and runmake burn
  • under Windows useAtmel FLIP

Arduino providesmore detailed instructions.

Note: this bootloader is not currently compatible with Arduino IDE. If you wantthat, go back to the original bootloader (also following the instructions from the Arduinopage above).

HID

The firmware exposes a custom raw HID interface, implementing a small subset ofHF2 protocol, in particularthe serial-forwarding parts. The serial can be accessed using the C-baseduf2tool or usingPXT command line.

On the Arduino side you have to useSerial.init(115200); insetup(),and not any other baud rate.

License

MIT

This code is based on the Mass Storage example fromLUFA,has a few lines and the RingBuffer from theArduino USBSERIAL firmware,and lifts some code from theSAMD21 UF2 Bootloader.All these are MIT licensed.

About

USB Mass Storage bootloader for Arduino UNO R3 with ATmega16U2

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp