You copied the Doc URL to your clipboard.

E.3.11. Using the Network Flash Utility

The Network Flash Utility (NFU) uses the TFTP protocol to access files over the Ethernet network. You can use this utility to program files into flash.

To connect to a server and program a file to flash:

  1. Start the NFU utility from the debugger console:

    1. Set the Boot Monitor configuration switches to force the console to use either UART-0 or the LCD and keyboard. (See Boot Monitor configuration switches for details.)


      The debugger console cannot be used because the semihosted console I/O is blocking.

    2. Start the NFU utility.


      It typically takes several seconds for NFU start. Do not enter any commands until the prompt is displayed.

  2. Use the DHCP protocol to get an IP address by entering:

    manage dhcpc start
  3. Use the map command to map a drive letter to the TFTP server. For example to access a file on a TFTP server with the IP address, use:

    manage map n:
  4. After the drive letter has been mapped, use the normal Boot Monitor command on the remote file by specifying the drive letter. For example, to write a file to NOR flash, enter:

    flash write image n:/hello.axf

NFU commands

The NFU supports a subset of the standard Boot Monitor commands and adds a new MANAGE sub-menu.

The NFU commands are listed in Table E.3.

Table E.3. NFU commands
CD directory pathChange directory
CONVERT BINARY binary_file LOAD_ADDRESS address [ENTRY_POINT address]Provides information to the system that is required by the RUN command in order to execute a binary file. A new file with name binary_file is produced, but with an .exe file extension.
COPY file1 file2

Copy file1 to file2. For example, to copy the leds code from the PC to the flash enter: COPY C:\software\projects\examples\rvds2.0\leds.axf leds.axf


Remote file access requires semihosting. Use a debugger connection to provide semihosting.

CREATE filenameCreate a new file in the flash by inputting text. Press Ctrl-Z to end the file.
DELETE filenameDelete file from flash.
DIRECTORY [directory]

List the files in a directory.

Files that only accessible from semihosting cannot be listed.

EXITExit the NFU. The processor is held in a tight loop until it is interrupted by a JTAG debugger.
FLASHEnter the flash file system for the NOR flash on the baseboard. See Table F.5 for NOR flash commands.
HELPLists the NFU commands.
M:Change drive (allocated to MMC or SD card).
K:Change drive (allocated to CompactFlash card).

Enter the network management sub-menu. See Table E.4 for MANAGE commands.

MKDIR directory pathCreate a new directory.
QUITAlias for EXIT. Exit the Boot Monitor.
RENAME old_name new_nameRename flash file named old_name to new_name.
RMDIR directory pathRemove a directory.
SDCARDEnter the SD card subsystem.
TYPE filenameDisplay the flash  file filename.

The MANAGE sub-menu listed in Table E.4 contains the network management commands.

Entering MANAGE on the command line means that all future commands (until EXIT is entered) will be commands from the MANAGE sub-menu.

A single command can be executed by entering MANAGE followed by the command. For example, MANAGE DHCP START gets a IP address from the DHCP server. The next command entered must be from an NFU command.

Table E.4. NFU MANAGE commands
ARP [-a]Display Address Resolution Protocol host table.
ARP -s hostnameAdd static entry to ARP table.
ARP -d hostnameDelete static entry from ARP table.
DHCPC START ifnameUse Dynamic Host Configuration Protocol (DHCP) to start a connection with the network interface ifname.
DHCPC RELEASE ifnameUse DHCP to release the connection with the network interface ifname.
DHCPC SIZEOFReturns information on the size of the DHCP packet.
DHCP INFORM ifname ip_addressUses the DHCP protocol send information to the server located at ip_address with the network interface ifname.
EXITExit the MANAGE sub-menu. The commands listed in Table E.3 can be entered at the NFU prompt.
HELPLists the NFU MANAGE commands.
IFCONFIG Displays the IP settings that are used for communications with the server.
IFCONFIG [ifname [ip_address]]Displays the current IP address if ip_address is not suppled. Otherwise, the current IP address for the interface ifname is set to ip_address.
IFCONFIG [ifname [option]]

Configures the IP interface ifname. The value for option can be:

netmask maskvalue

set the netmask

dstaddr address

set the destination IP address

mtu n

set the maximum transfer unit


activate the interface


shutdown the interface

MAP drive addressMaps the IP address specified in address to drive.
NETSTAT [-option]

Displays active network connections. The value for option can be:


display all connections


display all multicast connections


display interface information


display interface information for multicast


display routing table


display statistics


display buffer usage

PING ip_addressSend ICMP ECHO_REQUEST packets to the network host. The data in the packet is returned by the host. Reception of the return packet indicates that the TCP/IP connection is functioning.
QUITAlias for EXIT. Exit the MANAGE sub-menu.
ROUTE ADD type target [NETMASK mask] gateway

Adds a static route to the network address specified by target. The gateway address is specified by gateway.

type can be either -net or -host.

If NETMASK is used, mask is the netmask for the target network address.

ROUTE DEL targetDeletes the static route to the network address specified by target.
SHOW DNSDisplays Domain Name System (DNS) configuration details received from DHCP.

Using a script file with NFU

When NFU starts, it attempts to run the NETSTART.BAT file in the flash. If the script does not exist, a prompt is displayed on the console. For example, to map a drive and write a file to flash, create the following script file:

manage dhcp start
manage map n:
flash write image n:/hello.axf

After the file is executed, you can enter additional NFU commands. To run the file, reset the board and use the RUN command from Boot Monitor.