CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Bootloader example code compile error

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 01, 2010 1:23 pm     Reply with quote

Quote:

I create a project simply with CCS example codes as below,
bootloader.h
ex_bootloader.c
loader.c
18F452.h

Are you using MPLAB ? If so, there should be only one file listed in the
Project Window under Source files. It should be the Ex_Bootloader.c file.

I made a new project in the c:\Program Files\Picc\Examples directory
using the MPLAB Project Wizard. I gave the project the name of
Ex_Bootloader. I set up the project to use the 18F452. Then I added
the Ex_Bootloader.c file to the project and compiled it by clicking the
"Build All" button in MPLAB. It compiled with no errors.

The key point is that you should not "add" to the project all the various
files in your list above. Only the Ex_Bootloader.c file should be "added"
to the MPLAB project. If you have other files in the Source Files list in
MPLAB, then remove them.
Chill



Joined: 01 Jun 2010
Posts: 10

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:15 am     Reply with quote

Hi PCM programmer ,

Yes, I am using the MPLAB V8.50. CCS PCH V4.049

I have fully followed your procedure.
The compile error this time is,
"*** Error 18 "ex_bootloader.c" Line 41(10,20): File can not be opened"
It shows that #include <18F452.h> can not be open...


Actually I am used to assembly language, not good at C at all.

BTW, I was confused with #org. I read your post as below, it does help. Thanks.
Quote:

Posted: Sun Jan 22, 2006 12:07 am

--------------------------------------------------------------------------------

I made the following program, based on your description, and it
compiles without error with PCH vs. 3.241.
Code:

#include <18F452.H>
#fuses XT,NOWDT,NOPROTECT,BROWNOUT,PUT,NOLVP
#use delay (clock=4000000)

#build (reset = 0x0002)
#rom 0x0000 = {0x0000}

#org 0x7F00, 0x7FFF
void my_function(void)
{
char c;

c = 0x55;
}

//==================================
void main()
{

my_function();

while(1);
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 02, 2010 10:53 am     Reply with quote

Quote:
The compile error this time is,
"*** Error 18 "ex_bootloader.c" Line 41(10,20): File can not be opened"
It shows that #include <18F452.h> can not be open...

Is this your first project with CCS ? Have you ever successfully compiled
a program before ? Do you have the PCH compiler installed ? Are you
using MPLAB as the IDE for the CCS compiler ? Have you installed the
CCS "plugin" program for MPLAB ?
Chill



Joined: 01 Jun 2010
Posts: 10

View user's profile Send private message

PostPosted: Thu Jun 03, 2010 2:34 am     Reply with quote

Hi PCM programmer,

Confirmed that my PCH compiler is not installed well. Thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group