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

📄 readme.txt

📁 界面和通讯交互式工作的例程
💻 TXT
字号:
interwork
=========

This directory contains two simple projects to illustrate ARM/Thumb interworking 
with C code.  CodeWarrior project files and script (batch) files are provided.

For details, see the Developer Guide, Chapter 3, "Interworking ARM and Thumb".

The two projects show:
1. An ARM main() calling a Thumb subroutine
2. A Thumb main() calling an ARM subroutine

In both cases, the linker pulls in the appropriate C library, and adds interworking 
veneers.  The added veneers are shown with the linker '-info veneers' option.


1. ARM (main) code calling a Thumb subroutine

The two files in this project are armmain.c and thumbsub.c.
Use the CodeWarrior project file ARM_to_Thumb.mcp to build the project.
Alternatively execute the command-line script armtothumb.bat.

armcc -c -g -O1 -apcs /interwork armmain.c
tcc   -c -g -O1 -apcs /interwork thumbsub.c
armlink armmain.o thumbsub.o -o armtothumb.axf -info veneers


2. Thumb (main) code calling an ARM subroutine

The two files in this project are thumbain.c and armsub.c.
Use the CodeWarrior project file Thumb_to_ARM.mcp to build the project.
Alternatively execute the command-line script thumbtoarm.bat:

tcc   -c -g -O1 -apcs /interwork thumbmain.c
armcc -c -g -O1 -apcs /interwork armsub.c
armlink thumbmain.o armsub.o -o thumbtoarm.axf -info veneers

⌨️ 快捷键说明

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