|
|
View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 01, 2010 1:23 pm |
|
|
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
|
|
Posted: Wed Jun 02, 2010 10:15 am |
|
|
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
|
|
Posted: Wed Jun 02, 2010 10:53 am |
|
|
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
|
|
Posted: Thu Jun 03, 2010 2:34 am |
|
|
Hi PCM programmer,
Confirmed that my PCH compiler is not installed well. Thanks. |
|
|
|
|
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
|