> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Wouter van Ooijen > Sent: 07 May 2008 21:38 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] another bootloader question > > >> So how do you re-bootload once Murphy has succeeded in bootloading an > >> image (with correct checksum) that refuses to bootload? > > > > The bootloader is only for the convenience of our customers, so any > > firmware images will be thoroughly tested before being released. In the > > lab or production facility we use a JTAG interface to program the > > devices. > > That approach is (of course) feasible if the chance of uploading a > non-cooperative image is 'sufficiently small' compared to the cost of > re-programming using another mechanism (or the loss of the device). > There is another mechanism I didn't mention, the code is small enough to fit into just under half of the micro's code memory, so it can fit two images + the bootloader. Ideally the code would be made relocatable so it could run at either position, so you could potentially roll back to a previous version. In practice we don't do this for various reasons, but the bootloader always downloads an image to the upper memory area before performing it's checksum. If it passes it's copied to the lower memory area and execution jumps to the new code. If power is cut either during the bootload, or during the copy, there is always a workable image that can either be executed, or copied down to the lower memory area and executed. Since this is a fairly low volume, fairly high cost product (the micro cost is dwarfed by other components), the extra cost of a larger memory device is negligible. I appreciate this may not be the case for many people. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist