Ethernet bootloader for MC9S12NE64?

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

Ethernet bootloader for MC9S12NE64?

2,609 Views
rgamage
Contributor I
I'm looking for a bootloader for the MC9S12NE64, that can load code over ethernet. Has anybody heard of such a thing? My understanding is there is 16K of protected flash in which the stack and bootloader could reside, and it seems like it should be possible to put a minimal UDP stack and bootloader into that space. Any info / leads would be much appreciated.

Thanks,
Randy
0 Kudos
Reply
2 Replies

560 Views
Goz
Contributor I
You can do this with the OpenTCP stack that is available. All that you require is the UDP protocol to use the TFTP function that is included.
You send the update firmware to the board via a TFTP command and then write the update into flash. You may wish to implement a CRC32 checksum algorithm as well.
There are various ways to implement the update routine, such as something like this..
Receive file into RAM, copy update file to a shadow page of Flash, run a CRC16/32 check on the file, reboot the device where a bootloader will overwrite the old code with the new update into flash.
That's just one example. You could also play around with vector table start-up points etc. to start the new code from it's other location in Flash. It depends on how big your code is.
Hope that makes sense.
0 Kudos
Reply

560 Views
mjbcswitzerland
Specialist V
Hi Randy

See the ColdFire forum postings:
http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=1103
and
http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=1288

The uTasker project (runs on the NE64 and the M5223X) supports a boot loader (2k on the Coldfire) which allows software upgrades via Ethernet and Internet (FTP, HTTP Post etc.).
The way it works is a bit special but it allows safe (secure) and failure tolerant uploads - see the docs for full details and a user guide for the CodeWarrior.

Now I must disappoint in as much as it is only available for the Coldfire (at the moment). Due to the limited memory on the NE64 the impetus for such support is not as strong and also the use of 16k for a UDP based method would also be rather restrictive (the size of the possible application suffers quite seriously as there is limited enough space as it is) - in addition, the fact that the interrupt vectors can not be relocated means that the boot loader would also have to do interrupt dispatching (like the Freescale Serial Monitor does).

However the uTasker BM-Bootloader (Bare-Minimum) may soon be made available for the NE64, in which case the preferred method will probably be to use a 2k BM-Loader in the protected range 0xf800 (probably same size as the serial monitor but it may well be a little smaller). Then it will use a (cheap, SO-8) 64k EEPROM connected to the SPI to allow secure software uploads of up to 62k to take place. This seems to be the preferred method due to the fact that it doesn't restrict the application (in a single chip environment without expansion bus) and enables Ethernet and Internet software updates including unrestricted operating system, driver, TCP/IP and application patches.

If you don't know the uTasker project get details at www.uTasker.com. It is free for non commercial use and has a large NE64 user community.

Regards

Mark Butcher
www.mjbc.ch / www.uTasker.com

P.S note that the NE64 project supports various interesting extras such as a free serial download tool for the NE64 and free software to convert a DEMO9S12NE64 into an Ethernet /Internet enabled BDM.
0 Kudos
Reply