一、安装CodeWarrior Development Stdio 软件
请到官网下载对应的软件。
二、刚购买的CodeWarrior TAP 需要设置IP等
a) 用串口线链接TAP的USB Connector后,打开串口助手后会显示下面内容
b) 配置TAP的静态IP地址
三、利用CodeWarrior IDE下载 bootrom.bin 到 nor flash中
a)新建 Bareboard project wizard
b)添加项目名称以及路径
c) 选择处理器类型,因为我们使用的处理类型未P2020RDB-PCA,所以选择下面标识的,然后点击Next
d) 配置硬件连接相关的信息
e) 选择语言,下载时可以忽略
f) 选择处理器个数与工程的关系,默认就可以,到此工程就创建完成了
g) 新建flash目标任务
在上边的标题栏点击,然后进行下面配置
h) 点击目标任务,配置flash编程参数(根据实际情况改写),然后点击执行
四、下载过程
fl::target -lc "load"
fl::target -b 0x0 0x40000
fl::target -v off -l off
cmdwin::fl::device -d "S29GL128P" -o "8Mx16x1" -a 0xff000000 0xffffffff
cmdwin::fl::image -f "C:\\Users\\Administrator.MICROSOFT\\Desktop\\bootrom.bin" -t "Auto Detect" -re on -r 0xff000000 0xffffffff -oe on -o 0xfff00000
cmdwin::fl::erase image
Beginning Operation ...
-------------------------
Auto-detection is successful.
File is of type Binary/Raw Format.
Performing target initialization ...
Downloading Flash Device Driver ...
Reading flash ID ...
Erasing Sector 0xFFF00000 to 0xFFF1FFFF
Erasing Sector 0xFFF20000 to 0xFFF3FFFF
Erasing Sector 0xFFF40000 to 0xFFF5FFFF
Erasing Sector 0xFFF60000 to 0xFFF7FFFF
Erasing Sector 0xFFF80000 to 0xFFF9FFFF
Erasing Sector 0xFFFA0000 to 0xFFFBFFFF
Erasing Sector 0xFFFC0000 to 0xFFFDFFFF
Erasing Sector 0xFFFE0000 to 0xFFFFFFFF
Erasing .....
Erase Command Succeeded
cmdwin::fl::write
-------------------------
Using restricted address range 0xFF000000 to 0xFFFFFFFF
Programming file C:\Users\Administrator.MICROSOFT\Desktop\bootrom.bin
Auto-detection is successful.
File is of type Binary/Raw Format.
Downloading Flash Device Driver ...
Reading flash ID ...
Auto-detection is successful.
File is of type Binary/Raw Format.
Downloading 0x00010000 bytes to be programmed at 0xFFF00000
Downloading 0x00010000 bytes to be programmed at 0xFFF10000
Downloading 0x00010000 bytes to be programmed at 0xFFF20000
Executing program ....
Program Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0xFFF30000
Downloading 0x00010000 bytes to be programmed at 0xFFF40000
Downloading 0x00010000 bytes to be programmed at 0xFFF50000
Executing program ....
Program Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0xFFF60000
Downloading 0x00010000 bytes to be programmed at 0xFFF70000
Downloading 0x00010000 bytes to be programmed at 0xFFF80000
Executing program ....
Program Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0xFFF90000
Downloading 0x00010000 bytes to be programmed at 0xFFFA0000
Downloading 0x00010000 bytes to be programmed at 0xFFFB0000
Executing program ....
Program Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0xFFFC0000
Downloading 0x00010000 bytes to be programmed at 0xFFFD0000
Downloading 0x00010000 bytes to be programmed at 0xFFFE0000
Executing program ....
Program Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0xFFFF0000
Executing program ....
Program Command Succeeded