Keil Logo


The 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 Configuration

Specify 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

Testing the TFTP_demo

The 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.

  1. Connect ULINK to the PC and to the board.
  2. Build the application.
  3. Download the application to Flash.
  4. Connect the board to the LAN.
  5. 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.

    PUT Command

  6. 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.
    PUT Command


  • Windows operating systems include a TFTP program, however, it might need enabling.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.