Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help in building project in MPLAB C18 C compiler for PIC18f452

Status
Not open for further replies.

stupidalbert

New Member
Hi, I'm new to PIC18f452 and I want to build a project using MPLAB IDE v8.00 and I've installed the MPLAB-C18-Std-Eval-v3_33 as well. I'm using ICD2 as the loader.

When i was trying to build the project, I followed the instructions from MPLAB C18 C Compiler Getting Started but it didnt' work. It shows the following messages when I Build All/Make the project:

Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\My project\albert.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPLAB IDE\Core\MPLAB.exe" -p=18F452 /i"C:\MCC18\h" "C:\MCC18\example\getting_started\program1\main.c" -fo="main.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Executing: "C:\Program Files\Microchip\MPASM Suite\MPLink.exe" /l"C:\MCC18\lib" "C:\Program Files\Microchip\MPASM Suite\LKR\18f452.lkr" "C:\My project\main.o" /m"albert.map" /w /o"albert.cof"
MPLINK 4.14, Linker
Copyright (c) 2007 Microchip Technology Inc.
Error - could not find file 'C:\My project\main.o'.
Errors : 1

Link step failed.
BUILD FAILED: Thu Oct 08 14:43:29 2009

Can somebody give me some suggestions to build a project.
 

Pommie

Well-Known Member
Most Helpful Member
I just made a project with this as the main code,
Code:
#include <p18f452.h>

#pragma config WDT = OFF, LVP = OFF, OSC = HS, DEBUG = OFF

void main(void){
char i;
    ADCON1=0x07;
    while(1);
}

I didn't add a linker script and it compiles fine.

Mike.
 

stupidalbert

New Member
Thx Mike,
when i tried to use the simple example code "Hello World" to compile and build project. It doesn't work and show the messages.
 

stupidalbert

New Member

Attachments

  • 1.JPG
    1.JPG
    84 KB · Views: 407
Status
Not open for further replies.

Latest threads

Top