Proje Derleme Sorunu

Başlatan PICaso, 31 Ocak 2019, 14:52:15

PICaso

Arkadaşlar herkese merhabalar,
Mikroişlemci programlamak için Mplab XC8 derleyici kullanmaya başladım fakat derleme de hep hata alıyorum. Basit bir LCD uygulaması yapıyorum. Bu sorunu yaptığım araştırmalar ile çözemedim. Yardımcı olursanız sevinirim. Yazılım kodunu ve hata kodunu gönderiyorum.
Şimdiden teşekkür ederim. Herkese iyi çalışmalar dilerim.   

YAZILIM KODU///////////////////////////////////////////////////////////////////////////////////////////////////


#define _XTAL_FREQ 8000000

#define RS RD2
#define EN RD3
#define D4 RD4
#define D5 RD5
#define D6 RD6
#define D7 RD7

#include <xc.h>
#include "lcd.h";


// PIC18F4520 Configuration Bit Settings

// 'C' source line config statements

// CONFIG1H
#pragma config OSC = HS         // Oscillator Selection bits (EC oscillator, CLKO function on RA6)
#pragma config FCMEN = ON       // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor enabled)
#pragma config IESO = ON        // Internal/External Oscillator Switchover bit (Oscillator Switchover mode enabled)

// CONFIG2L
#pragma config PWRT = OFF       // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN = ON      // Brown-out Reset Enable bits (Brown-out Reset enabled and controlled by software (SBOREN is enabled))
#pragma config BORV = 3         // Brown Out Reset Voltage bits (Minimum setting)

// CONFIG2H
#pragma config WDT = OFF        // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
#pragma config WDTPS = 32768    // Watchdog Timer Postscale Select bits (1:32768)

// CONFIG3H
#pragma config CCP2MX = PORTC   // CCP2 MUX bit (CCP2 input/output is multiplexed with RC1)
#pragma config PBADEN = OFF     // PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset)
#pragma config LPT1OSC = OFF    // Low-Power Timer1 Oscillator Enable bit (Timer1 configured for higher power operation)
#pragma config MCLRE = ON       // MCLR Pin Enable bit (MCLR pin enabled; RE3 input pin disabled)

// CONFIG4L
#pragma config STVREN = ON      // Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset)
#pragma config LVP = OFF        // Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
#pragma config XINST = OFF      // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode))

// CONFIG5L
#pragma config CP0 = OFF        // Code Protection bit (Block 0 (000800-001FFFh) not code-protected)
#pragma config CP1 = OFF        // Code Protection bit (Block 1 (002000-003FFFh) not code-protected)
#pragma config CP2 = OFF        // Code Protection bit (Block 2 (004000-005FFFh) not code-protected)
#pragma config CP3 = OFF        // Code Protection bit (Block 3 (006000-007FFFh) not code-protected)

// CONFIG5H
#pragma config CPB = OFF        // Boot Block Code Protection bit (Boot block (000000-0007FFh) not code-protected)
#pragma config CPD = OFF        // Data EEPROM Code Protection bit (Data EEPROM not code-protected)

// CONFIG6L
#pragma config WRT0 = OFF       // Write Protection bit (Block 0 (000800-001FFFh) not write-protected)
#pragma config WRT1 = OFF       // Write Protection bit (Block 1 (002000-003FFFh) not write-protected)
#pragma config WRT2 = OFF       // Write Protection bit (Block 2 (004000-005FFFh) not write-protected)
#pragma config WRT3 = OFF       // Write Protection bit (Block 3 (006000-007FFFh) not write-protected)

// CONFIG6H
#pragma config WRTC = OFF       // Configuration Register Write Protection bit (Configuration registers (300000-3000FFh) not write-protected)
#pragma config WRTB = OFF       // Boot Block Write Protection bit (Boot block (000000-0007FFh) not write-protected)
#pragma config WRTD = OFF       // Data EEPROM Write Protection bit (Data EEPROM not write-protected)

// CONFIG7L
#pragma config EBTR0 = OFF      // Table Read Protection bit (Block 0 (000800-001FFFh) not protected from table reads executed in other blocks)
#pragma config EBTR1 = OFF      // Table Read Protection bit (Block 1 (002000-003FFFh) not protected from table reads executed in other blocks)
#pragma config EBTR2 = OFF      // Table Read Protection bit (Block 2 (004000-005FFFh) not protected from table reads executed in other blocks)
#pragma config EBTR3 = OFF      // Table Read Protection bit (Block 3 (006000-007FFFh) not protected from table reads executed in other blocks)

