 | RL-ARM User's Guide |  |
|
|
| TFTP_demoThe TFTP_demo example project shows the use of a TFTP Server for exchanging files with an embedded system. The application runs in the Local Area Network (LAN). Example projects are located in the folder \ARM\Boards\vendor\board\RL\TCPnet. The project \ARM\Boards\Keil\MCB2300\RL\TCPnet\TFTP_demo.uvproj is used for demonstration. A RAM Device stores the files according to the options set in the file File_Config.c. Network ConfigurationSpecify network parameters like IP Address, Subnet Mask, Default Gateway, and Primary DNS Server IP address in the section Ethernet Network Interface of the file Net_Config.c. To configure the parameters: - Automatically: enable the option Dynamic Host Configuration (#define DHCP_ENABLE 1). A DHCP Server must exist in the LAN to provide the parameter values for the embedded system.
- Statically: enter the parameter values manually. Disable the option Dynamic Host Configuration (#define DHCP_ENABLE 0). Specify a free IP address and copy the netmask from the LAN configuration. A DNS Server IP address is not necessary for this example and can be left at 0.0.0.0.
Testing the TFTP_demoThe project includes two targets: - MCB2300: configures the application for the production environment.
- MCB2300 Debug: configures the application to display debugging information as specified in the file Net_Debug.c.
Test the application with a TFTP Client program. - Connect ULINK to the PC and to the board.
- Build the application.
- Download the application to Flash.
- Connect the board to the LAN.
- Open the Command Prompt and enter the following command to test the connection:
ping mcb2300
On a positive result, transfer a file to the target system:
tftp mcb2300 PUT testFile.txt // specify the file
The host name mcb2300 is defined in the file Net_Config.c as described in System Definitions.
- To view the debugging information, open a terminal emulation program (for example, HyperTerminal) with the following characteristics:
- COM Port: COM1.
- Baud rate: 115200.
- Data bits: 8.
- Parity: None.
- Stop bits: 1.
- Flow control: None.
Note - Windows operating systems include a TFTP program, however, it might need enabling.
|
|