Download MicroMonitor User`s Manual
Transcript
18.24 Some Handy Host-Based Scripts…
The host based tools discussed above allow you to create some handy scripts that automate some of
the interaction that may otherwise be necessary when working with the target. These scripts are part of the
umon source tree and can be found under umon_main/host/src/scripts.
18.24.1 TVI: target vi
This script automates the process of pulling up a file from the target, modifying it, and pushing it back
down to the target. If the environment variable TARGET_IP is set, then it uses that as the IP address of the
target; otherwise the user must specify the IP address of the target as the second argument. One can
immediately see that ‘vi’ can be replaced by any editor (temacs, tnotepad, etc..)…
#!/bin/bash
# tvi: wrap editor (in this case vi) with tftp pull and push so that ASCII
# files on target can be edited on host…
usage()
{
echo "Usage: tvi {filename_on_target} [target ip address]"
echo "(uses \$TARGET_IP if set)"
}
if [ $# = 1 ]
then
if [ "$TARGET_IP" = "" ]
then
usage
exit 1
fi
elif [ $# = 2 ]
then
export TARGET_IP=$2
else
usage
exit 1
fi
tmpfile=`mktemp`
# If mktemp isn’t available just use ‘xxx’.
ttftp $TARGET_IP get '.' $tmpfile
export fullname=`grep ^${1}, $tmpfile`
ttftp $TARGET_IP get $1 $tmpfile
if [ $? != 0 ]
then
exit
fi
vi $tmpfile
ttftp $TARGET_IP put $tmpfile $fullname
rm $tmpfile
18.24.2 TLS: target list
Same idea as “tvi” above, but this simply uses “moncmd” to remotely run “tfs ls *”…
400
Related documents
MicroMonitor User`s Manual
MicroMonitor User`s Manual
User Manual XH-W1301
white paper
TLL6219 ARM9 Module
"getting started" guide for uMon-M on the K64F
CHARA Technical Report - The CHARA Array of Georgia State
University of Stuttgart Diploma Thesis Design of a Memory
Microcross i.MX GNU X-Tools
Reference Manual - LYNX Technik AG
User Manual XH-W1301 Connect the power supply and equipment
Cogent i.MX21 LiteKit for Freescale MC9328MX21 Hardware