说明:AdvancedToolKit1.71_Source_STD是freescale ATK1.71工具源码,对于烧写工具不支持的nand flash 类型就需要源码来添加,编译后生成.bin,才可以通过ATK1.71工具下载镜像到新类型的nand flash中。
1.下载AdvancedToolKit1.71_Source_STD
AdvancedToolKit1.71_Source_STD下载地址:
FSL_ATK_TOOL_1.7.1下载地址:
2.解压安装
安装后源码目录结构:
~/winxp/AdvancedToolKit1.71_Source_STD$ tree -d
.
|-- device_program
| |-- bin
| |-- cw_mcp
| | `-- mx31_nand_2kpage_mcp
| |-- flash
| | |-- mmc_flash
| | | |-- mx25_mmc
| | | | |-- inc
| | | | `-- src
| | | |-- mx35_mmc
| | | | |-- inc
| | | | `-- src
| | | |-- mx37_mmc
| | | | |-- inc
| | | | `-- src
| | | |-- mx3x_mmc
| | | | |-- inc
| | | | `-- src
| | | |-- mx51_mmc
| | | | |-- inc
| | | | `-- src
| | | `-- mx53_mmc
| | | |-- inc
| | | `-- src
| | |-- nand_flash
| | | |-- inc
| | | `-- src
| | |-- nor_flash
| | | `-- spansion
| | | |-- inc
| | | `-- src
| | |-- sd_flash
| | | `-- mx3x_sd
| | | |-- inc
| | | `-- src
| | |-- spi_flash
| | | |-- inc
| | | `-- src
| | `-- unit_test
| |-- fuse
| | `-- unit_test
| |-- global_inc
| |-- init
| `-- ram_kernel
| |-- obj
| | |-- mx31
| | `-- mx32
| `-- src
| `-- platform
| |-- mx25
| | |-- inc
| | `-- src
| |-- mx27
| | |-- inc
| | `-- src
| |-- mx31
| | |-- inc
| | `-- src
| |-- mx32
| | |-- inc
| | `-- src
| |-- mx35
| | |-- inc
| | `-- src
| |-- mx37
| | |-- inc
| | `-- src
| |-- mx51
| | |-- inc
| | `-- src
| `-- mx53
| |-- inc
| `-- src
|-- gui_application
| |-- bin
| |-- config
| |-- GridCtrl_src
| | |-- Experimental
| | `-- NewCellTypes
| |-- image
| |-- Platform
| |-- Release
| `-- res
`-- host_dll
|-- ComPort
|-- Debug
|-- Release
`-- res
编译所需环境:AdvancedToolKit1.71_Source_STD/
1.Cygwin
2.GNU gcc toolchain for cygwin
操作步骤:
1.安装AdvancedToolKit1.71_Source_STD,根据AdvancedToolKit1.71_Source_STD/FSL_ATK_ReferenceManual_Std.pdf P15页说明安装GCC toolchain,Cygwin。
2.添加新的nand flash类型
ATK1.71版本需要修改device_program/flash/nand_flash/src/nand_device_info.c,对于之前的版本需要修改device_program/flash/nand_flash/src/nand_ids.c
例如:要添加K9F1G08R0A型号的nand flash,
查阅nand flash 芯片手册得知:
厂商ID(man_id):0xec
设备ID(dev_id):0xa1
芯片大小(chip_size_in_bytes):128MB
每块页数(ppb):64
页大小(page_size):2KB
OOB区域大小(oob_size):64B
所也在nand_device_info.c中添加nand结构信息如下:
{
.end_of_table = false,
.man_id = 0xec,
.dev_id = 0xa1,
.cell_type = NAND_DEVICE_CELL_TECH_SLC,
.chip_size_in_bytes = 128LL*SZ_1M,
.ppb = 64,
.page_size = 2*SZ_1K,
.oob_size = 64,
.bbm_offset = 0,
.bbi_page_offset = 0,
.bus_width = 8,
.scan_pg_num = 1,
.model = "K9F1G08R0A",
},
3.编译
启动Cygwin,进入目录AdvancedToolKit1.71_Source_STD/device_program
根据AdvancedToolKit1.71_Source_STD/FSL_ATK_ReferenceManual_Std.pdf P16页说明操作
阅读(3451) | 评论(0) | 转发(0) |