您的位置:首页 > 其它

WINCE cvrtbin命令简介

2010-10-25 22:03 169 查看
********************************LoongEmbedded********************************
作者:LoongEmbedded(kandi)
时间:2010.10.25
类别:WINCE嵌入式操作系统
********************************LoongEmbedded********************************
WINCE cvrtbin命令简介
关于cvrtbin的用途,最常用的就是将NK.bin转换出NK.nb0。用法如下:
Cvrtbin (Cvrtbin.exe) is a command-line tool that converts read-only memory (ROM) files from binary (.bin) format to Motorola 32-bit (.sre) format or absolute binary (.abx) format.

cvrtbin <-r | -s> -a StartAddress -l ImageLength -w ImageWidth filename

Parameters
-s
Generates an .sre file from a .bin file.
-r
Generates a ROM file from a .bin file.
-a
Specifies the ROM starting address. You must specify this parameter when converting a .bin file to a ROM format.
-w
Specifies ROM width, which is set to either 8, 16, or 32 bits. You must specify this parameter when converting a .bin file to a ROM format.
-l
Specifies ROM length, expressed as a hexadecimal value. You must specify this parameter when converting a bin file to a ROM format.

StartAddress
Specifies the start of the run-time image in memory.

ImageLength
Specifies the length of the run-time image in memory.

ImageWidth
Specifies the width of the run-time image in memory.

filename
Specifies the file name of the target run-time image, typically nk.bin.

cvrtbin [options] [filename]
-s 从bin文件中产生sre文件
-r 从bin文件中产生rom文件
-a rom文件的起始地址
-w 总线的宽度
-l rom文件的大小
这个工具可以和viewbin工具一起使用,将NK.bin文件转换成NK.nb0。首先通过:viewbin nk.bin命令获得NK.bin的起始地址和大小,如下所示:



从上图可以知道image start和length的值,然后通过下面的命令:
Cvrtbin –r –a 0x80200000 –l 0x00E6610C –w 32 nk.bin
如下图所示:



也可以通过下面的命令:
Cvrtbin –a 0x80200000 –l 0x00E6610C –w 32 –r nk.bin,如下图所示:



这样就可以将NK.bin转换成NK.nb0。起始地址为0x802C0000,大小是0x00E6610C,总线宽度为32bit,最后输出NK.nb0,也可以通过下面的命令来输出到output.txt文本文件中



输出的output.txt文本文件如下



……………………….




也可以通过上面类似的命令来生成.src文件,我们也可以在config.bib中通过加入如下内容:
SRE=ON
这样在编译的时候Romimage.exe就会编译生成NK.src文件,如果config.bib中没有SRE的设置或者是SRE=OFF,Romimage.exe就不会编译生成NK.src文件。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: