⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 How to programming in ARM processor for SWI, source code example.
💻 TXT
字号:
SWI Example
===========

This directory illustrates an example SWI handler as a standalone project.

The files provided are:

main.c    - contains the main() function, which installs the SWI vector in the 
            exception table, then calls some SWIs (0, 1, 2 & 3) via __swi()

ahandle.s - is the top-level SWI handler, written in assembler.  It is entered 
            via the SWI vector of the execption table.  Both ARM & Thumb SWIs 
            are identified and passed to chandle.c for processing.

chandle.c - is a second-level SWI handler, called from ahandle.s.  
            SWIs 0, 1, 2 & 3 execute some simple arithmetic.

swi.h     - contains the definitions of __swi(0), __swi(1), __swi(2) & __swi(3).
            __swi(3) has an associated __value_in_regs structure for returning 
            values in registers.


To build this example, use the CodeWarrior project file supplied (swi.mcp), 
alternatively, to build from the command-line, use:

armasm -g ahandle.s
armcc -c -g -O1 main.c
armcc -c -g -O1 chandle.c
armlink ahandle.o main.o chandle.o -o swi.axf

This produces an ELF executable file (swi.axf) which can be loaded into an 
ARM debugger.

For an overview of the principles of a SWI handler, see the ADS Developer Guide, 
chapter 5.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -