Re: 請教CAN Init. 問題
|
||||
---|---|---|---|---|
版主
|
請參考一下 Calvin Ho 所寫的 CAN 的範例,如何將周邊的函數庫加進來。
http://www.microchip.com.tw/modules/w ... glefile.php?cid=12&lid=74
發表於: 2008/8/13 10:23
|
|||
|
Re: 請教CAN Init. 問題
|
||||
---|---|---|---|---|
新會員
|
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
|
|||
|
Re: 請教CAN Init. 問題
|
||||
---|---|---|---|---|
新會員
|
感謝版主大力幫忙!!
但是小弟不才 我使用的是IDE8.0版~~ 找不到project options在那邊設定~~ 也找不到heap buffer該去哪設定~~ ---------------- 如果是在project內include can.h(這點我已經有做,甚至特別加上路徑,還是不行) 麻煩版主在詳細解釋~感恩
發表於: 2008/8/12 9:34
|
|||
|
Re: 請教CAN Init. 問題
|
||||
---|---|---|---|---|
版主
|
A heap is required, but has not been specified :
請到 Project Options 下設定 Heap Buffer。 其他的應是沒有告訴Linker CAN Library 的檔案來源及路徑。
發表於: 2008/8/12 9:02
|
|||
|
請教CAN Init. 問題
|
||||
---|---|---|---|---|
新會員
|
小弟剛踏入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
|
|||
|