View previous topic :: View next topic |
Author |
Message |
agumus
Joined: 20 Feb 2005 Posts: 0
|
MPLAB IDE v6.30 Config Problem |
Posted: Sun Feb 20, 2005 6:49 am |
|
|
Hi,
I create a new simple project with this IDE using its own wizard. Then include my "lcd.c" file into project.
The main file is as folows
#include<16f877.h>
#fuses HS,WDT,NOPROTECT, BROWNOUT, NOLVP, PUT
#use delay(clock=20000000)
#include "C:\Documents and Settings\ahmet.AG-FN6W0PZ5QMA1\Desktop\den\lcd.c"
void main(){
int a = 5;
a=a*4;
}
When I try to compile, it produces an error like this :
/******************/
Deleting intermediary files... done.
Executing: "C:\Program files\Picc\CCSC.exe" "dd.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
Memory usage: ROM=0% RAM=2% - 2%
Executing: "C:\Program files\Picc\CCSC.exe" "lcd.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
*** Error 128 "C:\Documents and Settings\ahmet.AG-FN6W0PZ5QMA1\Desktop\den\lcd.c" Line 3(1,1): A #DEVICE required before this line
Halting build on first failure as requested.
BUILD FAILED: Sun Feb 20 14:33:18 2005
/*****************/
I tried various including syntaxes, but nothing changes
Can anyone help me, please?
Thanks in Advance.... |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Feb 20, 2005 9:19 am |
|
|
You can only have 1 source file with the ccs compiler listed in the project window. Any other source files must be included in the source file of the main source. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sun Feb 20, 2005 7:47 pm |
|
|
Quote: | *** Error 128 "C:\Documents and Settings\ahmet.AG-FN6W0PZ5QMA1\Desktop\den\lcd.c" Line 3(1,1): A #DEVICE required before this line | Here the compiler tells you there is a problem in your lcd.c
Please post the first 10 lines of this file. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Feb 20, 2005 8:19 pm |
|
|
ckielstra wrote: | Quote: | *** Error 128 "C:\Documents and Settings\ahmet.AG-FN6W0PZ5QMA1\Desktop\den\lcd.c" Line 3(1,1): A #DEVICE required before this line | Here the compiler tells you there is a problem in your lcd.c
Please post the first 10 lines of this file. |
Notice his output that he posted. See there are at least 2 files getting compiled. Big clue |
|
|
agumus
Joined: 20 Feb 2005 Posts: 0
|
MPLAB Config Problem |
Posted: Mon Feb 28, 2005 11:38 am |
|
|
Hi,
I forgot to mention one thing that the same approach works when I use MPLAB v5.70. So that, there isn't any problem with the source file "lcd.c"
I thing that the problem occurs when I use MPLAB v6.30
For your information, thanks. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1937 Location: Norman, OK
|
|
Posted: Mon Feb 28, 2005 12:03 pm |
|
|
Agumus,
What Mark is trying to tell you is that the CSS compiler does NOT have a linker and you cannot compile two separate files and link them as the MPLAB output is indicating. This will not work in ANY version of MPLAB.
Your settings are wrong in MPLAB. Take file LCD.C off the compile list so MPLAB wont try to compile it separately.
Code: |
Executing: "C:\Program files\Picc\CCSC.exe" "dd.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
Memory usage: ROM=0% RAM=2% - 2%
Executing: "C:\Program files\Picc\CCSC.exe" "lcd.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
|
The output is telling you the first compile of DD.C was fine. That is all that should have happened if you have LCD.C "included" in the DD.C file.
The second compiler output line with lcd.c in it should not appear. |
|
|
|