1、【更新】移植说明文档及部分配置注释说明。

Signed-off-by: armink <armink.ztl@gmail.com>
pull/7/merge
armink 9 years ago
parent 387933dcc1
commit a16ea0a1be

@ -75,14 +75,13 @@
* 1.Normal mode: no more limitations
* 2.Wear leveling mode: system section will used an flash section and the data section will used at least 2 flash sections
* 3.Power fail safeguard mode: ENV area will has an backup. It is twice as normal mode.
* 4.wear leveling and power fail safeguard mode: The system section will used an flash section.
* The data section is twice as wear leveling mode data section size.
* 4.wear leveling and power fail safeguard mode: The required capacity will be 2 times the total capacity in wear leveling mode.
* For example:
* The EF_ERASE_MIN_SIZE is 128K and the ENV_USER_SETTING_SIZE: 2K. The ENV_AREA_SIZE in different mode you can define
* 1.Normal mode: 1*EF_ERASE_MIN_SIZE
* 2.Wear leveling mode: 2*EF_ERASE_MIN_SIZE (It has 2 flash section to store ENV. So ENV can erase at least 200,000 times)
* 2.Wear leveling mode: 3*EF_ERASE_MIN_SIZE (It has 2 data section to store ENV. So ENV can erase at least 200,000 times)
* 3.Power fail safeguard mode: 2*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 5*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 6*EF_ERASE_MIN_SIZE
* @note the log area size must be more than twice of EF_ERASE_MIN_SIZE
*/
/* backup area start address */
@ -95,7 +94,7 @@
#define ENV_AREA_SIZE (1 * EF_ERASE_MIN_SIZE) /* 2K */
#else
/* ENV area total bytes size in wear leveling mode. */
#define ENV_AREA_SIZE (4 * EF_ERASE_MIN_SIZE) /* 8K */
#define ENV_AREA_SIZE (3 * EF_ERASE_MIN_SIZE) /* 6K */
#endif
#else
#ifndef EF_ENV_USING_WL_MODE
@ -103,7 +102,7 @@
#define ENV_AREA_SIZE (2 * EF_ERASE_MIN_SIZE) /* 4K */
#else
/* ENV area total bytes size in wear leveling and power fail safeguard mode. */
#define ENV_AREA_SIZE (5 * EF_ERASE_MIN_SIZE) /* 10K */
#define ENV_AREA_SIZE (6 * EF_ERASE_MIN_SIZE) /* 12K */
#endif
#endif
/* saved log area size */

@ -66,14 +66,13 @@
* 1.Normal mode: no more limitations
* 2.Wear leveling mode: system section will used an flash section and the data section will used at least 2 flash sections
* 3.Power fail safeguard mode: ENV area will has an backup. It is twice as normal mode.
* 4.wear leveling and power fail safeguard mode: The system section will used an flash section.
* The data section is twice as wear leveling mode data section size.
* 4.wear leveling and power fail safeguard mode: The required capacity will be 2 times the total capacity in wear leveling mode.
* For example:
* The EF_ERASE_MIN_SIZE is 128K and the ENV_USER_SETTING_SIZE: 2K. The ENV_AREA_SIZE in different mode you can define
* 1.Normal mode: 1*EF_ERASE_MIN_SIZE
* 2.Wear leveling mode: 2*EF_ERASE_MIN_SIZE (It has 2 flash section to store ENV. So ENV can erase at least 200,000 times)
* 2.Wear leveling mode: 3*EF_ERASE_MIN_SIZE (It has 2 data section to store ENV. So ENV can erase at least 200,000 times)
* 3.Power fail safeguard mode: 2*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 5*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 6*EF_ERASE_MIN_SIZE
* @note the log area size must be more than twice of EF_ERASE_MIN_SIZE
*/
/* backup area start address */
@ -86,7 +85,7 @@
#define ENV_AREA_SIZE (1 * EF_ERASE_MIN_SIZE) /* 4K */
#else
/* ENV area total bytes size in wear leveling mode. */
#define ENV_AREA_SIZE (4 * EF_ERASE_MIN_SIZE) /* 16K */
#define ENV_AREA_SIZE (3 * EF_ERASE_MIN_SIZE) /* 16K */
#endif
#else
#ifndef EF_ENV_USING_WL_MODE
@ -94,7 +93,7 @@
#define ENV_AREA_SIZE (2 * EF_ERASE_MIN_SIZE) /* 8K */
#else
/* ENV area total bytes size in wear leveling and power fail safeguard mode. */
#define ENV_AREA_SIZE (5 * EF_ERASE_MIN_SIZE) /* 20K */
#define ENV_AREA_SIZE (6 * EF_ERASE_MIN_SIZE) /* 20K */
#endif
#endif
/* saved log area size */

