From here on is the real code entry!
The AREA directive is used to define a code segment or a data segment. The ARM assembler is designed in a segmented manner. An
ARM source program requires at least one code segment. A large program can contain as many code segments and data segments as desired.
CODE
READONLY
;================================================== =========
;After the board is powered on and reset, the program starts to execute from 0x0. After the hardware is powered on and reset, the program starts to execute from here and jumps to the ResetHandler.
;DCD is used to allocate a single word memory chip and initialize it with the following pseudo instruction. The allocated bytes are determined by the number of expr
The only entry point for an image file also requires setting relevant options in the linker.
__ENTRY
ResetEntry
;ASSERT assertion error pseudo instruction, here indicates whether ENDIAN_CHANGE has been defined
; If ENTRY_BUS_WIDTH is not defined, an error will be reported
The interrupt vector table is generally located at the beginning of the startup code. It is between the user program and the startup code and between the startup code
It is a link between the various parts of the system. It consists of jump functions one by one, and it is like an ordinary jump function, except that
However, the process of scattering involves hardware mechanisms. When an exception occurs in the system, the ARM processor will force
The PC pointer points to the address of the corresponding exception jump function in the interrupt vector table, and then the program will jump to the corresponding
The service program is interrupted to execute.
b
b
b
b
b
b
b
;@0x20 "@" Current value of the storage location counter
b
158 ;================================================ ===============
159; The following is a program to change the big and small endianness. Here we use the method of directly defining the machine code. As for why we do this
160; You have to ask Samsung. Anyway, this code will not be executed in our program, so don't worry about it.
161 ;================================================ ===============
ChangeBigEndian
;@0x24
DCD is used to allocate a word memory unit and initialize it with expr in the pseudo instruction. The memory allocated by the DCD pseudo instruction
needs to be word aligned and can generally be used to define data tables or other constants. & is synonymous with DCD.
; Enter power-down mode function
; 1. SDRAM must be in self-refresh mode.
; 2. All interrupts must be masked for SDRAM/DRAM self-refresh.
; 3. LCD off for SDRAM/DRAM self-refresh.
; 4. The I-cache may need to be enabled.
; 5. The location of the following code may have not to be changed.
; As mentioned above, the HANDLER macro is used here to establish the connection between Hander*** and Handle***
HandlerFIQ
HandlerIRQ
HandlerUndef HANDLER HandleUndef
HandlerSWI
HandlerDabort
HandlerPabort HANDLER HandlePabort
Previous article:ARM (920T) exception and interrupt mapping process
Next article:The difference between Cortex-A8 and ARM11
Recommended ReadingLatest update time:2024-11-16 03:27
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- On May 5th, celebrate the Dragon Boat Festival, row dragon boats and play drums
- How 5G will impact the Internet of Things
- Powering Alternative Transportation Using Industrial Battery Packs
- Verilog implements instrument display regulator
- EEWORLD University ---- Power Stage: High Performance Parameters and Selection of MOSFET and Gate Driver
- Help: The solenoid valve coil controlled by DC 24V is open
- 【GD32E231 DIY】Temperature and humidity collection
- Urgent help, AD17 via setting problem?
- Capacitor charging time, MOS gate drive, TL431 reference, op amp followed by ADC sampling, composite tube and complementary push-pull advantages and disadvantages
- Serial communication can also communicate without sharing the same ground. What is the reason?