The easiest way to ensure everything is set correctly is to use the Arduino IDE to burn the bootloader.