- 32
- 0
- 约 23页
- 2016-10-11 发布于贵州
- 举报
keil与proeus混合编译
找了N久终于找到如何在Keil3下用汇编语句了,在下初学,见谅.= =#####
图1.如往常一样建立项目,选择芯片型号,建立main() 函数,具体工程文件结构如图,main函数中的asmfile在下图介绍
图2. asmfile子程序的实现,并保存为new.s,添加到项目中,该子程序中调用了main.c中的 int cFun(int a,int b,int c)函数,需用IMPORT cFun来说明。注意不要顶格写(否则编译会提示四条错误信息,
new.s(2): error: A1163E: Unknown opcode asmfile , expecting opcode or Macro
new.s(4): error: A1163E: Unknown opcode asmfile, , expecting opcode or Macro
new.s(6): error: A1163E: Unknown opcode cFun , expecting opcode or Macro
new.s(9): error: A1355U: A Label was found which was in no AREA
)
图3.如果正常,编译通过
图4.Debug 可见R0,R1,R2改变为0x0000000
原创力文档

文档评论(0)