| |||
| Home > Boot Monitor and platform library > Using the baseboard Boot Monitor and platform library > Using the Network Flash Utility | |||
This utility 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:
Start the NFU utility from the debugger console:
Set the on setting 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.
Start the NFU utility.
It typically takes several seconds for NFU start. Do not enter any commands until the prompt is displayed.
Use the DHCP protocol to get an IP address by entering:
manage dhcpc start
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 192.168.0.1, use:
manage map n: 192.168.0.1
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 DOC, enter:
flash write image n:/hello.axf
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 F.3.
Table F.3. NFU commands
| Command | Action |
|---|---|
CD | Change directory |
CONVERT BINARY | Provides information to the system that is
required by the RUN command to execute a binary file. A new file
with name is
produced, but with an.exe file extension. |
COPY | Copy NoteRemote file access requires semihosting. Use a debugger connection to provide semihosting. |
CREATE | Create a new file in the flash by inputting text. Press Ctrl-Z to end the file. |
DELETE | Delete from
flash. |
DIRECTORY [] | List the files in a directory. Files that only accessible from semihosting cannot be listed. |
EXIT | Exit the NFU. The processor is held in a tight loop until it is interrupted by a JTAG debugger. |
FLASH | Enter the flash file system for the NOR flash on the baseboard. See Table G.5 for NOR flash commands. |
HELP | Lists the NFU commands. |
M: | Change drive. |
MANAGE | Enter the network management sub-menu. See Table F.4 for MANAGE commands. |
MKDIR | Create a new directory. |
QUIT | Alias for EXIT. Exit the
Boot Monitor. |
RENAME | Rename flash file named to . |
RMDIR | Remove a directory. |
SDCARD | Enter the SD card subsystem. |
TYPE | Display the flash file . |
The MANAGE sub-menu listed in Table F.4 contains the network
management commands.
Entering MANAGE on the command line means
that all future commands (until EXIT is entered)
are 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 F.4. NFU MANAGE commands
| Command | Action |
|---|---|
ARP [-a] | Display Address Resolution Protocol host table. |
ARP -s hostname | Add static entry to ARP table. |
ARP -d hostname | Delete static entry from ARP table. |
DHCPC START | Use Dynamic Host Configuration Protocol (DHCP)
to start a connection with the network interface . |
DHCPC RELEASE | Use DHCP to release the connection with the network interface ifname. |
DHCPC SIZEOF | Returns information on the size of the DHCP packet. |
DHCP INFORM | Uses the DHCP protocol send information to
the server located at with
the network interface . |
EXIT | Exit the MANAGE sub-menu.
The commands listed in Table F.3 can be entered at the NFU prompt. |
HELP | Lists 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 is
not suppled. Otherwise, the current IP address for the interface is set
to . |
IFCONFIG [ifname [option]] | Configures the IP interface
|
MAP | Maps the IP address specified in to . |
NETSTAT [- | Displays active network connections.
The value for
|
PING | Send 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. |
QUIT | Alias for EXIT. Exit the MANAGE sub-menu. |
ROUTE ADD | Adds a static route to the network address
specified by
If |
ROUTE DEL | Deletes the static route to the network address
specified by . |
SHOW DNS | Displays Domain Name System (DNS) configuration details received from DHCP. |
When NFU starts, it attempts to run the NETSTART.BAT file
in the MMC or SD card. 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 map n: 192.168.0.1 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.