PIC常见错误(持续更新)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wuhenyouyuyouyu/article/details/47294249

1. Error - processor types do not agree across all input files.

    Solution
This error typically occurs when you have selected the wrong linker script file.
Double click on the linker script in the Project Tree and make sure you are using the correct linker script for the device you have selected under Configure>Select Device.

      建工程时的Device ( Configure>Select Device设置 ) 与 Linker Script文件夹下面包含的 .lkr文件 不匹配

2. 出现了could not find file ‘c018i.o’错误

    project -> build options -> project -> directories

 对include serach path 和 library serach path等添加(点NEW)默认路径就行了,一般指向C:/mcc18/h   C:/mcc18/lib

3.PIC18F4550的RAM地址和ROM地址不兼容

PIC18F4550采用的是哈佛结构,并且是分别编址的,因此如果一个数据存储在ROM区,然后用RAM指针去强制转换,是不起作用的。

所用指针必须和数据存储区域一样。

RAM体系也是用哈佛结构,但是是统一编址,不存在这个问题。

4、Pickit 3 - MPLAB Target device ID does not match 

google上的办法很多都试过, downgrade framework等都不行.后来看到一贴的方法:

把usb插到可直接供电的usb口(机箱的前置USB口)就可以了.

后来又遇到类似问题,换了别的芯片。觉得有点扯淡。自己摸索了一下,估计是以下问题导致:

1. 如果读出来的Target device ID是0, 原因有二(我所知道的):一,pickit 3坏了(这个可能性较小); 二,引脚接触不良或者不正确(我的就是这个原因)。

2. 如果读出来的Target device ID非零,但又不匹配,请检查你开发环境的IC型号是否选择正确了。

猜你喜欢

转载自blog.csdn.net/wuhenyouyuyouyu/article/details/47294249