Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem on using MPLAB C18 "Build Failed"

Status
Not open for further replies.

lloydi12345

Member level 4
Joined
Aug 31, 2010
Messages
77
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Activity points
1,953
I've just started playing around with MPLAB C18 but I can't seem to make it work. I'm using this code.

Code:
#include <p18f4620.h>
#include <delays.h>
#pragma config OSC = XT  
#pragma config WDT = OFF 
#define LEDpin LATDbits.LATD1 
#define LEDTris TRISDbits.TRISD1 

void main()
{
	LEDTris = 0;
	LEDPin = 1;

while(1){
	LEDPin = ~LEDPin;
	Delay10KTCYx(25);
}

I'm encountering this error. I might have missed somethin'.

Code:
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\Administrator\Desktop\C18\tutorial4.mcp' started.
Language tool versions: MPASMWIN.exe v5.32, mplink.exe v4.32, mcc18.exe v3.32
Preprocessor symbol `__DEBUG' is defined.
Tue Mar 27 15:26:46 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4620 /i"C:\MCC18\h" "main.c" -fo="main.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\Documents and Settings\Administrator\Desktop\C18\main.c:17:Error: syntax error
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\Administrator\Desktop\C18\tutorial4.mcp' failed.
Language tool versions: MPASMWIN.exe v5.32, mplink.exe v4.32, mcc18.exe v3.32
Preprocessor symbol `__DEBUG' is defined.
Tue Mar 27 15:26:46 2012
----------------------------------------------------------------------
BUILD FAILED

Regards,

lloyd
 
Last edited:

At least you missed a "}" at the end of posted code.
 

Check your spelling.

LEDPin, LEDpin
 

Thanks a lot guys i didn't it's case sensitive and sorry for my carelessness.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top