打印

较无耻的要求 PIC AN967的源代码 编译不能

[复制链接]
3442|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
szcharle|  楼主 | 2008-7-4 15:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
是在Microchip网站上下载的AN967(用PIC16F72驱动单相交流电机)的原代码
压缩包里面包括一个asm 和一个inc文件
我用MPLab 8.1 (网站上下的次新稳定版) 编译 
报错,内容如下:
----------------------------------------------------------------------
Release build of project `E:\pic test\1\1.mcp' started.
Fri Jul 04 11:37:28 2008
----------------------------------------------------------------------
Make: The target "E:\pic test\1\MC_16F72.o" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F72 "MC_16F72.asm" /l"MC_16F72.lst" /e"MC_16F72.err" /x"MC_16F72.xrf" /aINHX8M
Error[149] E:\PIC TEST\1\MC_16F72.ASM 76 : Directive only allowed when generating an object file
Error[149] E:\PIC TEST\1\MC_16F72.ASM 79 : Directive only allowed when generating an object file
Error[149] E:\PIC TEST\1\MC_16F72.ASM 83 : Directive only allowed when generating an object file
Message[302] E:\PIC TEST\1\MC_16F72.ASM 89 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 91 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 118 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 120 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 135 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 141 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 144 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 733 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 734 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 750 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[149] E:\PIC TEST\1\MC_16F72.ASM 900 : Directive only allowed when generating an object file
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `E:\pic test\1\1.mcp' failed.
Fri Jul 04 11:37:30 2008
----------------------------------------------------------------------
BUILD FAILED

沙发
szcharle|  楼主 | 2008-7-4 15:12 | 只看该作者

接着

然后我根据Error 149 就改成输出build library target (invoke MPLIB)
这次编译成功了 但是按照help 此种只能生成.o文件 也确实生成了一个.o文件 
但是下一步该怎样做呢? 怎么才能生成 Hex文件呢 晕了

----------------------------------------------------------------------
Debug build of project `E:\pic test\1\1.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Fri Jul 04 11:36:15 2008
----------------------------------------------------------------------
Make: The target "E:\pic test\1\MC_16F72.o" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16cxx "MC_16F72.asm" /l"MC_16F72.lst" /e"MC_16F72.err" /o"MC_16F72.o" /d__DEBUG=1 /x"MC_16F72.xrf" /aINHX8M
Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F72.INC 35 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)
Message[302] E:\PIC TEST\1\MC_16F72.ASM 89 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 91 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 118 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 120 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 135 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 141 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 144 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 733 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 734 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] E:\PIC TEST\1\MC_16F72.ASM 750 : Register in operand not in bank 0. Ensure that bank bits are correct.
Make: The target "E:\pic test\1\1.cof" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\mplib.exe" /c "1.lib" "MC_16F72.o"
MPLIB 4.20, Librarian
Copyright (c) 2008 Microchip Technology Inc.

Errors : 0

----------------------------------------------------------------------
Debug build of project `E:\pic test\1\1.mcp' succeeded.
Preprocessor symbol `__DEBUG' is defined.
Fri Jul 04 11:36:19 2008
----------------------------------------------------------------------
BUILD SUCCEEDED

使用特权

评论回复
板凳
szcharle|  楼主 | 2008-7-4 15:13 | 只看该作者

老大们 帮看看 谢谢!

我尝试编译那些普通的example 可以编译通过的 (说明编译器和我可能没有问题)
单片机型号也没有选错啊 环境变量没改 尝试指定 如lib lkr的 也没有用 

这个程序 纯粹的汇编 根据作者说明 有一段db(Sine表) 是要在开机时候从rom加载到ram中的
我怀疑是不是这段导致的编译不能啊

AN967的原链接
http://www.microchip.com/stellent/i...ppnote=en022135

老大们帮我看看吧 或许对你们是个很简单的小问题 对我这个新手 我看能卡死我啊 呜呜

使用特权

评论回复
地板
yewuyi| | 2008-7-4 15:23 | 只看该作者

检查一下项目文件是否放在中文路径下?!

检查一下项目文件是否放在中文路径下?!

使用特权

评论回复
5
szcharle|  楼主 | 2008-7-4 18:38 | 只看该作者

搞定了 谢谢回复

一个高手帮我看了一下 是那个code的什么重定位的问题
新手啊 看来要多学习! 俺决定投奔PIC了 看中的就是它的“开源”! 

使用特权

评论回复
6
yewuyi| | 2008-7-5 08:29 | 只看该作者

呵呵,佛山的待遇奇低

使用特权

评论回复
7
bob.xue| | 2008-7-8 09:50 | 只看该作者

检查,删除重编

Make: The target "E:\pic test\1\MC_16F72.o" is out of date.

问题可能出在这里哦。

(原来已经搞定了)

使用特权

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

本版积分规则

10

主题

27

帖子

0

粉丝