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.

problom in Mplab x v2.0 programming.

Status
Not open for further replies.

tapu

Full Member level 4
Joined
Sep 15, 2014
Messages
234
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
india
Activity points
3,041
Dear all,
I am new in mplab x or pic programming.as i have been used keil for 8051.first time i program pic 18f2220 in mplab x2.0 (xc8 compiler) for a simple program.But it shows errors in output as follow.

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/lg/MPLABXProjects/test.X'
make -f nbproject/Makefile-default.mk dist/default/production/test.X.production.hex
make[2]: Entering directory `C:/Users/lg/MPLABXProjects/test.X'
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F2220 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --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/test.p1 test.c
test.c:11: error: (192) undefined identifier "OSCON"
(908) exit status = 1
make[2]: Leaving directory `C:/Users/lg/MPLABXProjects/test.X'
make[1]: Leaving directory `C:/Users/lg/MPLABXProjects/test.X'
make[2]: *** [build/default/production/test.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 678ms)
Now how to solve this issue.
 

Have you included linker file for the 18f2220 and header files also.
 

I have linked source file & header file also.
 

'OSCON' is undefined. Possible, syntax error or header incorrectly included. No idea without see the code.
 
  • Like
Reactions: tapu

    tapu

    Points: 2
    Helpful Answer Positive Rating
Theire was a syntax error in osccon.I was written OSCON.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top