天嵌 ARM开发社区

 找回密码
 注册
查看: 2766|回复: 1

天嵌的环境变量大小配置CFG_ENV_SIZE是不是不对啊?

[复制链接]
albert 发表于 2011-4-15 14:53:33 | 显示全部楼层 |阅读模式
本帖最后由 albert 于 2011-4-15 14:55 编辑

#define PHYS_FLASH_1                        0x00000000 /* Flash Bank #1 */
#define CFG_FLASH_BASE                        PHYS_FLASH_1

#define CFG_MAX_FLASH_BANKS                1        /* max number of memory banks */
#ifdef CONFIG_AMD_LV800
#define PHYS_FLASH_SIZE                        0x00200000 /* 2MB */
#define CFG_MAX_FLASH_SECT                (19)        /* max number of sectors on one chip */
#define CFG_ENV_ADDR                        (CFG_FLASH_BASE + 0x1F0000) /* addr of environment */
#endif

//#define        CFG_ENV_IS_IN_FLASH                1
#define CFG_ENV_IS_IN_NAND                1
#define CFG_ENV_OFFSET                        0x40000
#define CFG_ENV_SIZE64                        0xc000        /* Total Size of Environment Sector */
#if(CONFIG_64MB_Nand == 1)  //CONFIG_64MB_Nand == 0,所以0xc000没配置#define CFG_ENV_SIZE                        0xc000        /* Total Size of Environment Sector */
#else                                         //实际配置的是0x20000=128KB

#define CFG_ENV_SIZE                        0x20000        /* Total Size of Environment Sector */
#endif

疑惑:因为nor flash的大小为2M,而#define CFG_ENV_ADDR        (CFG_FLASH_BASE + 0x1F0000) ,所以0x200000-0x1F0000=0x10000=64KB了,而上面#define CFG_ENV_SIZE                        0x20000        /* Total Size of Environment Sector */ 实际上是配置了128KB了

如果说是nand flash的话,应该没上面问题,但实际配置的是nor flash的啊
绵羊1020 发表于 2012-3-5 18:08:13 | 显示全部楼层
我也有同样的问题呀!不知道lz解决没有
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-5-25 21:51 , Processed in 1.062500 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表