-
Notifications
You must be signed in to change notification settings - Fork 1
/
avrdude_programming_and_fuse setting_commands.txt
51 lines (38 loc) · 3.18 KB
/
avrdude_programming_and_fuse setting_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
HEX CODE UPDATES MAY BE PERFORMED WITH EITHER THE NORMAL ARDUINO USB/SERIAL CONNECTION OR VIA AN ISP PROGRAMMER.
ONLY OPERATING CODE MAY BE CHANGED USING USB/SERIAL PROGRAMMING. THE FUSE SETTINGS AND BOOTLOADER AND OPERATING CODE MAY ALL BE CHANGED WITH ISP PROGRAMMING. THE ISP PROGRAMMER IS USUALLY ANOTHER ARDUINO RUNNING ISP CODE AND CONNECTED TO THE TARGET ARDUINO WITH 6 WIRES.
CHANGING FUSES AND UPLOADING CODE WITH THE APPENDED OPTIBOOT BOOTLOADER MAY ONLY BE DONE WITH AN ISP PROGRAMMER!!!!
CODE WITHOUT THE BOOTLOADER MAY BE UPLOADED USING A SERIAL BOARD AND AVRDUDE.
PROGRAMMING VIA AN ISP PROGRAMMER ALWAYS ERASES THE ENTIRE CHIP AND BOOTLOADER!!!!!
IF YOU WISH TO RESTORE THE BOOTLOADER ON AN ARDUINO SO THAT SERIAL PORT PROGRAMMING MAY ALSO BE USED, AFTER ISP PROGRAMMING,
YOU MUST LOAD THE CODE VERSION THAT CONTAINS THE BOOTLOADER!!!
IF YOU SET THE FUSES AND BURN THE NON-BOOTLOADER CODE, YOU WILL ONLY BE ABLE TO PROGRAM THE ARDUINO IN THE FUTURE
USING THE ISP. NORMAL SERIAL UPLOADING FROM THE ARDUINO IDE OR AVRDUDE WILL NO LONGER WORK UNTIL YOU RESTORE
THE BOOTLOADER BY USING THE ISP AND PROGRAMMING THE BOOTLOADER FUSE SETTINGS (BELOW) AND CODE WITH THE APPENDED
BOOTLOADER TO RESTORE THE ARDUINO.
USE ONLY THE NORMAL USB/SERIAL PROGRAMMING OF THE ARDUINO UNLESS YOU KNOW WHAT YOU ARE DOING!
"No bootloader" hex code avrdude programming and fuse settings - Using USB serial port or USB > serial board
============================================================================================================
No fuse settings needed or possible with USB/serial programming.
avrdude -v -c arduino -P com1 -b 115200 -p atmega328p -U flash:w:toneplant328_v1_7.hex
"No bootloader" code avrdude programming and fuse settings - Using ISP Programmer
=================================================================================
Program the fuses first. The Arduino may not function normally after fuse settings until code is uploaded.
Fuse Low Byte: 0xFF
Fuse High Byte: 0xDF
Extended Fuse Byte: 0x02
Lock Bit Byte: 0xFF
avrdude -v -c arduino -P com1 -b 115200 -p atmega328p -U lfuse:w:0xFF:m -U hfuse:w:0xDF:m -U efuse:w:0x02:m -U lock:w:0x3F:m
avrdude -v -c arduino -P com1 -b 115200 -p atmega328p -U flash:w:toneplant328_v1_7.hex
Optiboot bootloader avrdude programming and fuse settings
(Optiboot boot loader starts program instantly on powerup, but manual reset starts bootloader)
(Optiboot only generated when program compiled in the IDE as "Arduino/Genuino Uno" instead of "Pro Mini")
After replacing the bootloader with Optiboot, the "Arduino/Genuino Uno" board may need to be chosen in the IDE for
successful programming.
==============================================================================================
Program the fuses first. The Arduino may not function normally after fuse settings until code is uploaded.
Fuse Low Byte: 0xFF
Fuse High Byte: 0xDA
Extended Fuse Byte: 0x05
Lock Bit Byte: 0x3F
avrdude -v -p atmega328p -c arduino -P COM1 -b 115200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude -v -c arduino -P com1 -b 115200 -p atmega328p -U flash:w:toneplant328_v1_7_with_bootloader.hex