• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請教CAN Init. 問題
#6
新會員
新會員


查看用戶資訊
謝謝!

不過我當初就是用這程式改為" dsPIC33FJ128MC708 "版本
但是改到後面,在上述問題中卡住!!

後來加入\Program\Microchip\MPLAB C30\lib\libp33FJ128MC708-coff.a
還是留下兩個錯誤訊息:
CAN_Sub.o(.text+0x34):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:27: undefined reference to `CAN1SetTXMode'
CAN_Sub.o(.text+0x3a):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:28: undefined reference to `CAN1SetRXMode'

不知道是不是在哪邊需設定??
或是在上述.a檔中看不懂這兩個CAN的function??
希望版主再度解答?!
若有必要的話~~我可以傳送我的程式給你跑看看

發表於: 2008/8/15 11:09
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教CAN Init. 問題
#5
版主
版主


查看用戶資訊
請參考一下 Calvin Ho 所寫的 CAN 的範例,如何將周邊的函數庫加進來。
http://www.microchip.com.tw/modules/w ... glefile.php?cid=12&lid=74

發表於: 2008/8/13 10:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教CAN Init. 問題
#4
新會員
新會員


查看用戶資訊
heap問題已解決, 但是其餘問題還沒有解決,

ALL_Test_main.o(.text+0x260): In function `main':
D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\ALL_Test_main.c:347: undefined reference to `CAN1SendMessage'
CAN_Sub.o(.text+0x4): In function `Initial_CAN':
D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:7: undefined reference to `CAN1SetOperationMode'
CAN_Sub.o(.text+0x16):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:12: undefined reference to `CAN1Initialize'
CAN_Sub.o(.text+0x1e):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:19: undefined reference to `CAN1SetFilter'
CAN_Sub.o(.text+0x26):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:21: undefined reference to `CAN1SetFilter'
CAN_Sub.o(.text+0x2e):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:24: undefined reference to `CAN1SetMask'
CAN_Sub.o(.text+0x34):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:27: undefined reference to `CAN1SetTXMode'
CAN_Sub.o(.text+0x3a):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:28: undefined reference to `CAN1SetRXMode'
CAN_Sub.o(.text+0x3e):D:\CAN\Audio_ECU\Code\dsPIC\0812_CANTEST\CAN_Sub.c:30: undefined reference to `CAN1SetOperationMode'
Link step failed.
BUILD FAILED: Wed Aug 13 09:39:59 2008

----------------
我已經在main & can.c中#include <can.h> 甚至標出can.h路徑
#include <I:\Program\Microchip\MPLAB C30\support\h\peripheral_30F_24H_33F\can.h>
但是還是出現上述錯誤, 不曉得哪邊還得設定或是include?

尚請大師解惑~~

發表於: 2008/8/13 9:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教CAN Init. 問題
#3
新會員
新會員


查看用戶資訊
感謝版主大力幫忙!!
但是小弟不才
我使用的是IDE8.0版~~
找不到project options在那邊設定~~
也找不到heap buffer該去哪設定~~
----------------
如果是在project內include can.h(這點我已經有做,甚至特別加上路徑,還是不行)

麻煩版主在詳細解釋~感恩

發表於: 2008/8/12 9:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教CAN Init. 問題
#2
版主
版主


查看用戶資訊
A heap is required, but has not been specified :
請到 Project Options 下設定 Heap Buffer。

其他的應是沒有告訴Linker CAN Library 的檔案來源及路徑。

發表於: 2008/8/12 9:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教CAN Init. 問題
#1
新會員
新會員


查看用戶資訊
小弟剛踏入PIC界不到1個月時間,
想詢問一個問題:
再使用APP023+dsPIC33FJ128MC708 CAN TX與RX之前,跑CAN Init.時會出現以下錯誤:
i:\program\microchip\mplab c30\bin\pic30-coff-ld.exe Error: A heap is required, but has not been specified
CAN_Sub.o(.text+0x4): In function `Initial_CAN':
D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:6: undefined reference to `CAN1SetOperationMode'
CAN_Sub.o(.text+0x16):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:11: undefined reference to `CAN1Initialize'
CAN_Sub.o(.text+0x1e):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:18: undefined reference to `CAN1SetFilter'
CAN_Sub.o(.text+0x26):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:20: undefined reference to `CAN1SetFilter'
CAN_Sub.o(.text+0x2e):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:23: undefined reference to `CAN1SetMask'
CAN_Sub.o(.text+0x34):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:26: undefined reference to `CAN1SetTXMode'
CAN_Sub.o(.text+0x3a):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:27: undefined reference to `CAN1SetRXMode'
CAN_Sub.o(.text+0x3e):D:\CAN\Audio_ECU\Code\dsPIC\CAN_ALL_Function_GLCD_33\CAN_Sub.c:29: undefined reference to `CAN1SetOperationMode'

"Link step failed."

不知道是不是哪邊沒有link到,但是我已經#include <can.h>,
為了怕include錯誤特地還加上路徑( #include <I:\Program\Microchip\MPLAB C30\support\h\peripheral_30F_24H_33F\can.h> ),但還是出現上述錯誤。

懇請高手解圍!!謝謝。

發表於: 2008/8/11 10:58
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... ]

教育訓練中心

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