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
Previous article:IAR RAM Operation
Next article:IAR Data Types
Recommended ReadingLatest update time:2024-11-16 13:49
- Popular Resources
- Popular amplifiers
- IAR fully supports the new industrial-grade PX5 real-time operating system
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- 【DigiKey Creative Contest】Home Rapid Physical Examination Machine Code
- Analysis and implementation of CC2530 microcontroller\'s precise delay function
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Power supply topology
- Application of circular queue
- 關於C2000 使用SCI在線升級做法求解
- 【GD32450I-EVAL】Preliminary Study on TLI-RGB Screen Driver
- An easy-to-understand tutorial on the msp430 microcontroller
- [TI recommended course] #PFC power supply design and inductor design calculation#
- [Distributed temperature and humidity acquisition system] + STM32H745I-LWIP program
- Summary: TI LAUNCHXL-CC2650 evaluation report
- [LAUNCHXL-CC2650] Run the SDK built-in routine
- What is GPIO?