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

Target not protected - Even after protection fuse used.

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



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

Target not protected - Even after protection fuse used.
PostPosted: Thu Feb 26, 2015 1:27 am     Reply with quote

Hi all,

I am hoping someone can help me.

Compiler Version: 5.042
CCSLoad Version: 5.010

I am programming 16F887 with the following fuses:

Code:

#FUSES NOFCMEN
#FUSES NOIESO
#FUSES NOWDT
#FUSES HS       
#FUSES BROWNOUT         
#FUSES BORV40
#FUSES NOLVP               
#FUSES MCLR
#FUSES PROTECT
#FUSES PUT

After programming i still keep getting - Target not protected.
I have used the #FUSE PROTECT.

Thanks and Regards,
Jay


Last edited by jaikumar on Thu Feb 26, 2015 1:33 am; edited 1 time in total
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 1:33 am     Reply with quote

Also tried adding the fuse below:

Code:

#FUSES WRT_1000


Still getting code not protected
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 1:39 am     Reply with quote

1. Look at the fuses at the end of your .LST file. What do they show ?
Post them.

2. Are you compiling with your IDE set for Debug mode, or Release mode ?
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 1:48 am     Reply with quote

Here is listing from List File:

Code:


Configuration Fuses:
   Word  1: 2322   HS NOWDT PUT MCLR PROTECT CPD BROWNOUT NOIESO NOFCMEN NOLVP NODEBUG
   Word  2: 39FF   BORV40 WRT_1000

Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 2:49 am     Reply with quote

Well, the protect fuse is there in what the compiler is sending to the programmer.

Take us through your exact configuration. You are coding in the IDE or the command line, or through MPLAB?. Then you are writing the code to the chip directly with CCSLoad?. What is the actual programmer?.

One thought. In CCSLoad, top right corner of the screen (on current versions), column labelled 'options'. You have got the 'config bits' tab ticked?. Otherwise the fuses won't be written, so the protection won't be set....
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 5:04 am     Reply with quote

I use Mach-X to program the 40 pin 16F887
I use the CCS editor to edit and compile the code
And then the ccs load loads the program after i compile.

In the options the Config bits is ticked.
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 8:08 am     Reply with quote

Do the simplest test.

Load the file into CCSLoad.
Select the 'file' option from the top bar.
Select the 'configuration/ID' window from the selectors on the right of the window.
Scroll down this.
What does the tick box 'Code protected from reads' show?.
What does the tick box 'Data EEPROM code protected' show?.

If both of these are selected (they are in the fuses you post), then the problem is in the programmer.

One other programmer setting affects this. If you click on the expand button for the options, make sure the erase mode is set to 'bulk erase chip before programming', and the tick box 'verify ROM protect after write' is set.

If it still doesn't work, you need to talk to CCS.
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 11:29 pm     Reply with quote

Dear Ttelmah,

I have tried all the suggestions that you have advised.
Still it does not work.
I think i have faced this problem before and at that time
i found that if i use older ccsload program say version 4.010 or something it
worked ok.
unfortunately i cleaned up computer and don't have any older version of
ccsload.

Only thing is i don't know why although this error remains nobody has intimated CCS or wonder why they have not fixed it.
I think not many use MACH-X programmer.

Regards,
Jay


Last edited by jaikumar on Fri Feb 27, 2015 12:10 am; edited 1 time in total
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Feb 26, 2015 11:33 pm     Reply with quote

Good News. When i try to program the PIC12F675 with the code protect
fuse. It works OK.

So i will email CCS about this problem.

Thanks all.
Ttelmah



Joined: 11 Mar 2010
Posts: 19529

View user's profile Send private message

PostPosted: Fri Feb 27, 2015 8:56 am     Reply with quote

While they should fix it, it is worth asking why you want protection on this?. The Mach-X, is a development programmer, not a production device, and protection should never be enabled during development (just wastes life cycles of the chip). While a lot of my production code is protected, I can't even think of when I last turned protection 'on' during development....
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Sat Feb 28, 2015 12:55 am     Reply with quote

Well I have a very small company. Where i program about 30 micros per month for production and the Mach-X suits me just fine.
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Sat Mar 14, 2015 4:47 am     Reply with quote

From CCS

Quote:

The problem you reported has been fixed and will be in the
next compiler release.


Hopefully other in the same boat can be happy that it will be fixed.
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