How to unprotect your PIC so you can retrive that code..

View: New views
9 Messages — Rating Filter:   Alert me  

How to unprotect your PIC so you can retrive that code..

by Peter Stuge-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I know I've needed to.

I think this is worth a read. Not really news but nicely presented. :)

http://www.bunniestudios.com/blog/?page_id=40


//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: How to unprotect your PIC so you can retrive that code..

by Robert Pearce-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 07 August 2008, Peter Stuge wrote:
>
> I think this is worth a read. Not really news but nicely presented. :)
>
I note the best justification he could come up with for a "legitimate" reason
was that the company were a bunch of complete incompetents who should be
first against the wall when the recession comes. Surely, even if they're so
stupid they've lost all the source code _AND_ the master hex file from which
they program the devices, they'd still have at least one unprotected master
device somewhere!

Microchip are very clear that their code protection feature is not robust
against a really determined cracker. I guess this just proves that.

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: How to unprotect your PIC so you can retrive that code..

by David Barnett-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 7, 2008 at 4:27 AM, Rob Pearce <rob@...> wrote:

> I note the best justification he could come up with for a "legitimate"
> reason
> was that the company were a bunch of complete incompetents who should be
> first against the wall when the recession comes.

Yep, I think I'd ditch the job if I ever depended on reading the official
machine code off of the device, not to mention modifying it. Maybe comparing
against other HEX files to find the exact rev number would be a little
better, but not a lot.

Anyway, I think he was just having a little fun rather than trying to rescue
the incompetents, and I certainly found the technical details interesting.

For the unobservant, the blog belongs to Andrew "bunnie" Huang, one of the
founders of Chumby.

David

New open USB programmer

by Anselmo Luginbuhl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

a friend of mine just designed this little USB programmer that I've used to programma some 16F636 and found very nice.

As some testing (and why not some extension) would be a good thing as the programmer is really "young", i'm doing some propaganda :-).

Personally i've used it under linux where you just have to use the
generic hiddev driver to access the hardware.


http://openprog.altervista.org

Completely free and Open Source (including firmware)
Programs PIC12-16-18 (see support)
USB interface
Self powered
Doesn't need drivers
Built from easy to find components (estimated cost ~10€)
Hardware generated timings for maximum speed (writes a 18F2550 in 15s,
8s under Linux)
Doesn't saturate CPU and doesn't suffer when other programs are running
Open source control programs for windows and linux



Anselmo


signature.asc (204 bytes) Download Attachment

RE: How to unprotect your PIC so you can retrieve that code..

by Joseph.Julicher :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Code Security

While no device is 100% secure, the first thing you should do to protect
your IP is program the parts yourself or work with the device
manufacturer to buy preprogrammed devices.  There are many cases where a
CM was asked to program the parts as part of the manufacturing and the
CM produces a clone in the factory next door with the stolen hexfile.
This is much more common than cracking code protection.


-----Original Message-----
From: David Barnett [mailto:daviebdawg@...]
Sent: Thursday, August 07, 2008 5:26 AM
To: gnupic@...
Subject: Re: [gnupic] How to unprotect your PIC so you can retrive that
code..

On Thu, Aug 7, 2008 at 4:27 AM, Rob Pearce <rob@...>
wrote:

> I note the best justification he could come up with for a "legitimate"
> reason
> was that the company were a bunch of complete incompetents who should
be
> first against the wall when the recession comes.

Yep, I think I'd ditch the job if I ever depended on reading the
official
machine code off of the device, not to mention modifying it. Maybe
comparing
against other HEX files to find the exact rev number would be a little
better, but not a lot.

Anyway, I think he was just having a little fun rather than trying to
rescue
the incompetents, and I certainly found the technical details
interesting.

For the unobservant, the blog belongs to Andrew "bunnie" Huang, one of
the
founders of Chumby.

David

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: New open USB programmer

by Byron Jeff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Aug 07, 2008 at 09:39:17AM -0400, Anselmo Luginb??hl wrote:

> Hi,
>
> a friend of mine just designed this little USB programmer that I've used to programma some 16F636 and found very nice.
>
> As some testing (and why not some extension) would be a good thing as the programmer is really "young", i'm doing some propaganda :-).
>
> Personally i've used it under linux where you just have to use the
> generic hiddev driver to access the hardware.
>
>
> http://openprog.altervista.org
>
> Completely free and Open Source (including firmware)
> Programs PIC12-16-18 (see support)
> USB interface
> Self powered
> Doesn't need drivers
> Built from easy to find components (estimated cost ~10???)
> Hardware generated timings for maximum speed (writes a 18F2550 in 15s,
> 8s under Linux)
> Doesn't saturate CPU and doesn't suffer when other programs are running
> Open source control programs for windows and linux
>
>
>
> Anselmo

Of course it has the chicken and egg problem:

---------------------
How to program the main micro the first time?

This is an interesting problem: a new device can't work as programmer, so
it must be programmed in some way.  Apart from asking someone else to do
it for you, my advice is to build one of  those serial programmers, like
JDM, to do the job the first time.  It would be a good idea to buy a backup
micro, in order to program it with updated firmware versions.
---------------------

As you have to build a programmer to build a programmer?

And most JDM style programmers won't work on modern serial hardware.

It's a real problem.

BAJ

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: New open USB programmer

by Byron Jeff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 13, 2008 at 08:13:33AM -0400, Anselmo Luginb?hl wrote:
> On Fri, Aug 08, 2008 at 05:57:47PM +0000, Byron Jeff wrote:
> >
> > Of course it has the chicken and egg problem:
> >
>
> You're perfectly right but it's difficult to build any minimally complex
> programmer without encountering the chicken and egg problem.

It didn't used to be that way. Serial and parallel programmers used to work
just fine. But USB have pretty much killed both ports on a lot of machines
and the USB serial interfaces are not up to spec, so simple programmers are
not easy to put together anymore.

> > ---------------------
> > How to program the main micro the first time?
> >
> > This is an interesting problem: a new device can't work as programmer, so
> > it must be programmed in some way.  Apart from asking someone else to do
> > it for you, my advice is to build one of  those serial programmers, like
> > JDM, to do the job the first time.  It would be a good idea to buy a backup
> > micro, in order to program it with updated firmware versions.
> > ---------------------
> >
> > As you have to build a programmer to build a programmer?
> >
> > And most JDM style programmers won't work on modern serial hardware.
> >
> > It's a real problem.

> That's true but from a pratical point of view, for the moment, you can
> just choose a simple serial programmer with external power supply (if
> you're using an usb serial adapter)

Nope. In general it won't work because all serial programmers I know of
require syncronized modem control signals, and modem control signals are
not syncronized on USB serial cables, if those modem control signals work
at all.

Pretty much the only guarantees you can expect from a USB serial adapter is
that you'll get a properly timed TX signal and that you'll have a minimum
range of 0V to 3V, though since USB will have a 5V power signal, that 5V
most likely be around.

JDM expects a true blue EIA-232 serial port with properly syncronized modem
control signals. Connecting one to a USB serial cable is an exercise in
frustration.

> or as an alternative it's easy to
> find someone with a serial port or a friend that could program the pic
> for you. Or as a last resort ask someone to programm the first one for
> you and send it by mail.

The truth of the matter is that if you're going to go through all that
trouble, that investing in a PicKit2 is probably a better bet anyway.

>
> So the problem is fisolofically interesting but it's a real problem in
> the real world?

In the real world you don't need to build a programmer anymore, so of
course not. So it's always a philsophical discussion.

The bar I use is called the Radio Shack test. Can I walk into a Radio Shack
at 3PM on a Sunday afternoon a get what I need to get the project done by
Sunday evening. My Trivial PIC programmer:

http://www.finitesite.com/d3jsys

used to pass that test until Radio Shack fianlly pulled the 74HCT line of
chips from the stores. I started a project to build a 555 based serial
programmer called the Trivial BootStrapper 555:

http://www.finitesite.com/d3jsys/tbs555

The hardware actually works. The 555 generates a clock signal for each
transmitted octet on the serial port. So each octet generates one bit of
data to program the PIC. The two remaining problems are that there's no
verification, and there's no programming software. The software probably
could be adapted pretty easily from Wouter von Ooijen's ZPL Python
software:

http://www.circuitcellar.com/flash2002/honorable.htm

because it uses the same TX principle and can read Intel Hex files. All
that would need to be added is the programming algorithm for the particular
chip. Actually all you really need is a converter that takes in an Intel
hex file and outputs a string of characters. then any terminal program can
be used to dump the file into the chip. That conversion could even be a web
service. Hmmm.

As for verification, the PIC software can self verify that it's been loaded
properly.

The key thing is that the bootstrap programmer is junkbox or a throwaway.
So it needs to be simple, buildable from easily available components, and
somewhat reliable.

BTW I lifted the bootstrap programmer idea wholesale from Tony Nixon. He
put together such a programmer about 10 years ago or so from the 16F84. You
can find his project here:

http://techref.massmind.org/techref/com/picnpoke/www/http/projects/prog.html

BAJ

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: New open USB programmer

by Anselmo Luginbuhl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Aug 08, 2008 at 05:57:47PM +0000, Byron Jeff wrote:
>
> Of course it has the chicken and egg problem:
>

You're perfectly right but it's difficult to build any minimally complex
programmer without encountering the chicken and egg problem.

> ---------------------
> How to program the main micro the first time?
>
> This is an interesting problem: a new device can't work as programmer, so
> it must be programmed in some way.  Apart from asking someone else to do
> it for you, my advice is to build one of  those serial programmers, like
> JDM, to do the job the first time.  It would be a good idea to buy a backup
> micro, in order to program it with updated firmware versions.
> ---------------------
>
> As you have to build a programmer to build a programmer?
>
> And most JDM style programmers won't work on modern serial hardware.
>
> It's a real problem.
That's true but from a pratical point of view, for the moment, you can just choose a simple serial programmer with external power supply (if you're using an usb serial adapter) or as an alternative it's easy to find someone with a serial port or a friend that could program the pic for you. Or as a last resort ask someone to programm the first one for you and send it by mail.

So the problem is fisolofically interesting but it's a real problem in
the real world?
>
> BAJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@...
> For additional commands, e-mail: gnupic-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...


Re: USB programmer and test environment

by Jean-Daniel Nicoud :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Friends,
I follow your messages for a long time, but I am a hardware guy.
I have developped many PIC systems for didactic purposes, for robots,
for many applications.
It is not worth to loose time with serial or parallel programmers.
I like the Pickit2 USB programmer, cheap and it can be used as an
UART-USB interface when it has finished its work of programming your Hex
file. It encouraged me to develop a set of boards that makes both
learning and development more easy. Have a look to http://www.didel.com/ 
It's brand new, so I put the links on the top of the page.
All the best  JD
--
DIDEL Jean-Daniel Nicoud nicoud@...  Tel +41 21 728-6156 Fax -6157
http://www.didel.com   DIDEL SA  Mouette 5 CH-1092 Belmont   Switzerland

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...