Programming Arduino, Fuse Bits, Lock Bits, Avrdude

Programming Arduino, Fuse Bits, Lock Bits, Avrdude
# https://www.nongnu.org/avrdude/user-manual/avrdude_4.html

# Reading from FLASH
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Uflash:r:$1/main.hex:i

# Record in FLASH
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Uflash:w:$1/main.hex:i

# Read the specified device memory and the specified file and perform a verify operation
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Uflash:v:$1/main.hex:i
 
 
 
# Read from EEPROM
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ueeprom:r:$1/main.eep.hex

# Record in EEPROM
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ueeprom:w:$1/main.eep.hex

# Verify EEPROM with eep file
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ueeprom:v:$1/main.eep.hex
 
 

# Reading fusion bits
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Uhfuse:r:$1/hfuse.txt:b -Ulfuse:r:$1/lfuse.txt:b -Uefuse:r:$1/efuse.txt:b

# Read lock bits
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ulock:r:$1/lock.txt:b



# Installing fuse bits
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ulfuse:w:0xF7:m -Uhfuse:w:0xDE:m -Uefuse:w:0x07:m

# Setting lock bits
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ulock:w:0x3F:m


# Reading the calibration byte of the RC oscillator
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Ucalibration:r:cbyte.txt:h

# Reading signature bytes
avrdude -carduino -pm328p -P/dev/cu.usbmodem1411 -b115200 -D -v -Usignature:r:$1/sbyte.txt:h
  1. Arduino UNO