Option for target 'target1'" to display the dialog box for project settings." />

Keil project option settings

Publisher:和谐的24号Latest update time:2017-11-27 Source: eefocusKeywords:keil Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

First, click Target 1 in the Project window on the left, and then use the menu "Project->Option for target 'target1'" to display the dialog box for project settings. This dialog box is very complicated, with a total of 8 pages. It is not easy to understand all of them. Fortunately, the default values ​​for most of the settings will be fine.

1. target option

 

Figure 5

In the Target page of the setup dialog box, as shown in Figure 5, the value after Xtal is the crystal frequency value. The default value is the highest available frequency value of the selected target CPU, which is 24M for the AT89C51 we selected. This value has nothing to do with the final target code generated, and is only used to display the program execution time during software simulation debugging. Correctly setting this value can make the displayed time consistent with the actual time used. Generally, it is set to the same as the crystal frequency used by your hardware. If you don’t need to know the program execution time, you can also not set it. Here it is set to 12. 


Memory Model is used to set RAM usage. There are three options: Small means all variables are in the internal RAM of the microcontroller; Compact means one page of external expansion RAM can be used, and Large means all external expansion RAM can be used.

Code Model is used to set the use of ROM space. There are also three options: Small mode, which uses less than 2K of program space; Compact mode, the code size of a single function cannot exceed 2K, and the entire program can use 64K of program space; Large mode, the entire 64K space is available.


The Operating item is the operating system selection. Keil provides two operating systems: Rtx tiny and Rtx full. The operating system is another big topic. Usually we do not use any operating system, that is, use the default value of this item: None (do not use any operating system)


Use on-chip ROM option to confirm whether to use only on-chip ROM (Note: selecting this option does not affect the amount of target code generated in the end);


Off Chip Code memory is used to determine the address range of the system expansion ROM, and Off Chip xData memory group is used to determine the address range of the system expansion RAM. These options must be determined according to the hardware used. Since this example is a single-chip application and no expansion is performed, no reselection is performed and the default values ​​are set.


2. Output options

Figure 6

The OutPut page in the Settings dialog box, as shown in Figure 6, also has multiple options.

Among them, Create Hex file is used to generate executable code files (HEX format files that can be written into the microcontroller chip by a programmer, and the file extension is .HEX). By default, this item is not selected. If you want to write a chip for hardware experiments, you must select this item. This is something that beginners can easily overlook, so please pay special attention to it.

 

Selecting Debug information will generate debugging information, which is used for debugging. If you need to debug the program, you should select this option.


Browse information generates browsing information, which can be viewed using the menu view->Browse. The default value is used here.


The button "Select Folder for objects" is used to select the folder where the final target file is located. By default, it is in the same folder as the project file.


Name of Executable is used to specify the name of the final generated target file. By default, it is the same as the project name. These two items generally do not need to be changed. 


3. Others

The other pages in the Project Settings dialog box are related to the usage of C51 compile options, A51 assembly options, BL51 connector connection options, etc. The default values ​​are taken here without any modification. The following is a brief introduction to the commonly used options in some related pages.


The Listing tab is used to adjust the generated list file options. After assembly or compilation, a (*.lst) list file will be generated. After linking, a (*.m51) list file will also be generated. This page is used to make detailed adjustments to the content and format of the list file. The more commonly used option is the "Assamble Code" item under "C Compile Listing". Selecting this item can generate the assembly code corresponding to the C language source program in the list file. 


The C51 tab is used to control the compilation process of Keil's C51 compiler. The most commonly used one is the "Code Optimization" group, as shown in Figure 7. In this group, Level is the optimization level. When C51 compiles the source program, it can optimize the code up to 9 levels. The default level is 8, which generally does not need to be modified. If there are some problems in the compilation, you can try to lower the optimization level. Emphasis is to select the compilation priority mode. The first item is code quantity optimization (the final generated code quantity is small); the second item is speed priority (the final generated code speed is fast); the third item is default. The default is speed priority, which can be changed as needed. 

Figure 7


Keywords:keil Reference address:Keil project option settings

Previous article:The difference between Flash E2prom Ram of MCU
Next article:In-System Programming (ISP) and In-Application Programming (IAP)

Recommended ReadingLatest update time:2024-11-16 19:40

Detailed introduction to the use of Keil C51 microcontroller variables
introduction The 8051 core microcontroller is a general-purpose microcontroller and occupies a large market share in China. Keil has been the most successful in using C language for research on 51-core microcontrollers. Due to the particularity of the storage structure of the 51-core microcontroller, the use of variab
[Microcontroller]
Detailed introduction to the use of Keil C51 microcontroller variables
Keil C51 User Tutorial---Detailed Explanation of Software Usage (Part 2)
Section 1 Keil C51 Compiler Control Instructions The control instructions of the C51 compiler are divided into three categories: source file control class, target file control class and list control class. 1. Source file control class     NOEXTEND: C51 source files are not allowed to use ANSI C extension functions.
[Microcontroller]
Keil c51 pointer variable
The microcontroller C language supports general pointers (Generic Pointer) and memory pointers (Memory_Specific Pointer). 1. 1. General pointers The declaration and use of general pointers are the same as standard C, but the storage type of the pointer can also be specified, for example: long * state; is a point
[Microcontroller]
Keil C51's Seventeenth Keyword Extension to C Language: sbit
sbit is used to define a bit of a special function register. sbit name = sfr-name ^ bit-position; sbit name = sfr-address ^ bit-position; sbit name = sbit-address;     name    The name of a bit in a special function register     sfr-name  Defined special function register names     bit-position  Special Function
[Microcontroller]
How to make KEIL (MDK) compatible with both STM32 and 51 series microcontrollers
keil4 method one:      First install KEIL4, then install KEIL3 to the same directory as MDK, skip the one that has been installed. Then open KEIL4 as an administrator, use KEIL4's registration machine to register ARM and C51. Cracking results Method Two: The following method can make keilMDK co
[Microcontroller]
About data, idata, xdata, pdata, code in keil
      In terms of data storage type, the 8051 series has on-chip and off-chip program memory, on-chip and off-chip data memory. The on-chip program memory is also divided into direct addressing area and indirect addressing type, corresponding to code, data, xdata, idata and pdata type set according to the characteristi
[Microcontroller]
About embedding assembly in KEIL C51 and calling between C51 and A51
An example of how to call an assembly function in KEIL C51 (v6.21) There are many posts about how to call assembly from C51, but generally only the key points are mentioned, and few of them describe the whole process in detail, which is not enough for beginners. Here, the author describes this process thr
[Microcontroller]
Summary of Common Problems in KEIL C Language
1. Semicolon punctuation problem In KIEL, there is a problem in the loop, the result is always 0x10, the reason is that there is an extra semicolon after if. if(flag_display_remote);//1=REMOTE,0=LOCALE) { flag_display_remote=0; Usart1_SendChar(flag_display_remote+0x10);         } 2. Repeated citation probl
[Microcontroller]
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号