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 support@ccsinfo.com

Change to Fuses in device file for PIC16LF18856

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



Joined: 11 Jun 2013
Posts: 35
Location: Cape Town

View user's profile Send private message

Change to Fuses in device file for PIC16LF18856
PostPosted: Mon Mar 25, 2019 10:51 am     Reply with quote

So, recently installed PCM 5.083. Today I tried to compile some production code for a PIC16LF18856 using the new version, got a compiler error:
Code:
W:\MPLABX_Production\xxx\yyy_Header.h:71:7:  Error#111  Unknown keyword in #FUSES   "PROTECT"


Checking the device file, shows the previous header had "PROTECT" as a valid option, the current version does not.

Any ideas? Is there some change I am not aware of or an error in the device file?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 25, 2019 11:16 am     Reply with quote

It's clearly a bug, because the 16LF18856 data sheet shows the CP and CPD
fuses in Config Word 5. Report it to CCS.

If you have the full IDE, you could edit the device file.
blowtorch



Joined: 11 Jun 2013
Posts: 35
Location: Cape Town

View user's profile Send private message

PostPosted: Mon Mar 25, 2019 1:13 pm     Reply with quote

Thanks PCM. I do have the full IDE, will give it a go (and report it).

Recently upgraded to cover the 16 bit PICs too, very excited to give them a go.
Ttelmah



Joined: 11 Mar 2010
Posts: 19328

View user's profile Send private message

PostPosted: Mon Mar 25, 2019 1:33 pm     Reply with quote

As a comment, you can also do it without having to edit the file.
#FUSES will also accept an address and a hex value, so you can
just explicitly set the required pattern.
So for instance:

#FUSES 1=0xFFFF

Will set word one of the fuses to 0xFFFF.

So look at the .lst from one of your old compiles, and set the right
byte pattern into the location that controls the protection.
blowtorch



Joined: 11 Jun 2013
Posts: 35
Location: Cape Town

View user's profile Send private message

PostPosted: Mon Mar 25, 2019 4:42 pm     Reply with quote

Thanks Ttelmah. Nice tip!

I have logged it BTW.
Ttelmah



Joined: 11 Mar 2010
Posts: 19328

View user's profile Send private message

PostPosted: Tue Mar 26, 2019 3:06 am     Reply with quote

It's interesting. If you read the 'readme' for this compiler, they have been
playing with the meaning of 'PROTECT'. Making it now protect the whole
of memory, where it previously omitted the bootblock. You now have to
explicitly exclude the bootblock if you want the old behaviour. Suggest in
that doing this change, they have managed to make it not work on some
chips....
blowtorch



Joined: 11 Jun 2013
Posts: 35
Location: Cape Town

View user's profile Send private message

PostPosted: Tue Mar 26, 2019 3:31 am     Reply with quote

Yes. Afraid I am guilty of omitting a thorough read of the readme.

CCS support emailed me a new devices file, problem fixed.

I need to install updates to separate folders I think. Choosing to keep previous versions means the DLL folder per version is retained, but that is only part of the story. The readme also states "The command line compiler has a new command line option to set the compiler version. For example: CCSC +FH VERSION=5.006 test.c"
Thats all very well, but I use MPLABX as IDE, which supports multiple configurations, but it would seem to me they would need to be installed to different folders in it's entirety.
Ttelmah



Joined: 11 Mar 2010
Posts: 19328

View user's profile Send private message

PostPosted: Tue Mar 26, 2019 4:38 am     Reply with quote

Yes. I always install into different directories. So PICC5083 for the latest
compiler.
However there is an issue that MPLAB, insists on finding all the compilers.
Trying to disable this with the exclusion syntax doesn't seem to be reliable.
Currently the nicest way, is to keep a separate virtual machine for each
compiler I want to use. Makes it really tidy, and ensures there is no
interference between the versions....
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