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

Fuses in HEX file

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



Joined: 15 Mar 2004
Posts: 33
Location: Swiss

View user's profile Send private message Visit poster's website ICQ Number

Fuses in HEX file
PostPosted: Mon Aug 15, 2005 8:37 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 15, 2005 8:57 am     Reply with quote

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

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Mon Aug 15, 2005 9:05 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 15, 2005 9:08 am     Reply with quote

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

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Mon Aug 15, 2005 9:16 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 15, 2005 9:23 am     Reply with quote

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

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Mon Aug 15, 2005 9:25 am     Reply with quote

I get error Unknown keyword in #FUSES
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Mon Aug 15, 2005 9:27 am     Reply with quote

Under Configure/Select Device, what device is shown?
What version of the compiler are you using?
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