flash 主要由 flashloader upgrade image1/upgradeimage2 及 data partition 三部分组成
这里要注意生成固件一定要指定boot partition 的大小,否则 data partition 部分为0 ,无法进行flash 读写操作
xflash相关帮助
factory image 用于flash 烧录的bin文件
--factory <xe-file> [size]
size 单位是bytes
也可以k为结尾,代表 kilobytes kbytes
upgrade iamge 用于dfu驱动更新的bin文件
--upgrade <id> <xe-file> [size]
id 必须唯一 且比0大
size 规则同上
如果没用factory image 进行指定,可使用-o 标记只进行 upgrade image 升级
--factory-version arg 指定使用的版本
When making an upgrade image or performing
analysis, specify the tools version that built the
factory image;
arg = <10|11|12|13.X|14.X|15.X>
Specifies version as the tools release master version that was used to create the factory image. Accepted values are: 10, 11, 12, 13.0, 13.1, 13.2, 14.0, 14.1, 14.2, 14.3, 14.4, 15.0, 15.1 and 15.2. This option need only be specified when --upgrade is provided but --factory is not. This option will ensure that the produced flash upgrade image is of the correct format for the installed factory image.
--boot-partition-size <n>
指定 boot-partition 部分的大小,n为byte ,如果未制定,默认使用整个flash 大小,如果要使用flash数据,必须要指定大小,比flash小就行,剩余的大小用于数据使用
--data [flash-name] <file>
Specifies the contents of file to be written to the data partition.
For a system with multiple flash boot sites, the data partition of the individual flash devices can be specified separately by repeatedly providing this option with flash-name set to the Name attribute of the flash device as defined in the XN file.
指定flash 相关信息
--loader <file>
指定 flash loader 函数 在file 文件中 ,此文件有可能是.o 或者.a
By default, the XTC flash loader selects the image with the highest version number. A custom loader may choose to override the selected image. Only valid images passing CRC checks - and additional signature checks, under secure boot - are considered for selection. The custom loader is not expected to perform this validation and only informs the XTC flash loader which of the available valid images is preferred.
--idnum <32-bit-integer>
Specifies a numerical identifier which will be stored in the flash.
--idstr <a_string>
Specifies a string identifier which will be stored in the flash.
--analyze <file>
Prints the data structures and extracts the individual sections of the xCORE flash binary or flash dump in file.
If the factory image was built using an older tools release, the option --factory-version must be set accordingly. If the flash binary is encrypted, --key can be specified to enable decryption and signature verification of the sections.
The output code sections can be individually disassembled to aid debugging.
--force
Disables interactive prompts for user confirmation of any action. This can be used to bypass target warnings without user interaction.
-l
ID Name Adapter ID Devices
-- ---- ---------- -------
打印 pc 和目标板 通过jtag 链接的情况用于 确定连接情况