Software you need to install
1: AVRStudio4.13
2: WinAVR-20080610-install
Step 1: Project-> New Project prompt dialog box below. In Project Type, select avr gcc and enter the Name of the Project to be created in Project Name, select the directory where the project is located in Location. If you are not clear about the directory, click Help to read the Help file.
Click Next to go to the Next step.
When creating the project file directory, you must note that it must be in the English directory; otherwise, it will appear during compilation.
Step 2: select the debugging platform and chip model.
Debug Platform: select the debugging Platform. Select the debugging tool carefully. In this article, select AVR Simulator. Among them, JTAGICE and JTAGMKII are common development tools, ICE40 and ICE50 are rarely used in China because they are expensive. Click Finish to complete the project creation.
Step 3: write code
Step 4: Configure AVRGCC, compile and generate the MakeFile file
Project à Configuration Option
Select the chip you are using in the Device option, enter the OSC Frequency in the Frequency model selection (to provide a benchmark for the Delay function), and select the Optimization level in the Optimization model selection. Select the Create Hex File option to generate the target File. If you use WinAVR, you need to use Mfile to configure the MAKEFILE file. AVRStudio uses this dialog box to generate the MakeFile file.
If you Use a previously compiled MakeFile, you can select the "Use External Makefile" option and select the path of the MakeFile.
Step 5: Compile and debug the SDK.