EmbeddedRelated.com
Forums

Cortex M3/M4 with bootloader ROM

Started by David Brown October 4, 2013
Does anyone have recommendations for Cortex M3/M4 microcontrollers with
a bootloader in ROM?  We use a number of Freescale Kinetis devices, but
there is no ROM bootloader - programming is through either JTAG or the
EZ-Port (basically treating the chip like an SPI flash device).  We have
an application where a UART-based bootloader would be very useful, and
having it in ROM would save a lot of effort and production time (like
the TI msp430 microcontrollers).  There are vast numbers of M3/M4
devices available - I am looking for recommendations for ones with a
simple and clear bootloader protocol.

Thanks,

David
David Brown <david@westcontrol.removethisbit.com> writes:
...
> the TI msp430 microcontrollers). There are vast numbers of M3/M4 > devices available - I am looking for recommendations for ones with a > simple and clear bootloader protocol.
We've used a lot of LPC1768s in our project, usually JTAG programming. However, when we bought a tester development from an another company, their software wizard wrote a serial bootloader in a day. Unfortunately I could not find manual for the protocol, but it must be available somewhere.. -- Mikko
On 2013-10-04, Mikko Syrjalahti <first.last@iki.fi> wrote:
> David Brown <david@westcontrol.removethisbit.com> writes: > ... >> the TI msp430 microcontrollers). There are vast numbers of M3/M4 >> devices available - I am looking for recommendations for ones with a >> simple and clear bootloader protocol. > > We've used a lot of LPC1768s in our project, usually JTAG programming. > However, when we bought a tester development from an another company, > their software wizard wrote a serial bootloader in a day. > > Unfortunately I could not find manual for the protocol, but it must be > available somewhere..
I'm using a flashless LPC18xx, and the serial bootloader protocol is documented in the part's user-manual. NB: the serial bootloader protocol for parts without flash is _different_ than the protocol used by parts withy flash. The protocol used by parts with flash is referred to as the "ISP" protocol in docs. The protocol used by flashless parts is much simpler. I write an ISP protcol downloader in less than a day (I wrote it in Python, it would probably take longer in C), and the flashless downloader is even simpler. There's an available open-source download utility written in Python for the ISP protocol available somewhere... http://code.google.com/p/lpc214xisp/ The LPC21xx and LPC18xx parts use the same ISP protocol. I'm _guessing_ the Cortex LPC17xx parts use the same one also... -- Grant Edwards grant.b.edwards Yow! We are now enjoying at total mutual interaction in gmail.com an imaginary hot tub ...
On Friday, October 4, 2013 9:03:40 AM UTC-7, David Brown wrote:
> Does anyone have recommendations for Cortex M3/M4 microcontrollers with > a bootloader in ROM? We use a number of Freescale Kinetis devices, but > there is no ROM bootloader - programming is through either JTAG or the > EZ-Port (basically treating the chip like an SPI flash device). We have > an application where a UART-based bootloader would be very useful, and > having it in ROM would save a lot of effort and production time (like > the TI msp430 microcontrollers). There are vast numbers of M3/M4 > devices available - I am looking for recommendations for ones with a > simple and clear bootloader protocol. >
Not for ARM, but we are using one for PIC32MX. The on-board serial bootloader is in C and the Window interface is in MSVC++, both available in source codes. It should not be too difficult to port the boot loader to ARM.
On Fri, 04 Oct 2013 18:03:40 +0200, David Brown wrote:

> Does anyone have recommendations for Cortex M3/M4 microcontrollers with > a bootloader in ROM? We use a number of Freescale Kinetis devices, but > there is no ROM bootloader - programming is through either JTAG or the > EZ-Port (basically treating the chip like an SPI flash device). We have > an application where a UART-based bootloader would be very useful, and > having it in ROM would save a lot of effort and production time (like > the TI msp430 microcontrollers). There are vast numbers of M3/M4 > devices available - I am looking for recommendations for ones with a > simple and clear bootloader protocol. > > Thanks, > > David
We also have used LPC1768/69 products and, like Mikko, use JTAG but also use the serial port for some updates and development work. The protocol is documented in the user manual. I think some of the guys use FlashMagic. There are other open source tools. Most of the LPC parts have a pin to control entry to the serial boot loader on startup. You can also enter it directly from the application code. Be careful with the LPC1768/69 if you want to use the NMI. It is the same pin as the boot loader on startup pin but is opposite logic level. -- Chisolm Republic of Texas
Mikko Syrjalahti <first.last@iki.fi> writes:

