Creating project files based on AVR Studio5.1

Publisher:科技驿站Latest update time:2020-01-07 Source: eefocusKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

After opening the software, find New Project (left click)

The following dialog box appears

 

Select according to the mark in the figure, change the name and path by yourself, and click OK after the settings are completed. Enter the MCU selection dialog box and find the MCU model you are using.

 

Click OK

This completes the creation of a simple project.

As shown in the figure, you can write your own code in the AVR_IIC.c ​​source file.

When you open the path you just specified, there will be the following files:

 

When our project is relatively large, we usually need to perform modular programming, so there will be multiple source files and header files. If these files are piled under the above files, the entire project will be very messy.


Here is a simple way to create a modular project:

When we create the project according to the above method, the has the following files. We delete the .c file that was created after the project was created.

 

Create two more folders as shown below. The method is to go to AVRGCC1->right click->add->new folder.

 

At this time, two new folders will appear in the folder directory.

 

We can directly put the existing source files into the source folder, put the existing header files into the include folder, and then right-click in the corresponding folder under to add the files just put into the folder.


You can also right-click the corresponding file to create a new file.

The final result will look like this:

 

 

 

Next we need to associate the header file path

Click the button marked below

 

A new interface will open, as shown below. Add the header file path we just created as shown in the yellow mark in the figure, and the association can be completed after saving.

 

Next, we click the Compile button to compile the project.

The .HEX file generated after compilation (in the Debug folder) is the file we want to download to the microcontroller.

Keywords:AVR Reference address:Creating project files based on AVR Studio5.1

Previous article:Building an AVR MCU C language development environment under Linux
Next article:avrstudio5 relay

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号