IAR extended keywords

Publisher:GoldenSerenityLatest update time:2016-12-29 Source: eefocusKeywords:IAR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Extended keywords: used to control data and pointers


__eeprom is used for EEPROM storage space, controls data storage, controls pointer type and storage
__tinyflash, __flash, __farflash, __hugeflash are used for flash storage space, controls data storage, controls pointer type and storage
__ext_io, __io are used for I/O storage space, controls data storage, controls pointer type and storage
__regvar places a variable in a working register

 

2. Function extension keywords:


__nearfunc __farfunc is used to control data storage. This group of keywords must be specified when declaring and defining
the function. __interrupt. Keywords control the type of the function. This group of keywords must be specified when declaring and defining the function.
__root. Keywords only control the defined function.

 

3. Other special keywords:


@ is used to locate the absolute address of the variable. You can also use the #pragma location command
#pragma vector to provide the entry address of the interrupt function.
__root ensures that unused functions or variables can also be included in the target code
__no_init prohibits initialization of variables when the system starts. 
asm, __asm ​​insert assembly code

================================================== ==================

 

The __root keyword ensures that unused functions or variables can also be included in the target code.
The data defined in the __flash space will automatically generate code and embed it into the flash code when the program is compiled. For data that is not used by the program but requires compilation (for example, you can embed your version number, time, etc. in the code), the keyword __root must be added to restrict it.
Example:


#include   
__root __flash unsigned char p @ 0x10 =0x56;  
void main(void)  
{  
  
}


Even if the program does not use the P variable, the compilation will generate this code.  
:020000020000FC  
:1000000016C018951895189518951895189518955F  
:10001000569518951895189518951895189518953A  
:10002000189518951895089500008895FECF0FE94A  
:100030000DBF00E00EBFC0E8D0E003D0F4DFF4DF76  
:06004000F3CF01E008957A  
:0400000300000000F9  
:00000001FF



Keywords:IAR Reference address:IAR extended keywords

Previous article:IAR RAM Operation
Next article:IAR Data Types

Recommended ReadingLatest update time:2024-11-16 13:49

IAR extended keywords
1. Extended keywords: used to control data and pointers __eeprom is used for EEPROM storage space, controls data storage, controls pointer type and storage __tinyflash, __flash, __farflash, __hugeflash are used for flash storage space, controls data storage, controls pointer type and storage __ext_io, __io are used f
[Microcontroller]
IAR development msp430 project creation, setup and downloading
The following is a step-by-step diagram to illustrate how to create, set up and download an IAR project for developing an msp430 microcontroller. Step 1: Step 2 Step 3 Step 4 Step 5 Step 6 Step 7: Step 8 Step 9 Step 10 Step 11    
[Microcontroller]
IAR development msp430 project creation, setup and downloading
Configuration and reasons of linker file of atmega128 bootloader program under IAR-AVR
Step 1: The on-chip flash partitions of atmega128 are described on page 275 of the atmega128 datasheet. Correspondingly, on page 284, there are specific settings for the size of the application area and the boot area. Note: Byte address = word address * 2 Here, the first address of the BOOT area, $F000 = 0x1E000
[Microcontroller]
Configuration and reasons of linker file of atmega128 bootloader program under IAR-AVR
stm32 lights up the LED in the first program of IAR
//Before using, you need to create a project template. You can refer to my article on creating a stm32 project template. 1: The project file is added to our LED driver, which is mainly composed of led.h and led.c. Then write your own main based on this 2: Writing led.c #include "led.h" //This is the header file led.h 
[Microcontroller]
stm8 Note 2-Timer 3 Update Interrupt + PWM Output (IDE is IAR)
1: IAR compiler interrupt function description Let's talk about it under IAR. Under IAR, you must add the iostm8s105s6.h file. At the end of the file, there is the following content: /*-------------------------------------------------------------------------  * Interrupt vector numbers  *---------------------------
[Microcontroller]
stm8 Note 2-Timer 3 Update Interrupt + PWM Output (IDE is IAR)
Use of IAR STM8 project interrupts
IAR project creation is relatively simple. Just create a workspace first and then save it. You cannot debug without saving it. Put the official INC in the project directory and include the absolute path of this file in the C/C++ editor (the simplest way). Just add the c file in. Its interrupt is very simple. You just n
[Microcontroller]
AVR IAR EEPROM read and write
Keywords and usage in IAR:      __eeprom is used for EEPROM storage space, controls data storage, controls pointer type and storage      __tinyflash, __flash, __farflash, __hugeflash are used for flash storage space to control data storage      __ext_io, __io are used for I/O storage space, controls data storage, co
[Microcontroller]
Recommended Content
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号