• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   4 Anonymous Users






Re: dsPIC33fj外設函數庫使用出错
#4
新會員
新會員


查看用戶資訊
樓主能說清楚一點嗎? 我不太明白你怎麼解決, 我也有相同的問題哦.

發表於: 2009/4/10 5:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsPIC33fj外設函數庫使用出错
#3
新會員
新會員


查看用戶資訊
小弟刚接触pic单片机的,以前玩的是powerpc+linux还是区别挺大的

發表於: 2009/2/10 13:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsPIC33fj外設函數庫使用出错
#2
新會員
新會員


查看用戶資訊
问题解决了!原来在libp33FJ256GP710-coff.a库中没有定义StartI2C,看了源代码,发现
#include "i2c.h"

#ifdef _MI2CIF

void OpenI2C(unsigned int config1, unsigned int config2)
{
I2CBRG = config2;
I2CCON = config1;
}

#else
#warning "Does not build on this target"
#endif
的条件编译语句,所以并不确定这个函数是否被编译,遂用notepad++打开libp33FJ256GP710-coff.a库文件,
看了这个动态库里面的。o包里面是否有OpenI2C.o,结果发现有
OpenI2C1,和OpenI2C2,并没有OpenI2C
然后在p33FJ256GP710.h搜索_MI2CIF的宏,没有发现,确定了这个目标文件在制作库的时候没有被编译,疑问解决

Attach file:



jpg  (0.00 KB)


發表於: 2009/2/10 13:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


dsPIC33fj外設函數庫使用出错
#1
新會員
新會員


查看用戶資訊
我用的芯片是dspic33fj256gp710,用了外设库,但是在全部编译的时候,出现连接错误
c:\program files\microchip\mplab c30\bin\bin\pic30-coff-ld.exe: Warning: target processor '33FJ256GP710' does not match linker script
然后我的代码中就回出现如下情况很多
test.c:193: undefined reference to `StartI2C'
.
.
.
很奇怪,我在MPLAB项目树中的Library Files中已经加入了libp33FJ256GP710-coff.a的静态库,也成功了,从这里可以看出来
Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP710 "main.o" "memory.o" "gprs.o" "common.o" "gps.o" "communication_alow.o" "communication_uart.o" "delay.o" "mine_test.o" "C:\Program Files\Microchip\MPLAB C30\lib\dsPIC33F\libp33FJ256GP710-coff.a" -o"target\mine_qlm_gps.cof" -Wl,-L"C:\Program Files\Microchip\MPLAB C30\lib",--script="p33FJ256GP510.gld",--defsym=__MPLAB_BUILD=1,-Map="target\mine_qlm_gps.map",--report-mem
请教各位高手,应该如何解决

發表於: 2009/2/6 17:28
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------