// CONFIG7H
#pragma config EBTRB = OFF      // Boot Block Table Read Protection bit (Boot block (000000-0007FFh) not protected from table reads executed in other blocks)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

int main()
{
    unsigned int a;
    TRISD = 0x00;
    Lcd_Init();
    while(1)
    {
        Lcd_Clear();
        Lcd_Set_Cursor(1,1);
        Lcd_Write_String("LCD Library for");
        Lcd_Set_Cursor(2,1);
        Lcd_Write_String("MPLAB XC8");
        __delay_ms(2000);
        Lcd_Clear();
        Lcd_Set_Cursor(1,1);
        Lcd_Write_String("Developed By");
        Lcd_Set_Cursor(2,1);
        Lcd_Write_String("electroSome");
        __delay_ms(2000);
        Lcd_Clear();
        Lcd_Set_Cursor(1,1);
        Lcd_Write_String("www.electroSome.com");

        for(a=0;a<15;a++)
        {
            __delay_ms(300);
            Lcd_Shift_Left();
        }

        for(a=0;a<15;a++)
        {
            __delay_ms(300);
            Lcd_Shift_Right();
        }

        Lcd_Clear();
        Lcd_Set_Cursor(2,1);
        Lcd_Write_Char('e');
        Lcd_Write_Char('S');
        __delay_ms(2000);
    }
    return 0;
}



HATA/////////////////////////////////////////////////////////////////////////////////////////////////////////

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/aburak.aciker/Desktop/lcddeneme.X'
make  -f nbproject/Makefile-default.mk dist/default/production/lcddeneme.X.production.hex
make[2]: Entering directory 'C:/Users/aburak.aciker/Desktop/lcddeneme.X'
"C:\Program Files (x86)\Microchip\xc8\v2.05\bin\xc8.exe" --pass1  --chip=18F4520 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib   --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    -obuild/default/production/lcddeneme.p1  lcddeneme.c
:: advisory: (2051) The current license does not permit the selected optimization level, using optimization level 2
:: warning: (2055) use of the --mode option is deprecated; use --opt to control optimizations and avoid this warning
lcd.h:22: error: (277) can't mix prototyped and non-prototyped arguments
lcd.h:22: error: (194) ")" expected
lcddeneme.c:80: warning: (361) function declared implicit int
lcddeneme.c:83: warning: (361) function declared implicit int
lcddeneme.c:84: warning: (361) function declared implicit int
lcddeneme.c:85: warning: (361) function declared implicit int
lcddeneme.c:102: warning: (361) function declared implicit int
lcddeneme.c:108: warning: (361) function declared implicit int
lcddeneme.c:113: warning: (361) function declared implicit int
(908) exit status = 1
nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/lcddeneme.p1' failed
make[2]: Leaving directory 'C:/Users/aburak.aciker/Desktop/lcddeneme.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/aburak.aciker/Desktop/lcddeneme.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [build/default/production/lcddeneme.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUİLD FAILED (exit value 2, total time: 657ms)

PICaso


RaMu

lcd.h:22: error: (194) ")" expected
Bu satırda parantez kapama eksik diyor

Projeyi zipleyip biryere yükleyip link eklesen,
deneyip daha kolay bulunabilir hata.
Sorularınıza hızlı cevap alın: http://www.picproje.org/index.php/topic,57135.0.html

ahuramazda

lcd.h ve lcd.c dosyalarını da buraya kopyalamalısın.

mehmet

@PICaso mesajınıza kod eklemek için "KOD"
butonunu kullanınız.
Olan olmuştur,
olacak olan da olmuştur.
Olacak bir şey yoktur.
---------------------------------------------
http://www.mehmetbilgi.net.tr
https://creativecommons.org/licenses/by/4.0/deed.tr "CC BY"

PICaso

Arkadaşlar yaptığınız geri dönüşler için teşekkür ederim. Önceden CCS C kullanıyordum. Tekrar CCS C kullanmaya başladım. CCS C ile MPLAB XC8 in arasındaki avantaj dezavantaj nelerdir? Yapacağınız yorumlar için şimdiden teşekkür ederim.