> David Brown <david@westcontrol.removethisbit.com> writes: > ... >> the TI msp430 microcontrollers). There are vast numbers of M3/M4 >> devices available - I am looking for recommendations for ones with a >> simple and clear bootloader protocol. > > We've used a lot of LPC1768s in our project, usually JTAG programming. > However, when we bought a tester development from an another company, > their software wizard wrote a serial bootloader in a day.
Yes, we write our own bootloader too. The bootloader loads itself into RAM and executes there, allowing it to update itself if needed, as well as the main application. The advantage of your own is that you can use your own interface, instead of UART1 using RS232 or whatever. For example in a modbus system you can update over modbus. The other really nice way is for the bootloader to emulate a USB flash disk, customer can then just drag and drop the application .elf using familiar tools, no drivers required.
> Unfortunately I could not find manual for the protocol, but it must be > available somewhere..
-- John Devereux
On Fri, 04 Oct 2013 18:03:40 +0200, David Brown
<david@westcontrol.removethisbit.com> wrote:

>Does anyone have recommendations for Cortex M3/M4 microcontrollers with >a bootloader in ROM?
The STM32 devices.
>We use a number of Freescale Kinetis devices, but >there is no ROM bootloader - programming is through either JTAG or the >EZ-Port (basically treating the chip like an SPI flash device). We have >an application where a UART-based bootloader would be very useful, and >having it in ROM would save a lot of effort and production time (like >the TI msp430 microcontrollers). There are vast numbers of M3/M4 >devices available - I am looking for recommendations for ones with a >simple and clear bootloader protocol.
Check out their application notes "AN2606 STM32 microcontroller system memory boot mode" and "AN3155 USART protocol used in the STM32 bootloader." They provide a "Flash Loader Demonstrator" at <http://www.st.com/web/en/catalog/tools/PF257525>, which includes both a GUI and command-line version. Works fine. I don't believe that the "Demonstrator" license permits redistribution but the protocol is well documented in the app notes and you have a known-working app to check against.
Poked around in the installation directory a bit. In addition to the
documentation, ST also provides a couple of MS Windows DLLs with hooks
for useful things like get_ID, read, upload, etc. as well as an
example Visual Studio project. Looks like it's the complete source for
the Flash Loader Demo. (I refuse to install Visual Studio so I haven't
checked these out personally.)
On Friday, October 4, 2013 1:39:51 PM UTC-4, edward....@gmail.com wrote:
> Not for ARM, but we are using one for PIC32MX. The on-board serial bootloader is in C and the Window interface is in MSVC++, both available in source codes. It should not be too difficult to port the boot loader to ARM.
Careful, IIRC the PIC32 bootloader to which you refer is loaded into FLASH, not ROM. This requires programming the part prior use and chews up flash (which costs more than ROM). Sorry if new PIC32 have this in ROM, the ones I've used do not... Hope that helps, Best Regards, Dave PS: We're using LPC11C14 which has both serial and CAN bootloaders in ROM (though I never did find the CAN protocol).
On Friday, October 4, 2013 11:32:39 AM UTC-7, Dave Nadler wrote:
> On Friday, October 4, 2013 1:39:51 PM UTC-4, edward....@gmail.com wrote: > > > Not for ARM, but we are using one for PIC32MX. The on-board serial bootloader is in C and the Window interface is in MSVC++, both available in source codes. It should not be too difficult to port the boot loader to ARM. > > Careful, IIRC the PIC32 bootloader to which you refer is loaded > into FLASH, not ROM. This requires programming the part > prior use and chews up flash (which costs more than ROM).
Yes, it takes up 8K out of 512K flash, Our app takes around 100K, so it won't be a problem with space. Also, we load the app in high flash, and the bootloader is prohibited from changing low flash.
> > Sorry if new PIC32 have this in ROM, the ones I've used do not...
It's possible if you buy 100Ku+. But until then, they can preload the code in flash on the chip.