@ -75,14 +75,13 @@
* 1.Normal mode: no more limitations
* 2.Wear leveling mode: system section will used an flash section and the data section will used at least 2 flash sections
* 3.Power fail safeguard mode: ENV area will has an backup. It is twice as normal mode.
* 4.wear leveling and power fail safeguard mode: The system section will used an flash section.
* The data section is twice as wear leveling mode data section size.
* 4.wear leveling and power fail safeguard mode: The required capacity will be 2 times the total capacity in wear leveling mode.
* For example:
* The EF_ERASE_MIN_SIZE is 128K and the ENV_USER_SETTING_SIZE: 2K. The ENV_AREA_SIZE in different mode you can define
* 1.Normal mode: 1*EF_ERASE_MIN_SIZE
* 2.Wear leveling mode: 2*EF_ERASE_MIN_SIZE (It has 2 flash section to store ENV. So ENV can erase at least 200,000 times)
* 2.Wear leveling mode: 6*EF_ERASE_MIN_SIZE (It has 2 data section to store ENV. So ENV can erase at least 200,000 times)
* 3.Power fail safeguard mode: 2*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 5*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 6*EF_ERASE_MIN_SIZE
* @note the log area size must be more than twice of EF_ERASE_MIN_SIZE
*/
/* backup area start address */
@ -95,7 +94,7 @@
#define ENV_AREA_SIZE (1 * EF_ERASE_MIN_SIZE) /* 2K */
#else
/* ENV area total bytes size in wear leveling mode. */
#define ENV_AREA_SIZE (4 * EF_ERASE_MIN_SIZE) /* 8K */
#define ENV_AREA_SIZE (3 * EF_ERASE_MIN_SIZE) /* 6K */
#endif
#else
#ifndef EF_ENV_USING_WL_MODE
@ -103,7 +102,7 @@
#define ENV_AREA_SIZE (2 * EF_ERASE_MIN_SIZE) /* 4K */
#else
/* ENV area total bytes size in wear leveling and power fail safeguard mode. */
#define ENV_AREA_SIZE (5 * EF_ERASE_MIN_SIZE) /* 10K */
#define ENV_AREA_SIZE (6 * EF_ERASE_MIN_SIZE) /* 12K */
#endif
#endif
/* saved log area size */

@ -68,14 +68,13 @@
* 1.Normal mode: no more limitations
* 2.Wear leveling mode: system section will used an flash section and the data section will used at least 2 flash sections
* 3.Power fail safeguard mode: ENV area will has an backup. It is twice as normal mode.
* 4.wear leveling and power fail safeguard mode: The system section will used an flash section.
* The data section is twice as wear leveling mode data section size.
* 4.wear leveling and power fail safeguard mode: The required capacity will be 2 times the total capacity in wear leveling mode.
* For example:
* The EF_ERASE_MIN_SIZE is 128K and the ENV_USER_SETTING_SIZE: 2K. The ENV_AREA_SIZE in different mode you can define
* 1.Normal mode: 1*EF_ERASE_MIN_SIZE
* 2.Wear leveling mode: 2*EF_ERASE_MIN_SIZE (It has 2 flash section to store ENV. So ENV can erase at least 200,000 times)
* 2.Wear leveling mode: 3*EF_ERASE_MIN_SIZE (It has 2 data section to store ENV. So ENV can erase at least 200,000 times)
* 3.Power fail safeguard mode: 2*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 5*EF_ERASE_MIN_SIZE
* 4.Wear leveling and power fail safeguard mode: 6*EF_ERASE_MIN_SIZE
* @note the log area size must be more than twice of EF_ERASE_MIN_SIZE
*/
/* backup area start address */
@ -88,7 +87,7 @@
#define ENV_AREA_SIZE (1 * EF_ERASE_MIN_SIZE) /* 128K */
#else
/* ENV area total bytes size in wear leveling mode. */
#define ENV_AREA_SIZE (4 * EF_ERASE_MIN_SIZE) /* 512K */
#define ENV_AREA_SIZE (3 * EF_ERASE_MIN_SIZE) /* 384K */
#endif
#else
#ifndef EF_ENV_USING_WL_MODE
@ -96,7 +95,7 @@
#define ENV_AREA_SIZE (2 * EF_ERASE_MIN_SIZE) /* 256K */
#else
/* ENV area total bytes size in wear leveling and power fail safeguard mode. */
#define ENV_AREA_SIZE (5 * EF_ERASE_MIN_SIZE) /* 640K */
#define ENV_AREA_SIZE (6 * EF_ERASE_MIN_SIZE) /* 768K */
#endif
#endif
/* saved log area size */

@ -25,9 +25,10 @@
|\easyflash\src\ef_utils.c |EasyFlash常用小工具例如CRC32|
|\easyflash\src\easyflash.c |目前只包含EasyFlash初始化方法|
|\easyflash\port\ef_port.c |不同平台下的EasyFlash移植接口|
|\demo\env\stm32f10x\non_os |stm32f10x裸机的Env demo|
|\demo\env\stm32f10x\rtt |stm32f10x基于[RT-Thread](http://www.rt-thread.org/)的Env demo|
|\demo\env\stm32f4xx |stm32f4xx基于[RT-Thread](http://www.rt-thread.org/)的Env demo|
|\demo\env\stm32f10x\non_os |stm32f10x裸机片内Flash的Env demo|
|\demo\env\stm32f10x\non_os_spi_flash |stm32f10x裸机SPI Flash的Env demo|
|\demo\env\stm32f10x\rtt |stm32f10x基于[RT-Thread](http://www.rt-thread.org/)的片内Flash Env demo|
|\demo\env\stm32f4xx |stm32f4xx基于[RT-Thread](http://www.rt-thread.org/)的片内Flash Env demo|
|\demo\iap\ymodem+rtt.c |使用[RT-Thread](http://www.rt-thread.org/)+[Ymodem](https://github.com/RT-Thread/rt-thread/tree/master/components/utilities/ymodem)的IAP Demo|
|\demo\log\easylogger.c |基于[EasyLogger](https://github.com/armink/EasyLogger)的Log Demo|
@ -204,12 +205,12 @@ void ef_print(const char *format, ...)
- 1、常规模式没有差异
- 2、擦写平衡模式系统区将会占用1个`EF_ERASE_MIN_SIZE`大小数据区至少等使用2个以上Flash扇区
- 3、掉电保护模式环境变量区将会被备份所以总容量是常规模式的2倍
- 4、擦写平衡+掉电保护模式:系统区将会占用1个`EF_ERASE_MIN_SIZE`大小,数据区将会是擦写平衡模式下的数据区总容量的2倍。
- 4、擦写平衡+掉电保护模式:所需容量将会是擦写平衡模式下总容量的2倍。
- 例如:`EF_ERASE_MIN_SIZE`是128K`ENV_USER_SETTING_SIZE`是2K那么你可以这样定义不同模式下的环境变量总容量
- 1、常规模式`1*EF_ERASE_MIN_SIZE`
- 2、擦写平衡模式`3*EF_ERASE_MIN_SIZE`它将会有3个Flash扇区去存储环境变量按照每个Flash扇区可被擦写10W次计算那么当前配置至少可擦写30W次;
- 2、擦写平衡模式`3*EF_ERASE_MIN_SIZE`它将会有3个Flash扇区去存储环境变量1个系统区2个数据区按照每个Flash扇区可被擦写10W次计算那么当前配置至少可擦写20W次;
- 3、掉电保护模式`2*EF_ERASE_MIN_SIZE`;
- 4、擦写平衡+掉电保护模式:`5*EF_ERASE_MIN_SIZE`;
- 4、擦写平衡+掉电保护模式:`6*EF_ERASE_MIN_SIZE`;
#### 5.5.1 备份区起始地址

Loading…
Cancel
Save