打印

PSOC3 main.c 里面如何添加汇编实现混编

[复制链接]
2709|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
rocky_bian|  楼主 | 2010-3-8 12:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
PSOC3 main.c 里面如何添加汇编实现混编
沙发
Go_PSoC| | 2010-3-8 14:16 | 只看该作者
Please refer to this link:
http://www.cypress.com/?rID=40417

使用特权

评论回复
板凳
rocky_bian|  楼主 | 2010-3-8 22:11 | 只看该作者
老虎油 Go_PSoC
三块肉喂马吃!!

使用特权

评论回复
地板
rocky_bian|  楼主 | 2010-3-8 22:13 | 只看该作者
Question:  How do I write Assembly code in PSoC Creator?

Answer:  There are two options to writing assembly code in PSoC Creator.

Option-1 Create a separate assembly source file

1. Right click on Project name in the Project Explorer and select "Add new item"

2. Select "8051 Keil Assembly File" and provide a name for the file.

3. This will create an assembly source file with a .a51 extension in the Source Files folder in the project.

4. You can add assembly code to this file.

5. The instruction set is standard 8051.  Go to Help > documentation > Keil > Ax51 Assembler User Guide for help on instructions, template etc.

Option-2 Inline Assembly in a C source file

1. In the C source file, put the assembly code inside the directive “#pragma asm” and “#pragma endasm”.

2. In the Project explorer, right click on the source file that has the inline assembly and select "Build Settings".

3. Select the Compiler option and set the value for "Inline Assembly" parameter to True.

4. Now, the compiler will process the inline assembly code during compilation.

使用特权

评论回复
5
虎虎生威| | 2010-3-8 22:33 | 只看该作者
???

使用特权

评论回复
6
rocky_bian|  楼主 | 2010-3-8 23:47 | 只看该作者
the  second  option ,我已经实验过了,ok!!!
第一个 我还不能实现,能实现的朋友 请帮忙指点一二 ,尤其细节方面

使用特权

评论回复
7
yuxyoo| | 2010-3-9 16:56 | 只看该作者
第一个你的困难在哪里?

使用特权

评论回复
8
rocky_bian|  楼主 | 2010-3-9 18:34 | 只看该作者
7# yuxyoo

比如的项目中要调用LCD_Start()的汇编 该如何调用呢..

使用特权

评论回复
9
god_like| | 2010-3-10 12:20 | 只看该作者
不懂,进来学习一下

使用特权

评论回复
10
love_life| | 2010-3-10 12:30 | 只看该作者
呵呵,“三块肉喂马吃”

使用特权

评论回复
11
happytiger2010| | 2010-3-10 12:41 | 只看该作者
LZ很厉害啊,学习了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

40

主题

436

帖子

0

粉丝