This tutorial provides step-by-step instructions on how to integrate an external programmer into Atmel Studio 7.0. By setting up the external programmer, you will be able to flash the AVR board directly from Atmel Studio without the need to switch to the āUniversal_GUI.exeā application. This streamlined workflow enhances the debugging and troubleshooting process, resulting in increased efficiency.
0. Download avrdude
On the school computer, avrdude is installed at
V:\avrdude\avrdude.exe
For your personal Windows PC, you can download avrdude here:
http://web.engr.oregonstate.edu/~jinyo/ece375/sw/avrdude.zip
Unzip the file and save to your preferred directory, e.g.
C:\Program Files (x86)\avrdude\avrdude.exe
1. Enable āAdvanced Modeā
To configure an external programmer, you must ensure that Atmel Studio is in the āAdvancedā profile mode. You can access this option by navigating to the Tools menu and selecting the āSelect Profileā option.
1. Enable āAdvanced Modeā
To configure an external programmer in Atmel Studio, you need to switch the software to the āAdvancedā profile. This can be done by accessing the Tools menu and selecting the āSelect Profileā option. Once you click on it, a menu will appear where you can choose the āAdvancedā profile.
Select āAdvancedā and click āApplyā.
2. Add āExternal Toolsā
Go to > Tools > External Tools.
Add new external tool
Title:
USBASP (or the name of your choice)
Commands:
C:\Program Files (x86)\avrdude\avrdude.exe (or the path of avrdude.exe)
Arguments:
-c usbasp -p atmega128 -B12 -U flash:w:$(BinDir)\$(TargetName).hex:i
Check š¹ āUse Output windowā, Uncheck ā āTreat output as Unicodeā and ā āPrompt for argumentsā.
Then, click āApplyā to save the setting.
3. Setup keyboard shortcut (Optional)
This section is optional. You can skip it if you feel more clicky using the mice or touchpad.
Go to > Tools > Options
Here are the paraphrased instructions:
1. Choose āKeyboardā and input āExternalCommand1ā. Then choose āTools.ExternalCommand1ā.
2. Specify your desired shortcut keys and select āAssignā.
3. To save the configuration, click āOkā.
You can also assign shortcuts for other y frequent used command like āSet as Entry Fileā or
āBuild Solutionā, e.g. my choices of shortcut are:
Set as Entry File: Alt+X (Hint: X as check mark)
Build Solution: Alt+C (Hint: C as compile)
ExternalCommand1: Alt+V (Hint: well, itās next to X and Cā¦)
4. Flash hex file with external programmer
Hereās a paraphrased version:
To begin, ensure that your project is built. In the Solution Explorer, the specific folder or file that is highlighted is irrelevant as long as you are in the correct project.
Go to > Tool > USBASP, or use the shortcut of your choice.
5. DONE!
Hereās a paraphrased version:
If the message below is displayed, it indicates that the hex file has been successfully flashed onto the AVR board. Any warning messages appearing in the output window can be disregarded.