Searching \ for '[PIC] PIC24 bootstrap loader implementation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'PIC24 bootstrap loader implementation'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PIC24 bootstrap loader implementation'
2009\04\29@121918 by Mark E. Skeels

flavicon
face
(Oops, forgot tag....)

Hello, PIClist.

After working my way through App note AN1094
<http://ww1.microchip.com/downloads/en/AppNotes/01094a.pdf> it appears
that to set up this bootloader I need to

  * Modify the sample bootloader target app to use the proper UART for
    my hardware.
  * Modify the bootloader linker script for my PIC24 to place
    bootloader code at 0x400.
  * Build the target bootloader app in MPLab using the above linker
    script for my PIC.
  * Program it into the PIC24.
  * Modify/Add the directives on p. 6 of the app note to the linker
    file for my PIC24 main application  to load code at _0xc00_ and
    also to specify the absolute delay _location_ and _value_ for the
    bootloader and put it in the memory map at 0xc00.(***)
  * Build my main PIC24 app using the second modified linker script.

At this point, I could use my PIC24 hardware with installed bootloader
and the supplied Windows console bootloader app to load my application
into the PIC24 hardware, or I could somehow combine the two hex files
into one and program the entire thing in production.

 1. Does that sound right/anything I missed?
 2. Do I need to consider any other factors or gotchas?
 3. Anybody use this in a production environment and have comments or
    insights?

Thanks PICsters,
Mark

(***)

/(modify /ORIGIN/ and /LENGTH/ in this line) /program (xr) : ORIGIN =
0xC00, LENGTH = 0x29E00
/(modify /CODE_BASE/ value in this line) /__CODE_BASE = 0xC00; /*
Handles, User Code, Library Code */
/*
** User Code and Library Code
*/
.text __CODE_BASE :
{/
(add this line) /SHORT(0x0A); /* Bootloader timeout in sec */
*(.handle);
*(.libc) *(.libm) *(.libdsp);
*(.lib*);
*(.text);
} >program

2009\04\29@133815 by Mark E. Skeels

flavicon
face
Hmmm.  that's interesting; I see why you did it.

I like:

   * One app instead of two
   * more robust bootloader process

I don't like:

   * external flash

Mark

Harold Hallikainen wrote:
{Quote hidden}

2009\04\29@140040 by Harold Hallikainen

face
flavicon
face

> Hmmm.  that's interesting; I see why you did it.
>
> I like:
>
>     * One app instead of two
>     * more robust bootloader process
>
> I don't like:
>
>     * external flash
>
> Mark

Because I needed to bootload over Ethernet, I didn't want to try to fit
Ethernet code in the boot section. Microchip does have an Ethernet
bootloader for the 18 series, but not the 24. I think they are using tftp
and putting it in the boot section. With my Ethernet approach, no special
application is required to bootload. Just run a browser. So, the
bootloader uses the application, which the bootloader is going to
overwrite. So, that's why I need the external flash. Some place to store
the new code before I overwrite my application. The external flash is an 8
pin SPI part, not too expensive (M25P16) that I use in various other
projects.

Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2009\04\29@181917 by Vitaliy

flavicon
face
Mark,

We recently wrote our own bootloader for the PIC24H. It is very robust,
works over UART, and has 128-bit AES encryption.

Is this something you plan to use in a commercial setting (e.g., is this
something you would pay real money for)?

Vitaliy


{Original Message removed}

2009\04\30@084238 by Mark E. Skeels

flavicon
face
Vitaliy,

I have to write one for a product I'm designing.

It'll take time; so cost money.

We might be interested if you're offering. :-)

Mark Skeels
Engineer
Competition Electronics, Inc.
TEL: 815-874-8001
FAX: 815-874-8181
http://www.competitionelectronics.com


Vitaliy wrote:
{Quote hidden}

> {Original Message removed}

2009\04\30@133938 by Vitaliy

flavicon
face
Mark E. Skeels wrote:
>> We recently wrote our own bootloader for the PIC24H. It is very robust,
>> works over UART, and has 128-bit AES encryption.
>>
>> Is this something you plan to use in a commercial setting (e.g., is this
>> something you would pay real money for)?
>>
> I have to write one for a product I'm designing.
>
> It'll take time; so cost money.
>
> We might be interested if you're offering. :-)

Can you describe your requirements, in more detail? Offlist if you want.

We designed the bootloader for use with our products, but there is no reason
why it wouldn't work for other applications. It is really just a generic
PIC24H bootloader, with some advanced features. In addition to encryption it
supports programming product IDs, unique serial numbers, "feature keys",
etc.

The process of using it is very straightforward:

- Program the PIC with the bootloader
- Use a programmer utility to initialize the device (assign product
ID/serial number, etc) and to program the application firmware via UART.
Initialization can be made optional.

The programmer utility takes encrypted hex files that contain the
application firmware. Once the device is initialized, it cannot be
initialized again (short of erasing everything and going back to step 1). In
our setup, we use a barcode scanner to scan the serial numbers from a label
affixed to the device, to program this serial number into the PIC. The
process was designed and optimized for use in a contract manufacturer
environment.

There's also a stripped-down version of the programmer utility (the
"Updater") which is provided to end users. They can use the same encrypted
hex files to update the application firmware in the field.

There are several options we are considering for licensing the bootloader:

- Full source code
- Hex only (you still get the linker file to use w/ your app)
- Programming PICs with the bootloader

Best regards,

Vitaliy

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...