piclist 2006\01\26\100427a >
Thread: Community ed class
www.piclist.com/techref/microchip/devices.htm?key=pic
face picon face BY : email (remove spam text)(Olin Lathrop)



Gerhard Fiedler wrote:
> If you don't write-protect the configuration registers, you could
> write-protect the boot block in the bootloader after writing the
> application code. Which would make it a two-step process for a "bad"
> application to take the bootloader out: it would have to change the
> write protection for the boot block in the configuration register, then
> take over the boot vector by writing to it. Maybe that's good enough...
> at least good enough against accidentally taking over?
>
> Probably the only safe way is to put the bootloader in the boot block
> and to write protect both the boot block and the configuration
> registers. But this requires that the application is linked to start at
> an address above the bootloader. (If there wasn't the issue with code
> pages, this would look different :)

I think you are making this way to complicated.  In practise I've never seen
an application accidentally write over a bootloader on a PIC.  It can
theoretically happen, and probably has, but it is very rare.  How many
TBLWRT instructions does your app have?  Unless it's a bootloader, probably
none.  A few apps may modify an occasional table based on calibration data
or whatever, but this is a small minority of apps.  A buggy app could start
executing data as instructions, which could in theory write to program
memory, but this requires a very unusual alignment of quite a few stars.
The worst danger is from a buggy app that contains deliberate code for
writing to program memory.  This is not something a beginner would be doing.


******************************************************************
Embed Inc, Littleton Massachusetts, (978) 742-9014.  #1 PIC
consultant in 2004 program year.  http://www.embedinc.com/products
<001901c62289$f89e0f90$780010ac@radianse.com> 7bit

See also: www.piclist.com/techref/microchip/devices.htm?key=pic

Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Community ed class

month overview.

new search...