View previous topic :: View next topic |
Author |
Message |
blowtorch
Joined: 11 Jun 2013 Posts: 35 Location: Cape Town
|
Change to Fuses in device file for PIC16LF18856 |
Posted: Mon Mar 25, 2019 10:51 am |
|
|
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
|
|
Posted: Mon Mar 25, 2019 11:16 am |
|
|
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
|
|
Posted: Mon Mar 25, 2019 1:13 pm |
|
|
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: 19496
|
|
Posted: Mon Mar 25, 2019 1:33 pm |
|
|
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
|
|
Posted: Mon Mar 25, 2019 4:42 pm |
|
|
Thanks Ttelmah. Nice tip!
I have logged it BTW. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Tue Mar 26, 2019 3:06 am |
|
|
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
|
|
Posted: Tue Mar 26, 2019 3:31 am |
|
|
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: 19496
|
|
Posted: Tue Mar 26, 2019 4:38 am |
|
|
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.... |
|
|
|