EmbeddedRelated.com
Forums

available bootloaders

Started by davep575 June 29, 2006
Is there any bootloader source code available anywhere that will allow
me to program a device through a uart? The user won't have access to
the /RST or TEST pins, so everything must be done through a uart.

Beginning Microcontrollers with the MSP430

The bootloader (BSL) is available in every MSP430F1xx, F2xx (except
the F20xx), and F3xx in the from of a small ROM at 0x0C00-0x0FFF.

This BSL do not use the hardware UART (even if there is one on that
chip). For F1xx/F2xx, they are bit-banging P2.2 as RxD and P1.1 as
TxD. For F4xx, they use P1.1 for RxD and P1.0 for TxD.

Using nRST pin and TEST/TCK pin is just one way to tell the CPU to
start executing the BSL code at 0x0C00. Your code can also jump to
that location and start the BSL without accessing nRST and TEST/TCK
pins. But you have to use P2.2 (or P1.1 for F4xx) as RxD and P1.1 (or
P1.0 for F4xx) as TxD.

You can also write your own BSL as part of your firmware. This way
you can use the hardware UART and assign the pins the way you want. I
have done so and I included encryption so that I can distribute
firmware updates freely.

TI Application Reports: slaa089c.pdf and slaa096b.pdf have all the
details.

Paul Curtis of Rowley kindly provided me with a skeleton project that allows
two programs to be placed in ROM. Simply build and load the Loader project
into the MSP. For test purposes, build and load the Application (Loadee?).
When the machine is reset, the Loader program is executed, if there is a
valid image in ROM (Loadee), it vectors to this image, otherwise it sits and
does nothing. This is where you write a handler for the UART to except an
image over the serial and write this into ROM yourself at the address of the
Loadee vector.

/Bill

-----Original Message-----
From: m... [mailto:m...]On Behalf Of
davep575
Sent: Thursday, June 29, 2006 10:57 AM
To: m...
Subject: [msp430] available bootloaders
Is there any bootloader source code available anywhere that will allow
me to program a device through a uart? The user won't have access to
the /RST or TEST pins, so everything must be done through a uart.



Wow thats great Bill,

Is it possible to share the skeleton project from Paul?
Doing a loader had always been one of the things I wanted to try with
the MSP ;-)

Cheers,
Nev

--- In m..., "william sell" wrote:
>
> Paul Curtis of Rowley kindly provided me with a skeleton project
that allows
> two programs to be placed in ROM. Simply build and load the Loader
project
> into the MSP. For test purposes, build and load the Application
(Loadee?).
> When the machine is reset, the Loader program is executed, if there is a
> valid image in ROM (Loadee), it vectors to this image, otherwise it
sits and
> does nothing. This is where you write a handler for the UART to
except an
> image over the serial and write this into ROM yourself at the
address of the
> Loadee vector.
>
> /Bill
>
> -----Original Message-----
> From: m... [mailto:m...]On
Behalf Of
> davep575
> Sent: Thursday, June 29, 2006 10:57 AM
> To: m...
> Subject: [msp430] available bootloaders
> Is there any bootloader source code available anywhere that will allow
> me to program a device through a uart? The user won't have access to
> the /RST or TEST pins, so everything must be done through a uart.
>
>
>
>

I am sure that Paul would not mind, but that really would be for him to
answer. I know he was planning on placing this in the public domain with
some application note as it was not too obvious (at least to me!). Of
course, you will need to use the Rowley compiler, but I think that the
concept would be also applicable to the IAR compiler...

/Bill
-----Original Message-----
From: m... [mailto:m...]On Behalf Of
qpoint77
Sent: Monday, July 03, 2006 5:43 PM
To: m...
Subject: [msp430] Re: available bootloaders
Wow thats great Bill,

Is it possible to share the skeleton project from Paul?
Doing a loader had always been one of the things I wanted to try with
the MSP ;-)

Cheers,
Nev

--- In m..., "william sell" wrote:
>
> Paul Curtis of Rowley kindly provided me with a skeleton project
that allows
> two programs to be placed in ROM. Simply build and load the Loader
project
> into the MSP. For test purposes, build and load the Application
(Loadee?).
> When the machine is reset, the Loader program is executed, if there is a
> valid image in ROM (Loadee), it vectors to this image, otherwise it
sits and
> does nothing. This is where you write a handler for the UART to
except an
> image over the serial and write this into ROM yourself at the
address of the
> Loadee vector.
>
> /Bill
>
>
>
> -----Original Message-----
> From: m... [mailto:m...]On
Behalf Of
> davep575
> Sent: Thursday, June 29, 2006 10:57 AM
> To: m...
> Subject: [msp430] available bootloaders
>
>
> Is there any bootloader source code available anywhere that will allow
> me to program a device through a uart? The user won't have access to
> the /RST or TEST pins, so everything must be done through a uart.
>
>
>
>
>
>
>
>



Bill can share it. There's no deep magic in the scheme.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

