Is there a way to prevent someone from extracting the hex file from the PIC Chip ?

Status
Not open for further replies.

Bracer

New Member
Is there a way to prevent someone from extracting the hex file from the PIC Chip ?

I was surprise [good and bad] when I realize that using my programmer and its accompanying software, that I could "extract" the hex file from it.

Is there a way to "fuse" it in ?
 
Last edited:
Is that in the Compiler or Programmer ?

In either, generally it's best to set the config fuses in the source code though - but not to add code protection until you've finished debugging.

But really, do you NEED code protection? - only if you're selling a comercial product perhaps?.
 
So the config fuses have the ability to create a sort of hex files that can somehow make itself un-extractable after being placed in the chip ?
How ?
I don't mind sharing my works, but I just don't want people to extract the code without my permission.
 

It's a setting inside the chip, that prevents it been read.

But as I said, unless you're selling a commercial product I would recommend VERY strongly that you don't code protect your PIC's - it's pretty pointless.
 
I would recommend VERY strongly that you don't code protect your PIC's - it's pretty pointless.

Why? As I understand it, it is possible to clear the code protection by erasing the whole chip. No damage done to the chip etc. I agree that it is pretty pointless, but if he wants to try it there is no reason why he shouldn't.
 
Why? As I understand it, it is possible to clear the code protection by erasing the whole chip. No damage done to the chip etc. I agree that it is pretty pointless, but if he wants to try it there is no reason why he shouldn't.

Why?, because it's pointless - and the next post will be asking how to read a protected chip because his computer has crashed and he's lost everything!.
 
Why?, because it's pointless - and the next post will be asking how to read a protected chip because his computer has crashed and he's lost everything!.

I was hoping for some real reasons.. Its been a while since I used PICs, but with AVRs I use code protection all the time to protect my bootloader getting overwritten during development etc.
 
I was hoping for some real reasons.. Its been a while since I used PICs, but with AVRs I use code protection all the time to protect my bootloader getting overwritten during development etc.

How does code protection prevent your bootloader getting written over?.
 
How does code protection prevent your bootloader getting written over?.

AVRs have application and bootloader memory sections. The bootloader memory comes right after the application memory and can be used as application memory if no bootloader is used. So, if I accidentally try to write "too large" program into the application memory, it would overwrite the bootloader if its not write protected. There are separate lock-bits for application and bootloader memory.

Of course, write protecting the bootloader is not the same as locking the whole chip, but I don't see any reason why protecting the whole chip should be very strongly opposed (if the lock can be opened by erasing the chip). Computer crashing soon after programming is almost equally paranoid than somebody stealing your hex file

But of course I agree with your point.. it is very pointless to use code protection in a hobby project.
 
Last edited:
If someone wants my code (in excess of 24k) it will take quite a bit of time, after disassembly, to get it back to a readable state... let them waste their time!!

Ian
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…