• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: dsPIC 編譯失敗
#4
版主
版主


查看用戶資訊
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Feeddback/Desktop/AD.X'
make -f nbproject/Makefile-default.mk dist/default/production/AD.X.production.hex
make[2]: Entering directory 'C:/Users/Feeddback/Desktop/AD.X'
AD.c:12: error: 'BORV_20' undeclared here (not in a function)
"C:\Program Files (x86)\Microchip\MPLAB C30\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=30F4011 -MMD -MF build/default/production/AD.o.d -o build/default/production/AD.o AD.c
nbproject/Makefile-default.mk:118: recipe for target
:
:

編譯只有一項錯誤如紅色標示。 BORV_20 的定義沒有宣告所以會產生錯誤。dsPIC30F4011 的周邊定義檔在: C:\Program Files (x86)\Microchip\MPLAB C30\support\dsPIC30F\h\p30f4011.h
在這 h 檔裡的後面有 Configuration Word 的名稱定義。其中 " Brown Out Voltage" 的定義是:
#define BORV45 0xFFCF
#define BORV42 0xFFDF
#define BORV27 0xFFEF
#define BORV20 0xFFFF
所以要將程式裡有關 BOR 的設定從 "BORV_20" 改成 "BROV20"。

發表於: 2021/4/6 12:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsPIC 編譯失敗
#3
新會員
新會員


查看用戶資訊
您好:

最近在嘗試新的專案開發

寫完程式進行燒錄時又產生錯誤

因為編譯器上都沒有紅底

所以也不知道是哪邊錯誤

以下是錯誤訊息

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Feeddback/Desktop/AD.X'
make -f nbproject/Makefile-default.mk dist/default/production/AD.X.production.hex
make[2]: Entering directory 'C:/Users/Feeddback/Desktop/AD.X'
AD.c:12: error: 'BORV_20' undeclared here (not in a function)
"C:\Program Files (x86)\Microchip\MPLAB C30\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=30F4011 -MMD -MF build/default/production/AD.o.d -o build/default/production/AD.o AD.c
nbproject/Makefile-default.mk:118: recipe for target 'build/default/production/AD.o' failed
make[2]: Leaving directory 'C:/Users/Feeddback/Desktop/AD.X'
make[2]: *** [build/default/production/AD.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Feeddback/Desktop/AD.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 306ms)

也有參照之前的方式更改成以下設定

_FOSC(CSW_FSCM_OFF & XT_PLL8); // XT with 8xPLL oscillator, Failsafe clock off
_FWDT(WDT_OFF); // Watchdog timer disabled
_FBORPOR(PBOR_OFF & MCLR_EN); // Brown-out reset disabled, MCLR reset enabled
_FGS(CODE_PROT_OFF); // Code protect disabled

但還是編譯失敗

MPLAB X IDE V5.20

C30 (V3_31)

發表於: 2021/3/31 17:30
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: dsPIC 編譯失敗
#2
版主
版主


查看用戶資訊
參照:

make[2]: Entering directory 'C:/Users/Kira/Desktop/Text/123/456.X'
uart.c:10: error: 'BORV_20' undeclared here (not in a function)


Configuration Bits 的參數選項沒有 "BORV_20" 的設定項,請參考一下該元件的 h 檔裡對 PBOR 的定義。或可以參考底下的設定:

_FOSC(CSW_FSCM_OFF & XT_PLL8); // XT with 8xPLL oscillator, Failsafe clock off
_FWDT(WDT_OFF); // Watchdog timer disabled
_FBORPOR(PBOR_OFF & MCLR_EN); // Brown-out reset disabled, MCLR reset enabled
_FGS(CODE_PROT_OFF); // Code protect disabled


第二個錯誤請修正一下 main( ) 函數的使用:
int main(void)

發表於: 2021/1/28 15:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


dsPIC 編譯失敗
#1
新會員
新會員


查看用戶資訊
您好:
最近使用dsPIC30F4011
將UART模組的程式要燒錄晶片

在MPLAB IDE V8.92搭配C30是可以燒錄成功並執行

可是一樣的程式碼轉移到到MPLAB X IDEV5.30中進行燒錄卻跳出以下錯誤訊息
想問是哪方面出現問題?

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Kira/Desktop/Text/123/456.X'
make -f nbproject/Makefile-default.mk dist/default/production/456.X.production.hex
make[2]: Entering directory 'C:/Users/Kira/Desktop/Text/123/456.X'
uart.c:10: error: 'BORV_20' undeclared here (not in a function)
"C:\Program Files (x86)\Microchip\MPLAB C30\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=30F4011 -MMD -MF build/default/production/uart.o.d -o build/default/production/uart.o uart.c
uart.c: In function 'main':
uart.c:29: warning: return type of 'main' is not 'int'
nbproject/Makefile-default.mk:119: recipe for target 'build/default/production/uart.o' failed
uart.c:126:2: warning: no newline at end of file
make[2]: *** [build/default/production/uart.o] Error 1
make[2]: Leaving directory 'C:/Users/Kira/Desktop/Text/123/456.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Kira/Desktop/Text/123/456.X'
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 325ms)

謝謝

MPLAB X IDE V5.30
C30 (V3_31)

發表於: 2021/1/27 16:48
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... ]

教育訓練中心

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