> -----Original Message-----
> From: qpoint77 [mailto:s...@gmail.com]
> Sent: 04 July 2006 01:43
> To: m...
> Subject: [msp430] Re: available bootloaders
>
> Wow thats great Bill,
>
> Is it possible to share the skeleton project from Paul?
> Doing a loader had always been one of the things I wanted to
> try with the MSP ;-)
>
> Cheers,
> Nev
>
> --- In m..., "william sell" wrote:
> >
> > Paul Curtis of Rowley kindly provided me with a skeleton project
> that allows
> > two programs to be placed in ROM. Simply build and load the Loader
> project
> > into the MSP. For test purposes, build and load the Application
> (Loadee?).
> > When the machine is reset, the Loader program is executed,
> if there is
> > a valid image in ROM (Loadee), it vectors to this image,
> otherwise it
> sits and
> > does nothing. This is where you write a handler for the UART to
> except an
> > image over the serial and write this into ROM yourself at the
> address of the
> > Loadee vector.
> >
> > /Bill
> >
> >
> >
> > -----Original Message-----
> > From: m... [mailto:m...]On
> Behalf Of
> > davep575
> > Sent: Thursday, June 29, 2006 10:57 AM
> > To: m...
> > Subject: [msp430] available bootloaders
> >
> >
> > Is there any bootloader source code available anywhere
> that will allow
> > me to program a device through a uart? The user won't
> have access to
> > the /RST or TEST pins, so everything must be done through a uart.
> >
> >
> >
> >
> >
> >
> >
> >
>
>
Hi Bill,

It's fine to share--like I said, no deep magic in the scheme, it's just
the mechanics of setting it up in CrossStudio that is generally the
problem.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

> -----Original Message-----
> From: william sell [mailto:w...@comcast.net]
> Sent: 04 July 2006 02:01
> To: m...
> Subject: RE: [msp430] Re: available bootloaders
>
> I am sure that Paul would not mind, but that really would be
> for him to answer. I know he was planning on placing this in
> the public domain with
> some application note as it was not too obvious (at least to
> me!). Of
> course, you will need to use the Rowley compiler, but I think
> that the concept would be also applicable to the IAR compiler...
>
> /Bill
> -----Original Message-----
> From: m...
> [mailto:m...]On Behalf Of
> qpoint77
> Sent: Monday, July 03, 2006 5:43 PM
> To: m...
> Subject: [msp430] Re: available bootloaders
> Wow thats great Bill,
>
> Is it possible to share the skeleton project from Paul?
> Doing a loader had always been one of the things I wanted
> to try with
> the MSP ;-)
>
> Cheers,
> Nev
>
> --- In m..., "william sell" wrote:
> >
> > Paul Curtis of Rowley kindly provided me with a skeleton project
> that allows
> > two programs to be placed in ROM. Simply build and load the Loader
> project
> > into the MSP. For test purposes, build and load the Application
> (Loadee?).
> > When the machine is reset, the Loader program is
> executed, if there is a
> > valid image in ROM (Loadee), it vectors to this image,
> otherwise it
> sits and
> > does nothing. This is where you write a handler for the UART to
> except an
> > image over the serial and write this into ROM yourself at the
> address of the
> > Loadee vector.
> >
> > /Bill
> >
> >
> >
> > -----Original Message-----
> > From: m... [mailto:m...]On
> Behalf Of
> > davep575
> > Sent: Thursday, June 29, 2006 10:57 AM
> > To: m...
> > Subject: [msp430] available bootloaders
> >
> >
> > Is there any bootloader source code available anywhere
> that will allow
> > me to program a device through a uart? The user won't
> have access to
> > the /RST or TEST pins, so everything must be done through a uart.
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
Way cool Thanks for sharing ;-)

On 7/4/06, Paul Curtis wrote:
>
> Hi Bill,
>
> It's fine to share--like I said, no deep magic in the scheme, it's just
> the mechanics of setting it up in CrossStudio that is generally the
> problem.
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>
> > -----Original Message-----
> > From: william sell [mailto:w...@comcast.net ]
> > Sent: 04 July 2006 02:01
> > To: m...
> > Subject: RE: [msp430] Re: available bootloaders
> >
> > I am sure that Paul would not mind, but that really would be
> > for him to answer. I know he was planning on placing this in
> > the public domain with
> > some application note as it was not too obvious (at least to
> > me!). Of
> > course, you will need to use the Rowley compiler, but I think
> > that the concept would be also applicable to the IAR compiler...
> >
> > /Bill
> > -----Original Message-----
> > From: m...
> > [mailto:m... ]On Behalf Of
> > qpoint77
> > Sent: Monday, July 03, 2006 5:43 PM
> > To: m...
> > Subject: [msp430] Re: available bootloaders
> >
> >
> > Wow thats great Bill,
> >
> > Is it possible to share the skeleton project from Paul?
> > Doing a loader had always been one of the things I wanted
> > to try with
> > the MSP ;-)
> >
> > Cheers,
> > Nev
> >
> > --- In m... , "william sell"
> wrote:
> > >
> > > Paul Curtis of Rowley kindly provided me with a skeleton project
> > that allows
> > > two programs to be placed in ROM. Simply build and load the Loader
> > project
> > > into the MSP. For test purposes, build and load the Application
> > (Loadee?).
> > > When the machine is reset, the Loader program is
> > executed, if there is a
> > > valid image in ROM (Loadee), it vectors to this image,
> > otherwise it
> > sits and
> > > does nothing. This is where you write a handler for the UART to
> > except an
> > > image over the serial and write this into ROM yourself at the
> > address of the
> > > Loadee vector.
> > >
> > > /Bill
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: m... [mailto:
> m... ]On
> > Behalf Of
> > > davep575
> > > Sent: Thursday, June 29, 2006 10:57 AM
> > > To: m...
> > > Subject: [msp430] available bootloaders
> > >
> > >
> > > Is there any bootloader source code available anywhere
> > that will allow
> > > me to program a device through a uart? The user won't
> > have access to
> > > the /RST or TEST pins, so everything must be done through a uart.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >