Skip to content

Instantly share code, notes, and snippets.

@ka2hiro
Last active June 5, 2024 11:49
Show Gist options
  • Save ka2hiro/34a63f2d92bae1e602c732e05ebe1bdc to your computer and use it in GitHub Desktop.
Save ka2hiro/34a63f2d92bae1e602c732e05ebe1bdc to your computer and use it in GitHub Desktop.
Chidori の ブートローダの書き込み方

Chidori のブートローダを書き込む

Chidori のブートローダ chidori_bootloader.zip を解凍し、 main.hex を avrdude で書き込みます。 (書き込み用デバイスがUSBASPの場合)

> avrdude -c usbasp -p atmega328p -U flash:w:main.hex:i

新品の atmega328p にブートローダを書き込む場合は、フューズビットを先に書き込みます。 (書き込み用デバイスがUSBASPの場合)

> avrdude -c usbasp -p atmega328p -U lfuse:w:0xff:m -U hfuse:w:0xd0:m -U efuse:w:0xff:m

上記以外に USBaspLoader を checkout してから、

> make
> make fuse
> make flash

でも ok です。

Writing Chidori's Bootloader

Unzip chidori_bootloder.zip and write main.hex with avrdude. (Below is the command when using USBASP as the device for writing)

> avrdude -c usbasp -p atmega328p -U flash:w:main.hex:i

When writing the bootloader to a new atmega328p, write the fuse bits first. (Below is the command when using USBASP as the device for writing)

> avrdude -c usbasp -p atmega328p -U lfuse:w:0xff:m -U hfuse:w:0xd0:m -U efuse:w:0xff:m

Alternatively, you can clone USBaspLoader repository and then run

> make
> make fuse
> make flash

is also ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment