We want to use MCF5272 to develop FTP function,
Some one can help provide reference sample code of FTP function to us.
PS. use "MCF5272 Evaluation Board".
What TCP stack are you using?
FTP requires TCP requires IP requires Ethernet. There's a huge amount of work in TCP and IP that you don't want to repeat.
So your choice of FTP should match your choice for TCP. A good TCP stack might even include FTP.
FTP is also a *FILE* Transfer protocol, so it pretty much assumes an operating system with a file system (with files and folders and so on). So it has to interface to that as well.
Do you want the CLIENT side or the SERVER side? What do you want FTP for? Do you want it as a client for copying files to a device, or do you want to access it from elsewhere to get files from it? If the latter, then a small web server might be more suitable.
Are you using FNET, uTasker or something else? That should be your starting point.
I thought FNET would come with FTP already, but I see it doesn't. That's probably because FNET has no idea of what File System you might have (if any). FNET does have TFTP and a web server.
I've just done a quick search for FTP sources (based on a search for the string "421 System overloaded, try again later.", which appears in some code I ported back in 1999, and found this:
The uTasker project includes FTP support for file system in parallen Flash, serial Flash or on SD card (either uFileSystem or FAT, whereby the advantage of FTP is that the format between server doesn't need to be the same [unlike USB MSD for example]). If a NAND controller is available it also includes management for NAND Flash with level wear in the file system. However it has been used on the M528x, M520x and M523x V2 microprocessors but not the M527x so may need some adaptation to actually work [not in the FTP part but maybe in the start-up configuration for the board and memeory layout o peripherals] (GCC, IAR and Codewarrior projects included). Its main target is however the V2 microcontrollers where resources are tighter than the microprocessor parts (essentially real-single-chip), in which case it may be well to look at running ucLinux for the large device anyway.
Today the uTasker project includes only FTP server but there is an operational FTP client in the development version which will be added to the main project shortly, allowing user control of the FTP server via command line (like using DOS FTP via a serial port, USB CDC or TELNET). It is also useful for using the FTP server for data logging, whereby the FTP client opens a file for writing and negotiates the data connection in put/append mode after which the application can simply save all locally recorded data to the file on the FTP server [an example is when there is data arriving on a UART in ASCII or binary format which is then simply appended to the file on the remote server without the local application actually having to do anything actively itself]. Another example is for the application to check an FTP server for new software - if the FTP server is holding a newer version it can copy this locally and use the boot loader support to safely automatically upgrade itself [this is often better than TFTP since it works well in the Internet - being TCP based - and has better protection due to its login process - devices can then automatically upgrade themselves from a central FTP server without any specific user intervention as long as they have Internet connection from their LAN].
Thanks for your reply,
We had done it.
Retrieving data ...