I am about to start a project using the Atmega328 out of the Arduino UNO board, for which I am loading the Bootloader, however I have not been able to configure the microcontroller to use a 20MHz crystal.
I researched a bit and saw that some people add some lines to the Makefile document that is inside the Botloaders folders in Arduino
The easiest way to do this is by using the MiniCore hardware package, which has a board definition for ATmega328P @ 20 MHz and precompiled bootloader for that clock speed:
i did it, but didn't work, and i red more in the link of mini core and i replaced the microcontroller inside on my board of Arduino UNO, because the instructions sayed, and i tried to change for a crystal inside of the board in this case is of 16MHz, but whe i charged the bootloader the progrma say:
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/gerardo/.arduino15/packages/MiniCore/hardware/avr/2.0.2/avrdude.conf"
User configuration file is "/home/gerardo/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.
Error while burning bootloader.