Options to enable user to do flash updates?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Options to enable user to do flash updates?

2,315 Views
Kopone
Contributor IV

Hi,

 

I am thinking about how to enable users to do flash updates for our products. We use ColdFire V1 and several H/R/S08 cores.

The basic requirements are of course the process being as easy (for the user) and as cheap (for us, not more than around 10,- bucks per product) as possible.

 

The interface has to be USB i guess, since almost no PC offers anymore serial ports these days. So there dont seem to be any widely available alternatives.

 

However handing every customer a BDM cable plus have them install the whole Codewarrior suite to flash the update is obviously not an option.

 

I wonder if there is any kind of bootloader available that would read and flash an update through one of the MCUs built in UARTs. This could then be interfaced to USB via a simple FTD chip. Also a windows tool is needed to send the new image to the MCU.

 

Another thought was to use a Freescale MCU of the JM range and add this to the project (instead of an FTD device), since these come with USB already and are pretty afordable. Also as far as I know the free portion of the USB stack implements a serial interface already. The JM could communicate with the BDM port of the target CPU directly, so no new bootloader was needed. However all the software to turn the JM MCU into a flash device is needed. Plus the windows tool of course.

 

We could start developing something like this...but my guess is, that this - or any other solution I'd be glad to hear of - has all been done before, I just can't seem to find it. Would someone be so kind and point me to a solution to the "user flash update process"?

 

Thank you very much,

 Sven

Labels (1)
0 Kudos
9 Replies

563 Views
admin
Specialist II

What I plan to do with my next product update is to include an SD or microSD card socket. Plug in a card and if it finds the magic filename on the card, zap the flash. That's way under 10 bucks, and the user isn't tied to a PC to get it done.

 

I've done the code to do this for an S08 and now I'm thinking the whole thing needs to get moved to something bigger & better, i.e., a Coldfire chip. (Warning: stand-by for a deluge of questions about that.)

0 Kudos

563 Views
Kopone
Contributor IV

Kef, thanks for the link, havent seen that one before. This will be very helpfull with implementing a solution.

 

Andrey, yeah, uarts are pretty picky about baudrates, thanks for reminding me.

 

Wingsy, I like the SD card idea very much, is there any app note or open source code around for SD card access?

 

Regards, 

Sven

0 Kudos

563 Views
admin
Specialist II
I've seen links to app notes & sample code for it, but cannot recall if that was for the S08 chips or Coldfire. What I did on the S08 was a while back, and what I did was to adapt a C program for FAT file access to assembly. If I run across it again I'll speak up.
Message Edited by Wingsy on 2009-09-06 11:07 PM
0 Kudos

563 Views
Kopone
Contributor IV

I was just wondering, since I got no feedback on this one...is my request too exotic; or just too idiotic?

How do *you* make your products user-update-able?

 

Regards,

 Sven

0 Kudos

563 Views
kef
Specialist I

You asked to point you to ready to use solution. Probably no one has something cool, free, documented and ready to use to suggest. Simple. At other hand, qustion is too wide/too long to answer in detail, and thus too complicated to answer. Please be more specific, what is your biggest problem.

 

To do bootloader you need two things. 1) flash program/erase routines (search forums, at least on 8-bit forums, flash routines where mentioned zilions times. CF V1 routines are almost identical, except you need to write wordaligned long words instead of bytes), 2) some known binary format + utility to convert from CW output files to this format. CW by default produces known format binaries, S-recorcds are well documented, just google it.

 

 

0 Kudos

563 Views
Kopone
Contributor IV

Kef, thank you for the information. Sorry for not being more specific, it is just that I am open to any kind of suggestion concerning user programmable updates. I was just kind of loudly thinking about some options, but not necessarily meaning to limit the process to e.g. a USB connection. Maybe that was more disturbing than helpfull? :smileywink:

 

My biggest problem is the "buy or make" decision. Sure, as you pointed out there is plenty of documentation out there and it is not a problem to implement the process, technically speaking (at least I hope so), but it might simply be cheaper to buy a readily available solution than spent an estimated week or two of development time.

 

I was also wondering if maybe Freescale itself would offer anything to support the field update and that I just could not find yet. I was working with a competitor's product a few years ago and there is a built in flash update via serial port available plus a small windows tool and now they just released update via CAN and even via plugging in a USB stick. I had VERY good reason to switch from that brand to Freescale and I am not going back, but I was hoping that Freescale might do anything similar. I mean, this is a common problem for much about any product that sells with more than just a fistfull of code, isnt it? So there must be like thousands of reinvented wheels out there.

 

Mark, thank you very much for pointing these out. This looks very much like what would suit our needs except that it doesnt come for the MCUs we use.

 

Thanks for the feedback,

 Sven

0 Kudos

563 Views
kef
Specialist I

Kopone, did you see this thread:

 

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&thread.id=9351

 

Not USB, but both S08 and CF V1 devices seem bein supported.

0 Kudos

563 Views
Andrey
Contributor III

Just as Kopone pointed out a FTDI USB ic will make the AN2295 bootloader work nicely. We had to develop our own software that calls the hcs08sprg.exe but it worked. Also your programming speed will have to match the MCU speed. For example my MCU Serial Speed was generating 55556 instead of 57600 baud. so on the PC side, the software had to communicate at 55556 baud to reduce the errors during programming, otherwise the app note works great. Just load the bootloader first, use the hcs08sprg.exe to load the .s19 file and then you're set. In my firmware, the next time a user wants to upgrade the firmware (serial command), I do a jump to the bootloader code.


Regards,

Andrey

0 Kudos

563 Views
mjbcswitzerland
Specialist V

Hi

 

These don't support V1 nor HS08 but I will point them out as reference. They are documented and supported:

- Ethernet firmware upload (all V2 MCU devices with Ethernet interface) see 

http://www.utasker.com/docs/uTasker/uTaskerBoot_003.PDF

and

http://www.utasker.com/docs/uTasker/BM-Booloader_for_M5223X.PDF

(optionally encrypted so that firmware can be distributed in "non-readable" form

 

- USB firmware upload (all V2 MCU devices with USB interface) see

http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF

(also optionally encryted)

 

- Serial SREC firmware upload via UART. See

http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

 

Regards

 

Mark

 

0 Kudos