µTasker Forum

µTasker Forum => µTasker general => Topic started by: hervé on October 21, 2011, 02:20:22 PM

Title: TFTP Boot
Post by: hervé on October 21, 2011, 02:20:22 PM
Hi Mark,

Have you worked on a TFTP or other UDP way to boot ?
My board has neither RS232(except for debug but not available for customer) nor USB(except when module is plugged but not sytematics) but IP.

Now I used FTP transfert, but if there is a bad bin file uploaded, the board is down as no application can run.

Regards
Title: Re: TFTP Boot
Post by: mhoneywill on October 21, 2011, 03:30:59 PM
I did a quick search of this forum and came up with a number of hits for example
http://www.utasker.com/forum/index.php?topic=12.0
and
http://www.utasker.com/forum/index.php?topic=915.0

Here are a couple of other links that might help you Herve if you want to look at it yourself

http://www.cyantechnology.com/public/AN048DemonstratingTFTPwithuIPV0_9.pdf
http://forums.xilinx.com/t5/EDK-and-Platform-Studio/lwIP-TFTP-server-demo-tftpserver-c-memory-leaks-fixed/td-p/28535

Cheers

Martin
Title: Re: TFTP Boot
Post by: mark on October 22, 2011, 12:19:13 AM
Hi Hervé

Probably the links in the forum to other posts as given by Martin will answer most questions.

I don't think that the problem with loading a bad binary is restricted to FTP since it can of course also happen with TFTP. The difference is possibly that TFTP is controlled by an administrator (this will be done on the TFTP server) and the FTP can be done by anyone with a client.
By using check sums and magic numbers the risk should however be very small. Also password protection can be used at the FTP to stop unautherised users uploading data.

TFTP was originally popular since it allowed systems to boot from a small ROM. UDP takes up less code space than TCP and so that is why TFTP using UDP was popular. However a web browser or FTP based on TCP is possible with about 16..20k code space and I don't think that saving a couple of kByte to remove TCP and FTP or web server makes any real diffence nowadays.

Do you have more exact details on the properties of TFTP that would be advantageous for yourself? Does the TFTP demo otherwise serve your purposes (see define TEST_TFTP in application.c)?

Regards

Mark


Title: Re: TFTP Boot
Post by: hervé on October 24, 2011, 07:54:53 AM
Hi Martin,
Hi Mark,

Thanks for your comment, but in fact my purpose was not to use tftp instead of ftp or web update possibilities.

I was thinking to use UDP in the simplest possible way to update the firmware when the boot is running, just like there is a uTaskerSerialBoot making a uTaskerUDPBoot.
Using the bare boot, if my uploaded program doesn't run I have no way to update it again remotely (My boards are in the ceiling of a hospital, where I can't access as I want)
As tftp is an existing minimum protocol, I thought about it....
I am looking for a way to reprogram the microcontroller directly while receiving UDP frames ....A 'last resort' way.


Regards