Jack_Rider
New Member
Hi fellas. I need serious help here with mplab. I've googled everything i can and searched many forums for similar questions like this but none of them solved my problem. I just installed pic c lite version 9.5 and mplab version 7.0. The instruction in pic c lite told me that it supports only mplab 6.5 and higher so i know my version should have no problems. However, when i create a new project in mplab and set the usual settings, i get "build failed" when i click on BUILD ALL. Here are the exact steps i followed:
1: I installed mplab 7.0.
2: I installed pic c lite 9.5 and clicked "integrate picc-lite with microchip mplab". I also clicked "Add to environment path".
3: Now in mplab, i entered project wizard, chose 16f877. For the toolsuite contents, all of them are already pointing to picl.exe in the location.
4: I chose a project name, selected a c source file "blink.c", of which the source code is as shown:
#include<htc.h>
#define _XTAL_FREQ 8000000
void main()
{
TRISB=0x00;
PORTB=0x00;
while(1)
{
PORTB=0xFF;
_delay_ms(100);
PORTB=0x00;
_delay_ms(100);
}
}
In configuration bits i set oscillator as XT, Watchdog timer off, power-up timer on. The rest i left unchanged. In the pic c compiler tab under build options, i enabled assembler optimization as level 9. Now after everything, and all the sweating and several re-installations, i still get the same thing:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC-Lite\9.50\BIN\PICL.EXE" -C -E"blink.cce" "blink.c" -O"blink.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC-Lite\9.50\BIN\PICL.EXE" -E"try.lde" "C:\Users\OZIEGBE\Desktop\XYX781227\Microcontrollers\Pic projects\blink.obj" -M"try.map" -O"try.cof" -O"try.hex" -Q -MPLAB -16F877
BUILD FAILED: Sun Dec 01 21:05:15 2013
Just for extra info, here's something i discovered: while reading the mplab manual, pic 18f452 was used as example on how to put a template file and the appropriate linker and compile. It worked. But when i tried the same thing for pic 16f877 i got "BUILD FAILED" so i wonder if the entire problem is from the pic itself.
I understand that there are much higher versions of mplab right now, but the filesizes are too huge for what i can afford to download right now so i gotta find how to do it with mplab 7.0. I'll appreciate it if someone could compile the c code successfully and tell me the exact steps used in doing so, and if the code is faulty, help me with a correct version as i only want to get this thing to work for now. And yea...sorry if my post is too long but i just had to explain the problem in detail. I'll appreciate any help whatsoever. Thanks.
1: I installed mplab 7.0.
2: I installed pic c lite 9.5 and clicked "integrate picc-lite with microchip mplab". I also clicked "Add to environment path".
3: Now in mplab, i entered project wizard, chose 16f877. For the toolsuite contents, all of them are already pointing to picl.exe in the location.
4: I chose a project name, selected a c source file "blink.c", of which the source code is as shown:
#include<htc.h>
#define _XTAL_FREQ 8000000
void main()
{
TRISB=0x00;
PORTB=0x00;
while(1)
{
PORTB=0xFF;
_delay_ms(100);
PORTB=0x00;
_delay_ms(100);
}
}
In configuration bits i set oscillator as XT, Watchdog timer off, power-up timer on. The rest i left unchanged. In the pic c compiler tab under build options, i enabled assembler optimization as level 9. Now after everything, and all the sweating and several re-installations, i still get the same thing:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC-Lite\9.50\BIN\PICL.EXE" -C -E"blink.cce" "blink.c" -O"blink.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877
Executing: "C:\Program Files (x86)\HI-TECH Software\PICC-Lite\9.50\BIN\PICL.EXE" -E"try.lde" "C:\Users\OZIEGBE\Desktop\XYX781227\Microcontrollers\Pic projects\blink.obj" -M"try.map" -O"try.cof" -O"try.hex" -Q -MPLAB -16F877
BUILD FAILED: Sun Dec 01 21:05:15 2013
Just for extra info, here's something i discovered: while reading the mplab manual, pic 18f452 was used as example on how to put a template file and the appropriate linker and compile. It worked. But when i tried the same thing for pic 16f877 i got "BUILD FAILED" so i wonder if the entire problem is from the pic itself.
I understand that there are much higher versions of mplab right now, but the filesizes are too huge for what i can afford to download right now so i gotta find how to do it with mplab 7.0. I'll appreciate it if someone could compile the c code successfully and tell me the exact steps used in doing so, and if the code is faulty, help me with a correct version as i only want to get this thing to work for now. And yea...sorry if my post is too long but i just had to explain the problem in detail. I'll appreciate any help whatsoever. Thanks.