Re: dsPIC 編譯失敗
|
||||
---|---|---|---|---|
新會員
|
您好:
最近在嘗試新的專案開發 寫完程式進行燒錄時又產生錯誤 因為編譯器上都沒有紅底 所以也不知道是哪邊錯誤 以下是錯誤訊息 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
|
|||
|
Re: dsPIC 編譯失敗
|
||||
---|---|---|---|---|
版主
|
參照:
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
|
|||
|
dsPIC 編譯失敗
|
||||
---|---|---|---|---|
新會員
|
您好:
最近使用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
|
|||
|