##ビルド失敗の原因を教えてください。
使用しているマイコンは、
PIC16Fシリーズ
開発環境 MPLAB IDE X v5.15
コンパイラ XC8 v2.05
プログラムをコンパイルすると、次のエラーが表示されますが、
原因がわかりません。
どんなプログラムで試しても、↓のエラーが表示されます。
##エラー表示
html
1make[2]: *** No rule to make target 'build/default/production/Test1.o', needed by 'dist/default/production/Test1.X.production.hex'. Stop. 2make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf 3make[1]: Entering directory 'C:/Users/User01/MPLABXProjects/Test1.X' 4make -f nbproject/Makefile-default.mk dist/default/production/Test1.X.production.hex 5make[2]: Entering directory 'C:/Users/User01/MPLABXProjects/Test1.X' 6make[2]: Leaving directory 'C:/Users/User01/MPLABXProjects/Test1.X' 7make[1]: *** [.build-conf] Error 2 8make: *** [.build-impl] Error 2 9nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed 10make[1]: Leaving directory 'C:/Users/User01/MPLABXProjects/Test1.X' 11nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed 12 13BUILD FAILED (exit value 2, total time: 102ms)
##ビルドしたプログラム
html
1#include <xc.h> 2 3// #pragma config statements should precede project file includes. 4// Use project enums instead of #define for ON and OFF. 5 6// CONFIG1 7#pragma config FOSC = INTOSC // Oscillator Selection (INTOSC oscillator: I/O function on CLKIN pin) 8#pragma config WDTE = OFF // Watchdog Timer Enable (WDT disabled) 9#pragma config PWRTE = ON // Power-up Timer Enable (PWRT enabled) 10#pragma config MCLRE = ON // MCLR Pin Function Select (MCLR/VPP pin function is MCLR) 11#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled) 12#pragma config CPD = OFF // Data Memory Code Protection (Data memory code protection is disabled) 13#pragma config BOREN = ON // Brown-out Reset Enable (Brown-out Reset enabled) 14#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin) 15#pragma config IESO = OFF // Internal/External Switchover (Internal/External Switchover mode is disabled) 16#pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is disabled) 17 18// CONFIG2 19#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off) 20#pragma config PLLEN = OFF // PLL Enable (4x PLL disabled) 21#pragma config STVREN = OFF // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will not cause a Reset) 22#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.) 23#pragma config LVP = OFF // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming) 24 25#define __delay(X) _delay((unsigned long)((X))) //????????__delay????? 26#define _XTAL_FREQ 8000000 //Clock=8MHz 27 28void main(void) { 29 OSCCON=0x72; //PLL Disable/8MHz 30 ANSELC=0x00; //PORTC Digital Setting 31 TRISC=0x10; //0b00010000 32 LATC=0x00; 33 34 while(1){ 35 if(PORTCbits.RC4==0){ //RC4==1??OK 36 LATC=0x00; 37 LATCbits.LATC5=0; //RC5=0??OK 38 __delay(1000000); 39 LATCbits.LATC5=1; 40 __delay(1000000); 41 } 42 else{ 43 LATC=0x00; 44 LATCbits.LATC6=0; //RC5=0??OK 45 __delay(1000000); 46 LATCbits.LATC6=1; 47 __delay(1000000); 48 } 49 } 50 51}

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。