Nhờ mọi người giúp đỡ, em sử dụng MPLAB X và Hi-tech C 9.82 viết 1 đoạn code đơn giản nhưng khi dịch thì báo lỗi
Thông báo lỗi
Code:
#include <htc.h>
__CONFIG(XT & WDTDIS & PWRTEN & MCLREN & UNPROTECT & SWBOREN & IESODIS & FCMDIS & LVPDIS & DEBUGDIS);
__CONFIG(BORV21);
#define _XTAL_FREQ 4000000
void main(){
ANSEL=0x00;
ANSELH=0x00;
TRISB=0x00;
PORTB=0xFF;
/* while(1){
PORTB=0x00;
__delay_ms(150);
PORTB=0xFF;
__delay_ms(150);
}*/
}
Code:
Copyright (C) 2011 Microchip Technology Inc.
(1273) Omniscient Code Generation not available in Lite mode (warning)
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "DEBUGDIS"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "LVPDIS"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "FCMDIS"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "IESODIS"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "SWBOREN"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "UNPROTECT"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "MCLREN"
make[2]: *** [dist/default/production/led.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "PWRTEN"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "WDTDIS"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:45: error: undefined symbol "XT"
C:\Users\NHAN\AppData\Local\Temp\s6sk.:49: error: undefined symbol "BORV21"
make[2]: Leaving directory `E:/PIC/CODE/Hi_TECHC/LED/led.X'
make[1]: Leaving directory `E:/PIC/CODE/Hi_TECHC/LED/led.X'
BUILD FAILED (exit value 2, total time: 2s)