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.

mplab v8.66 for p18f458 using c18 v3.37.01 build failed;

Status
Not open for further replies.

furqankaimkhani

Member level 4
Joined
Sep 10, 2010
Messages
79
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,946
I am trying to make a program in mplab ide v8.66 for pic18f458 using c18 v3.37.01.

To do so, I have gone through the steps told in this video

https://www.youtube.com/watch?v=84Tu4eLTLVY

the code is below:
//-------------------------------------
#include <P18f458.h>
void main (void)
{
TRISB = 0;
for(;;)
{
portb = 0x55;
portb = 0xAA;
}
}
//-------------------------------------

the output file shows:
----------------------------------------------------------------------
Debug build of project `D:\picassemblyprojects\fuzoolC.mcp' started.
Language tool versions: MPASMWIN.exe v5.40, mplink.exe v4.38, mcc18.exe v3.37.01, mplib.exe v4.38
Preprocessor symbol `__DEBUG' is defined.
Wed May 23 17:20:43 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "D:\Program Files\Microchip\mplabc18\v3.37.01\bin\mcc18.exe" -p=18F458 /i"D:\Program Files\Microchip\mplabc18\v3.37.01\h" "fuzoolwalac.c" -fo="fuzoolwalac.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
D:\picassemblyprojects\fuzoolwalac.c:7:Error [1105] symbol 'portb' has not been defined
D:\picassemblyprojects\fuzoolwalac.c:7:Error [1101] lvalue required
D:\picassemblyprojects\fuzoolwalac.c:8:Error [1105] symbol 'portb' has not been defined
D:\picassemblyprojects\fuzoolwalac.c:8:Error [1101] lvalue required
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `D:\picassemblyprojects\fuzoolC.mcp' failed.
Language tool versions: MPASMWIN.exe v5.40, mplink.exe v4.38, mcc18.exe v3.37.01, mplib.exe v4.38
Preprocessor symbol `__DEBUG' is defined.
Wed May 23 17:20:44 2012
----------------------------------------------------------------------
BUILD FAILED
 

Code:
#include <P18f458.h>
void main (void)
{
TRISB = 0;
for(;;)
{
PORTB = 0x55;
PORTB = 0xAA;
}
}

portb should be in uppercase... that's why the error states that it doesn't know what is 'portb'


don't forget to set the configuration bits for real implementation...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top