View previous topic :: View next topic |
Author |
Message |
Vovachess
Joined: 15 Mar 2004 Posts: 33 Location: Swiss
|
Fuses in HEX file |
Posted: Mon Aug 15, 2005 8:37 am |
|
|
Hello,
I would like to include configuration bit to Hex file.
Normany If I use ccs, I do it with derective #fuses.
If I use MPLAB I cant use #fuses, I get error from compiler: Unknown keyword in #FUSES
How can I include configuration bit in HEX file using MPLAB?
Thanks |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Aug 15, 2005 8:57 am |
|
|
Are you still using CCS's compiler??? If not, then what are you using. MPLAB is just an IDE so you'll have to tell us what language toolsuite that you are using. |
|
|
Vovachess
Joined: 15 Mar 2004 Posts: 33 Location: Swiss
|
|
Posted: Mon Aug 15, 2005 9:05 am |
|
|
Ah. I found.
Configuration bit for PIC12F629 could be programmed like:
#ROM 0x2007 = {0x3FE4}
Where 0x2007 is configuration bit address
0x3FE4 is conf bit itself.
But.... It is still interesting.
I use MPlab 6.4. Compiler for the project is "CCS Compiler for 12/14/16/18"
It is still strange. If I use CCS IDE, I can use #fuse. If I use MPlab IDE
I get this strange error...... |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Aug 15, 2005 9:08 am |
|
|
Sounds like you don't have the correct device selected in MPLAB or you are using to different versions of the CCS compiler. |
|
|
Vovachess
Joined: 15 Mar 2004 Posts: 33 Location: Swiss
|
|
Posted: Mon Aug 15, 2005 9:16 am |
|
|
No I have only one version. Device is correct.
In MPlab you can set conf bit manually in Configure->Conf bit
or you can write it dirrectly to ROM like #ROM 0x2007 = {0x3FE4}
but I cant use derictive #fuse with MPLAB.
Strange.
Can you write line like
#fuse NOWDT,NOPROTECT,PUT
in MPLAB & compile it with CCS?
I get error Unknown keyword in #FUSES
Ideas why? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Aug 15, 2005 9:23 am |
|
|
Of course I could.
but its not #fuse its #fuses. You do realize that MPLAB invokes the CCS compiler through the command line interface of the compiler. I'd suggest you post a small test program that you are trying to compile and we can look to see if anything is wrong with it. The program can be as simple as
Code: |
#include <12F629.h>
#fuses HS,NOWDT,NOPROTECT
void main(void)
{
while(1);
}
|
|
|
|
Vovachess
Joined: 15 Mar 2004 Posts: 33 Location: Swiss
|
|
Posted: Mon Aug 15, 2005 9:25 am |
|
|
I get error Unknown keyword in #FUSES |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Aug 15, 2005 9:27 am |
|
|
Under Configure/Select Device, what device is shown?
What version of the compiler are you using? |
|
|
|