This is only for linux users.
Please use the following commands to install the avr-tools and gcc.
sudo apt install gcc gdb avr-libc avrdude binutils-avr gcc-avr srecord gdb-avr simulavr make
avr-gcc -g -Os -S -mmcu=atmega328p -c main.c
avr-gcc -g -mmcu=atmega328p -o main.elf main.o
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avrdude -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200 -u -U flash:w:main.hex
avrdude -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200 -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0x05:m