通讯方式有两种:
一、USB通讯
这个相对简单,但速率低。配置流程如下,配置完保存即可。
二、网口通讯
配置复杂,速率高。先连上USB,配置流程如下:
连接后,配置IP
Push enter to start console.
####
##########
########## .... Freescale Semiconductor Inc.
#### .......... Copyright (c) 2015
.......... #### All Rights Reserved
.... ##########
########## Codewarrior TAP Firmware
.... #### Boot Loader Version 1.0.1
.......... built Mon Aug 26 18:55:20 UTC 2013
.......... #### OS Version 1.0.4
#### .... ########## built Thu Apr 23 22:28:59 UTC 2015
########## ##########
########## .... #### Main Board: CodeWarrior TAP (3.3V)
#### .......... Probe Tip: Power Architecture JTAG/COP
..........
#### ....
########## Note: This product uses open-source
########## components. See "help license"
#### for details.
Network not configured - defaulting to DHCP
core> help
Help is available for these commands:
arp ARP table commands.
ccs Display/manage CCS firmware
gdbproxy Display/manage gdbproxy firmware
help Get help on commands
host Host table commands
license Displays open-source license details
netparam Show/set nonvolatile networking parameters.
netstat Display network protocol statistics.
ping Test if host is alive.
reset Reboot this device.
route Route table commands.
tgreset Reset target
tgtty Get/set tty settings for target serial
who List any open connections.
core> help netparam
Usage: netparam [subcommand <subcommand options>]
This command displays or sets nonvolatile networking
parameters. If called with no subcommand, it displays all
parameters. When called with one of the subcommands listed
below, it changes the parameters associated with that command.
Note that when changed, some parameters will not be activated
until the unit is rebooted.
Use "netparam <subcommand> --help" for help on a specific
subcommand.
Netparam recognizes the following subcommands:
add_host Add static host
add_route Add static route
bootconfig Boot method selection
delete_host Delete static host
delete_route Delete static route
static_ip_address Specify static IP address
static_dns_server Specify DNS server address
设置静态IP,命令会阻塞10s,这个时候CodeWarrior TAP的RX/TX灯变为绿色,
core> netparam static_ip_address 192.168.6.223 # wait for 10s
core> netparam add_route 192.168.6.254 gateway_ip 1 # hop_cnt=1
core> netparam bootconfig static:cw-tap0
Netmask defaults to 255.255.255.0
Using dynamic IP address 192.168.6.223
core> ping 192.168.6.6
PING 192.168.6.6 (192.168.6.6): 56 data bytes
64 bytes from 192.168.6.6: seq=0 ttl=128 time=0.917 ms
64 bytes from 192.168.6.6: seq=1 ttl=128 time=0.640 ms
--- 192.168.6.6 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.640/0.778/0.917 ms
跨网段设置路由,有警告但是设置成功。
core> netparam add_route 192.168.12.0 192.168.6.254 1
Netmask defaults to 255.255.255.0
gateway_ip: Unknown host
route: netmask doesn't match route address
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for specified AF.
route {-V|--version} Display version/author and exit.
-v, --verbose be verbose
-n, --numeric don't resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) ax25 (AMPR AX.25) netrom (AMPR NET/ROM)
ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25)
SIOCADDRT: File exists
core> ping 192.168.12.16
PING 192.168.12.16 (192.168.12.16): 56 data bytes
64 bytes from 192.168.12.16: seq=0 ttl=127 time=2.608 ms
64 bytes from 192.168.12.16: seq=1 ttl=127 time=0.526 ms
64 bytes from 192.168.12.16: seq=2 ttl=127 time=0.585 ms
--- 192.168.12.16 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.526/1.239/2.608 ms
查看路由表
core> netparam add_route 192.168.16.0 192.168.6.254 1
Netmask defaults to 255.255.255.0
gateway_ip: Unknown host
route: netmask doesn't match route address
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for specified AF.
route {-V|--version} Display version/author and exit.
-v, --verbose be verbose
-n, --numeric don't resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) ax25 (AMPR AX.25) netrom (AMPR NET/ROM)
ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25)
SIOCADDRT: File exists
SIOCADDRT: File exists
core> netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
169.254.0.0 * 255.255.0.0 U 0 0 0 usb0
192.168.6.0 * 255.255.255.0 U 0 0 0 eth0
192.168.6.0 192.168.6.254 255.255.255.0 UG 0 0 0 eth0
192.168.12.0 192.168.6.254 255.255.255.0 UG 0 0 0 eth0
192.168.16.0 192.168.6.254 255.255.255.0 UG 0 0 0 eth0
重启,需要把secureCRT的串口disconnect
core> reset
Close this configuration console to reboot...
(hit Ctrl+c to abort)
再重新打开,输入回车,和之前显示不一样了
Push enter to start console.
####
##########
########## .... Freescale Semiconductor Inc.
#### .......... Copyright (c) 2015
.......... #### All Rights Reserved
.... ##########
########## Codewarrior TAP Firmware
.... #### Boot Loader Version 1.0.1
.......... built Mon Aug 26 18:55:20 UTC 2013
.......... #### OS Version 1.0.4
#### .... ########## built Thu Apr 23 22:28:59 UTC 2015
########## ##########
########## .... #### Main Board: CodeWarrior TAP (3.3V)
#### .......... Probe Tip: Power Architecture JTAG/COP
..........
#### ....
########## Note: This product uses open-source
########## components. See "help license"
#### for details.
Network configuration is static:cw-tap0
Using static IP address 192.168.6.223
这个时候,断开USB,采用USB供电,方可使用网络来连接,下载器自带了一个串口,设置串口参数,查看串口设置
core> help tgtty
Usage: tgtty [<options>]
Use this command to get and set target serial settings. Without
options, this command displays current settings. The following
options are accepted:
[reset] -- terminates any open connections
[default] -- set default settings
[<9600 | 19200 | 38400 | 57600 | 115200>] -- baud rate
[<data5 | data6 | data7 | data8>] -- data bits
[<stop1 | stop2>] -- stop bits
[<noparity | oddparity | evenparity>] -- parity
[<rtscts | nortscts | rxtx>] -- hardware flow control
[<noxon | xon>] -- XON/XOFF flow control
[<echo | noecho>] -- whether the target echos
The default settings are:
9600 data8 stop1 noparity nortscts noxon echo
core> tgtty
115200 data8 stop1 noparity nortscts noxon echo
设置参数,会自动保存
core> tgtty 115200 data8 stop1 noparity nortscts noxon echo
恢复默认
core> tgtty default
使用这个串口,telnet登录下载器的1082端口。