Sorry it took me so long to reply but I wasn't able to replicate the process so I don't tell you things from memory.
So, to burn the Arduino bootloader on a blank ATmega (or any other Atmel micro) using AVR Studio 4, you need to have a few things handy:
- a hardware programmer (AVR ISP, AVR ISP mkII, etc.)
- the microcontroller installed on a board or on a breadboard (make sure you have a crystal and caps, reset pull up resistor, 5V regulated power and of course, the ISP 6 pin header)
- AVR Studio 4 installed on your computer
- Arduino-0017 (or latest) installed on your computer..
First, you need to connect the programmer to the board, then to the USB port on your computer. Start your AVR Studio, click on Cancel when it asks you to open or create a new project, then click on the CON button (or navigate to Tools -> Program AVR -> Connect) and the "Select AVR" window will open. Select your programmer from the "Platform" list on the left (AVRISP or AVRISP mkII) and the COM port on the right, then click Connect button.
A new window will open and you can see at the bottom the status for your programmer. If all is OK, you may proceed further, if not, there is something wrong with your programmer. I never had a problem with my programmer, so you need to find info on how to troubleshoot it elsewhere. If the programmer is fine, you need to select the Main tab and select your microcontroler from the list and click on Read Signature button. (Make sure you have the board powered before you do this, or you will get an Error message.) If the connection is OK and your microcontroller is fine, you will see the signature right below it: 0x1E, 0x95, 0x0F for ATmega328P.
If your micro is new, you need to set up the fuse bits to match the crystal frequency. Go to Fuses tab and uncheck the CKDIV8 button, and see that you have checked only the BOOTRST button. Do not touch the SPIEN and BODLEVEL and the BOOTSZ should be 512 words. Click on the SUT_CKSEL list and select the last option at the bottom of the list. Once you have that, click on the Program button.
Now it's time to burn the bootloader. Go to the Program tab and in the Flash section, browse for the Arduino-0017\hardware\bootloaders\atmega\ folder and choose the hex file that matches your microcontroller, ex. ATmegaBOOT_168_atmega328.hex for the ATmega328P micro. Then click on the Program button in the Flash section. Your bootloader should be now burned.
If you want to protect your bootloader from an accidental erase, go to the Lock bits tab and select the last one top down (BLB1) to be LPM and SPM prohibited in Boot section, then click on the Program button. Don't worry, if you make a mistake, you can restore the lock bits to the default state with a Chip Erase from the Main tab.
That's it, now you should have a perfectly functional Arduino microcontroller.