SEARCH
TOOLBOX
LANGUAGES
modified on 20 July 2010 at 14:33 ••• 123,654 views

Eagle enet tftpd Example

From Manuals

(Difference between revisions)
Jump to: navigation, search
(TOC)
Line 5: Line 5:
=TFTP Overview=
=TFTP Overview=
==Origins==
==Origins==
-
=Common uses for TFTP
+
TFTP (Trivial File Transfer Protocol) is a very simple file transfer protocol commonly implemented on top of UDP (User Datagram Protocol) using port number 69.  Its purpose is to move files between machines on different networks and is designed to be small and easily implemented.  It's only features the reading and writing of files and does not offer any other advanced features or security.  TFTP currently supports two different modes, "netascii" (ASCII) and "octet" (binary) with a third "mail" mode being made obsolete in 1992 by [http://tools.ietf.org/html/rfc1350 RFC1350].
 +
=Common uses for TFTP=
==Data downloads==
==Data downloads==
 +
Data files stored on network boards can be easily accessed and downloaded through TFTP.
==Script uploads==
==Script uploads==
 +
Applications can be controlled by new/updated scripts that are uploaded remotely.
==Firmware updates==
==Firmware updates==
 +
The latest firmware updates can be pushed to boards through TFTP.
=enet_tftpd example=
=enet_tftpd example=
==microSD filesystem==
==microSD filesystem==
 +
This application uses the [http://elm-chan.org/fsw/ff/00index_e.html FatFs] FAT file system for embedded systems.  This allows the data on the microSD to be read with other FAT compatible systems (including Windows, Linux, Mac OSX).  The FatFs file system limits file sizes to 4GB, volume size to 2TB, cluster size to 64KB, and sector size to 4KB.  The FAT sub-type is also required to be either FAT12, FAT16, or FAT32.  A virtually unlimited number of new files can be uploaded via TFTP, dependent on memory space.  Uploading an existing file will overwrite the old file.
==Internal filesystem==
==Internal filesystem==
 +
This application has limited support for data storage on its internal flash memory.  Storage capacity is severely limited as 256KB of memory must be shared with the both the bootloader and application.  Data can either be stored at compile time or uploaded at run time.
 +
 +
Files stored at compile time are included as lmi-fsdata.h and are a part of object code.  Use the makefs.bat utility to translate the files in enet_tftpd\fs\ to a single header file.  These files are read only.
 +
 +
Uploading of data to internal memory at run time is limited to a single file.  Additionally, this file must fit within an allocated space determined at compile time.  enet_tftpd uses a default of 16KB which can be made larger or smaller depending on the size of your application.  Note: Uploading any new data to the internal file system will erase old data!
==Compile options==
==Compile options==
===Firmware update mode===
===Firmware update mode===
 +
Firmware update mode is set by defining "BL_UPDATE" as a compiler pre-processor option.  This will flash and uploaded file to memory at address 0x00 and reset the board.  This data can not be downloaded later by a GET request as no file system information is recorded.
===TFTP port===
===TFTP port===
=TFTP clients=
=TFTP clients=

Revision as of 22:34, 13 July 2010

Ethernet TFTPD Server (enet_tftpd)

Compatibility Eagle 50E, 100

Contents

TFTP Overview

Origins

TFTP (Trivial File Transfer Protocol) is a very simple file transfer protocol commonly implemented on top of UDP (User Datagram Protocol) using port number 69. Its purpose is to move files between machines on different networks and is designed to be small and easily implemented. It's only features the reading and writing of files and does not offer any other advanced features or security. TFTP currently supports two different modes, "netascii" (ASCII) and "octet" (binary) with a third "mail" mode being made obsolete in 1992 by RFC1350.

Common uses for TFTP

Data downloads

Data files stored on network boards can be easily accessed and downloaded through TFTP.

Script uploads

Applications can be controlled by new/updated scripts that are uploaded remotely.

Firmware updates

The latest firmware updates can be pushed to boards through TFTP.

enet_tftpd example

microSD filesystem

This application uses the FatFs FAT file system for embedded systems. This allows the data on the microSD to be read with other FAT compatible systems (including Windows, Linux, Mac OSX). The FatFs file system limits file sizes to 4GB, volume size to 2TB, cluster size to 64KB, and sector size to 4KB. The FAT sub-type is also required to be either FAT12, FAT16, or FAT32. A virtually unlimited number of new files can be uploaded via TFTP, dependent on memory space. Uploading an existing file will overwrite the old file.

Internal filesystem

This application has limited support for data storage on its internal flash memory. Storage capacity is severely limited as 256KB of memory must be shared with the both the bootloader and application. Data can either be stored at compile time or uploaded at run time.

Files stored at compile time are included as lmi-fsdata.h and are a part of object code. Use the makefs.bat utility to translate the files in enet_tftpd\fs\ to a single header file. These files are read only.

Uploading of data to internal memory at run time is limited to a single file. Additionally, this file must fit within an allocated space determined at compile time. enet_tftpd uses a default of 16KB which can be made larger or smaller depending on the size of your application. Note: Uploading any new data to the internal file system will erase old data!

Compile options

Firmware update mode

Firmware update mode is set by defining "BL_UPDATE" as a compiler pre-processor option. This will flash and uploaded file to memory at address 0x00 and reset the board. This data can not be downloaded later by a GET request as no file system information is recorded.

TFTP port

TFTP clients

Command line TFTP

Windows

Linux

GUI TFTP

TFTP Limitations

Security

No password

No firewall

File size

Internal filesystem writing

Summary