1、【重构】EasyFlash方法及文件命名。

Signed-off-by: armink <armink.ztl@gmail.com>
pull/7/head
armink 11 years ago
parent c76c5df721
commit c9cc0c0562

@ -22,13 +22,13 @@ EasyFlash是一款开源的轻量级嵌入式Flash存储器库主要为MCU(Mi
|源文件 |描述 |
|:------------------------------ |:----- |
|\easyflash\src\flash_env.c |Env常规模式相关操作接口及实现源码|
|\easyflash\src\flash_env_wl.c |Env磨损平衡模式相关操作接口及实现源码|
|\easyflash\src\flash_iap.c |IAP 相关操作接口及实现源码|
|\easyflash\src\flash_log.c |Log 相关操作接口及实现源码|
|\easyflash\src\flash_utils.c |EasyFlash常用小工具例如CRC32|
|\easyflash\src\flash.c |目前只包含EasyFlash初始化方法|
|\easyflash\port\flash_port.c |不同平台下的EasyFlash移植接口及配置参数|
|\easyflash\src\ef_env.c |Env常规模式相关操作接口及实现源码|
|\easyflash\src\ef_env_wl.c |Env磨损平衡模式相关操作接口及实现源码|
|\easyflash\src\ef_iap.c |IAP 相关操作接口及实现源码|
|\easyflash\src\ef_log.c |Log 相关操作接口及实现源码|
|\easyflash\src\ef_utils.c |EasyFlash常用小工具例如CRC32|
|\easyflash\src\easyflash.c |目前只包含EasyFlash初始化方法|
|\easyflash\port\ef_port.c |不同平台下的EasyFlash移植接口及配置参数|
|\demo\stm32f10x\non_os |stm32f10x裸机的demo|
|\demo\stm32f10x\rtt |stm32f10x基于[RT-Thread](http://www.rt-thread.org/)的demo|
|\demo\stm32f4xx |stm32f4xx基于[RT-Thread](http://www.rt-thread.org/)的demo|
@ -50,19 +50,26 @@ Demo平台STM32F103RET6 + RT-Thread 1.2.2 + Env(2K bytes)
## 2、流程
### 2.1、环境变量
### 2.1、Env环境变量KV数据库
下图为通过控制台(终端)来调用环境变量的常用接口,演示了环境变量 `"temp"` 从创建到保存,再修改,最后删除的过程。这些接口都支持被应用层直接调用。
下图为通过控制台(终端)来调用环境变量的常用接口,演示了以下过程,这些接口都支持被应用层直接调用。
- 1、创建“温度”的环境变量名为 `temp`,并且赋值为 `123`
- 2、保存“温度”到Flash中并重启
- 3、检查“温度”是否被成功保存
- 4、修改“温度”值为 `456` 并保存、重启;
- 5、检查“温度”是否被成功修改
- 6、删除“温度”的环境变量。
![easy_flash_env](http://git.oschina.net/Armink/EasyFlash/raw/master/docs/zh/images/EnvDemo.gif)
### 2.2、在线升级
### 2.2、IAP在线升级
下图演示了通过控制台来进行IAP升级软件的过程使用的是库中自带的IAP功能接口演示采用的是串口+Ymodem协议的方式。你还也可以实现通过CAN、485、以太网等总线来实现远程网络更新。
![easy_flash_iap](http://git.oschina.net/Armink/EasyFlash/raw/master/docs/zh/images/IapDemo.gif)
### 2.3、日志存储
### 2.3、Log日志存储
下图过程为通过控制台输出日志并将输出的日志存储到Flash中。重启再读取上次保存的日志最后清空Flash日志。
@ -96,13 +103,13 @@ It's very suitable for small without a file system products. The developer can e
|Source file |Description |
|:------------------------------ |:----- |
|\easyflash\src\flash_env.c |Env (normal mode) interface and implementation source code.|
|\easyflash\src\flash_env_wl.c |Env (wear leveling mode) interface and implementation source code.|
|\easyflash\src\flash_iap.c |IAP interface and implementation source code.|
|\easyflash\src\flash_log.c |Log interface and implementation source code.|
|\easyflash\src\flash_utils.c |EasyFlash utils. For example CRC32.|
|\easyflash\src\flash.c |Currently contains EasyFlash initialization function only. |
|\easyflash\port\flash_port.c |EasyFlash portable interface and configuration for different platforms.|
|\easyflash\src\ef_env.c |Env (normal mode) interface and implementation source code.|
|\easyflash\src\ef_env_wl.c |Env (wear leveling mode) interface and implementation source code.|
|\easyflash\src\ef_iap.c |IAP interface and implementation source code.|
|\easyflash\src\ef_log.c |Log interface and implementation source code.|
|\easyflash\src\ef_utils.c |EasyFlash utils. For example CRC32.|
|\easyflash\src\easyflash.c |Currently contains EasyFlash initialization function only. |
|\easyflash\port\ef_port.c |EasyFlash portable interface and configuration for different platforms.|
|\demo\stm32f10x\non_os |stm32f10x non-os demo.|
|\demo\stm32f10x\rtt |stm32f10x demo base on [RT-Thread](http://www.rt-thread.org/).|
|\demo\stm32f4xx |stm32f4xx demo base on [RT-Thread](http://www.rt-thread.org/).|
@ -124,9 +131,16 @@ Welcome everyone to **star and pull request**([Github](https://github.com/armink
## 2 Flow
### 2.1 Env
### 2.1 Env(KV database)
The figure below shows an ENV's common interface be called by the console(terminal). These interfaces are supported by the application layer called.
The figure below shows an ENV's common interface be called by the console(terminal). The ENV `"temp"` from creation to save, and then modify the final delete process. These interfaces are supported by the application layer called.
- 1.Create temperature environment variable. It's name is `temp` and value is `123`;
- 2.Save temperature to flash and reboot;
- 3.Check the temperature has saved successfully;
- 4.Change the temperature value to `456` and save, reboot;
- 5.Check the temperature has changed successfully;
- 6.Delete temperature environment variable.
![easy_flash_env](https://raw.githubusercontent.com/armink/EasyFlash/master/docs/en/images/EnvDemo.gif)

File diff suppressed because it is too large Load Diff

@ -942,25 +942,25 @@
<group>
<name>port</name>
<file>
<name>$PROJ_DIR$\..\components\easyflash\port\flash_port.c</name>
<name>$PROJ_DIR$\..\components\easyflash\port\ef_port.c</name>
</file>
</group>
<group>
<name>src</name>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\easyflash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_env.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_env.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_env_wl.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_env_wl.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_iap.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_iap.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_utils.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_utils.c</name>
</file>
</group>
</group>

@ -34,7 +34,7 @@
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ShowCodeCoverage>1</ShowCodeCoverage><ShowInstrProfiling>1</ShowInstrProfiling></Disassembly>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item></item></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Windows>

@ -35,14 +35,14 @@
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>230</SelStart2><SelEnd2>230</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>40</SelStart2><SelEnd2>40</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02623dd8><key>iaridepm.enu1</key></Toolbar-02623dd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>744</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>771458</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>178</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>180</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>186143</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-02965388><key>iaridepm.enu1</key></Toolbar-02965388></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>675</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>700103</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>247</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>249</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>257497</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

@ -18,7 +18,7 @@
## 2、文件说明
`components\easyflash\port\flash_port.c` 移植参考文件
`components\easyflash\port\ef_port.c` 移植参考文件
`RVMDK` 下为Keil工程文件

@ -199,10 +199,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>52</ColumnNumber>
<ColumnNumber>34</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>1</TopLine>
<CurrentLine>12</CurrentLine>
<CurrentLine>1</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\APP\src\app.c</PathWithFileName>
<FilenameWithoutPath>app.c</FilenameWithoutPath>
@ -279,7 +279,7 @@
<cbSel>0</cbSel>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>6</FileNumber>
<FileNumber>0</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
@ -288,12 +288,12 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\easyflash\src\flash.c</PathWithFileName>
<FilenameWithoutPath>flash.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\easyflash\src\easyflash.c</PathWithFileName>
<FilenameWithoutPath>easyflash.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileNumber>0</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
@ -302,12 +302,12 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\easyflash\src\flash_env.c</PathWithFileName>
<FilenameWithoutPath>flash_env.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\easyflash\src\ef_env.c</PathWithFileName>
<FilenameWithoutPath>ef_env.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>8</FileNumber>
<FileNumber>0</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
@ -316,12 +316,12 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\easyflash\src\flash_env_wl.c</PathWithFileName>
<FilenameWithoutPath>flash_env_wl.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\easyflash\src\ef_env_wl.c</PathWithFileName>
<FilenameWithoutPath>ef_env_wl.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>9</FileNumber>
<FileNumber>0</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
@ -330,12 +330,12 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\easyflash\src\flash_iap.c</PathWithFileName>
<FilenameWithoutPath>flash_iap.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\easyflash\src\ef_iap.c</PathWithFileName>
<FilenameWithoutPath>ef_iap.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>10</FileNumber>
<FileNumber>0</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
@ -344,8 +344,8 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\..\easyflash\src\flash_utils.c</PathWithFileName>
<FilenameWithoutPath>flash_utils.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\..\easyflash\src\ef_utils.c</PathWithFileName>
<FilenameWithoutPath>ef_utils.c</FilenameWithoutPath>
</File>
<File>
<GroupNumber>3</GroupNumber>
@ -358,8 +358,8 @@
<TopLine>0</TopLine>
<CurrentLine>0</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\components\easyflash\port\flash_port.c</PathWithFileName>
<FilenameWithoutPath>flash_port.c</FilenameWithoutPath>
<PathWithFileName>..\components\easyflash\port\ef_port.c</PathWithFileName>
<FilenameWithoutPath>ef_port.c</FilenameWithoutPath>
</File>
</Group>
@ -2633,7 +2633,7 @@
<Name>File</Name>
<Buttons>
<Len>2002</Len>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050FFFFFFFF0096000000000000000000018024E10000020000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000004000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050FFFFFFFF0096000000000000000000018024E10000020000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
@ -4254,9 +4254,9 @@
<Documents>
<Doc>
<Name>..\APP\src\app.c</Name>
<ColumnNumber>52</ColumnNumber>
<ColumnNumber>34</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>12</CurrentLine>
<CurrentLine>1</CurrentLine>
</Doc>
</Documents>
</MDIGroup>

@ -421,34 +421,34 @@
<GroupName>easyflash</GroupName>
<Files>
<File>
<FileName>flash.c</FileName>
<FileName>easyflash.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\easyflash.c</FilePath>
</File>
<File>
<FileName>flash_env.c</FileName>
<FileName>ef_env.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_env.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_env.c</FilePath>
</File>
<File>
<FileName>flash_env_wl.c</FileName>
<FileName>ef_env_wl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_env_wl.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_env_wl.c</FilePath>
</File>
<File>
<FileName>flash_iap.c</FileName>
<FileName>ef_iap.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_iap.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_iap.c</FilePath>
</File>
<File>
<FileName>flash_utils.c</FileName>
<FileName>ef_utils.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_utils.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_utils.c</FilePath>
</File>
<File>
<FileName>flash_port.c</FileName>
<FileName>ef_port.c</FileName>
<FileType>1</FileType>
<FilePath>..\components\easyflash\port\flash_port.c</FilePath>
<FilePath>..\components\easyflash\port\ef_port.c</FilePath>
</File>
</Files>
</Group>

@ -1,10 +1,10 @@
Dependencies for Project 'EasyFlash', Target 'stm32f103xE': (DO NOT MODIFY !)
F (..\APP\src\app.c)(0x553211B1)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\app.o" --omf_browse ".\Output\app.crf" --depend ".\Output\app.d")
F (..\APP\src\app.c)(0x5599E982)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\app.o" --omf_browse ".\Output\app.crf" --depend ".\Output\app.d")
I (..\components\others\bsp.h)(0x55321114)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h)(0x545CB527)
@ -18,18 +18,18 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
I (C:\Program Files\Keil\ARM\RV31\INC\stdio.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
F (..\APP\src\stm32f10x_it.c)(0x553207D2)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_it.o" --omf_browse ".\Output\stm32f10x_it.crf" --depend ".\Output\stm32f10x_it.d")
F (..\APP\src\stm32f10x_it.c)(0x553207D2)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_it.o" --omf_browse ".\Output\stm32f10x_it.crf" --depend ".\Output\stm32f10x_it.d")
I (..\app\inc\stm32f10x_it.h)(0x545CB528)
I (..\components\others\bsp.h)(0x55321114)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h)(0x545CB527)
@ -44,12 +44,12 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\app\inc\stm32f10x_conf.h)(0x545CB528)()
F (..\components\others\bsp.c)(0x55321AB2)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\bsp.o" --omf_browse ".\Output\bsp.crf" --depend ".\Output\bsp.d")
F (..\components\others\bsp.c)(0x55321AB2)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\bsp.o" --omf_browse ".\Output\bsp.crf" --depend ".\Output\bsp.d")
I (..\components\others\bsp.h)(0x55321114)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h)(0x545CB527)
@ -65,37 +65,37 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdio.h)(0x4BA13B96)
F (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s)(0x553596CB)(--cpu Cortex-M3 -g --apcs=interwork --pd "__MICROLIB SETA 1" -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" --list ".\Output\list\startup_stm32f10x_hd.lst" --xref -o ".\Output\startup_stm32f10x_hd.o" --depend ".\Output\startup_stm32f10x_hd.d")
F (..\..\..\..\easyflash\src\flash.c)(0x553885FA)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash.o" --omf_browse ".\Output\flash.crf" --depend ".\Output\flash.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\..\..\..\easyflash\src\easyflash.c)(0x559796C4)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\easyflash.o" --omf_browse ".\Output\easyflash.crf" --depend ".\Output\easyflash.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
F (..\..\..\..\easyflash\src\flash_env.c)(0x55697260)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash_env.o" --omf_browse ".\Output\flash_env.crf" --depend ".\Output\flash_env.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\..\..\..\easyflash\src\ef_env.c)(0x559788F2)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\ef_env.o" --omf_browse ".\Output\ef_env.crf" --depend ".\Output\ef_env.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
I (C:\Program Files\Keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
I (C:\Program Files\Keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
F (..\..\..\..\easyflash\src\flash_env_wl.c)(0x55697253)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash_env_wl.o" --omf_browse ".\Output\flash_env_wl.crf" --depend ".\Output\flash_env_wl.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\..\..\..\easyflash\src\ef_env_wl.c)(0x559797C3)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\ef_env_wl.o" --omf_browse ".\Output\ef_env_wl.crf" --depend ".\Output\ef_env_wl.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
I (C:\Program Files\Keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
I (C:\Program Files\Keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
F (..\..\..\..\easyflash\src\flash_iap.c)(0x5538AEE1)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash_iap.o" --omf_browse ".\Output\flash_iap.crf" --depend ".\Output\flash_iap.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\..\..\..\easyflash\src\ef_iap.c)(0x5597877C)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\ef_iap.o" --omf_browse ".\Output\ef_iap.crf" --depend ".\Output\ef_iap.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
F (..\..\..\..\easyflash\src\flash_utils.c)(0x553880CA)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash_utils.o" --omf_browse ".\Output\flash_utils.crf" --depend ".\Output\flash_utils.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\..\..\..\easyflash\src\ef_utils.c)(0x55978410)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\ef_utils.o" --omf_browse ".\Output\ef_utils.crf" --depend ".\Output\ef_utils.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
F (..\components\easyflash\port\flash_port.c)(0x55697666)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\flash_port.o" --omf_browse ".\Output\flash_port.crf" --depend ".\Output\flash_port.d")
I (..\..\..\..\easyflash\inc\flash.h)(0x5569729C)
F (..\components\easyflash\port\ef_port.c)(0x5599F44D)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\ef_port.o" --omf_browse ".\Output\ef_port.crf" --depend ".\Output\ef_port.d")
I (..\..\..\..\easyflash\inc\easyflash.h)(0x5599EABD)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (C:\Program Files\Keil\ARM\RV31\INC\stddef.h)(0x4C10B340)
I (C:\Program Files\Keil\ARM\RV31\INC\stdbool.h)(0x4BD5D7FC)
@ -105,7 +105,7 @@ I (C:\Program Files\Keil\ARM\RV31\INC\stdarg.h)(0x4BD5D7FE)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h)(0x545CB527)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h)(0x545CB528)
@ -118,10 +118,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\misc.o" --omf_browse ".\Output\misc.crf" --depend ".\Output\misc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\misc.o" --omf_browse ".\Output\misc.crf" --depend ".\Output\misc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -136,10 +136,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_adc.o" --omf_browse ".\Output\stm32f10x_adc.crf" --depend ".\Output\stm32f10x_adc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_adc.o" --omf_browse ".\Output\stm32f10x_adc.crf" --depend ".\Output\stm32f10x_adc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -154,10 +154,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_bkp.o" --omf_browse ".\Output\stm32f10x_bkp.crf" --depend ".\Output\stm32f10x_bkp.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_bkp.o" --omf_browse ".\Output\stm32f10x_bkp.crf" --depend ".\Output\stm32f10x_bkp.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_bkp.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -173,10 +173,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_can.o" --omf_browse ".\Output\stm32f10x_can.crf" --depend ".\Output\stm32f10x_can.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_can.o" --omf_browse ".\Output\stm32f10x_can.crf" --depend ".\Output\stm32f10x_can.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h)(0x545CB527)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -191,10 +191,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_cec.o" --omf_browse ".\Output\stm32f10x_cec.crf" --depend ".\Output\stm32f10x_cec.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_cec.o" --omf_browse ".\Output\stm32f10x_cec.crf" --depend ".\Output\stm32f10x_cec.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_cec.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -210,10 +210,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_crc.o" --omf_browse ".\Output\stm32f10x_crc.crf" --depend ".\Output\stm32f10x_crc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_crc.o" --omf_browse ".\Output\stm32f10x_crc.crf" --depend ".\Output\stm32f10x_crc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_crc.h)(0x545CB527)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -229,10 +229,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dac.o" --omf_browse ".\Output\stm32f10x_dac.crf" --depend ".\Output\stm32f10x_dac.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dac.o" --omf_browse ".\Output\stm32f10x_dac.crf" --depend ".\Output\stm32f10x_dac.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dac.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -248,10 +248,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dbgmcu.o" --omf_browse ".\Output\stm32f10x_dbgmcu.crf" --depend ".\Output\stm32f10x_dbgmcu.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dbgmcu.o" --omf_browse ".\Output\stm32f10x_dbgmcu.crf" --depend ".\Output\stm32f10x_dbgmcu.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dbgmcu.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -267,10 +267,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dma.o" --omf_browse ".\Output\stm32f10x_dma.crf" --depend ".\Output\stm32f10x_dma.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_dma.o" --omf_browse ".\Output\stm32f10x_dma.crf" --depend ".\Output\stm32f10x_dma.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -286,10 +286,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_exti.o" --omf_browse ".\Output\stm32f10x_exti.crf" --depend ".\Output\stm32f10x_exti.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_exti.o" --omf_browse ".\Output\stm32f10x_exti.crf" --depend ".\Output\stm32f10x_exti.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -304,10 +304,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_flash.o" --omf_browse ".\Output\stm32f10x_flash.crf" --depend ".\Output\stm32f10x_flash.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_flash.o" --omf_browse ".\Output\stm32f10x_flash.crf" --depend ".\Output\stm32f10x_flash.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -322,10 +322,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_fsmc.o" --omf_browse ".\Output\stm32f10x_fsmc.crf" --depend ".\Output\stm32f10x_fsmc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_fsmc.o" --omf_browse ".\Output\stm32f10x_fsmc.crf" --depend ".\Output\stm32f10x_fsmc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_fsmc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -340,10 +340,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_gpio.o" --omf_browse ".\Output\stm32f10x_gpio.crf" --depend ".\Output\stm32f10x_gpio.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_gpio.o" --omf_browse ".\Output\stm32f10x_gpio.crf" --depend ".\Output\stm32f10x_gpio.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h)(0x545CB527)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -358,10 +358,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_i2c.o" --omf_browse ".\Output\stm32f10x_i2c.crf" --depend ".\Output\stm32f10x_i2c.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_i2c.o" --omf_browse ".\Output\stm32f10x_i2c.crf" --depend ".\Output\stm32f10x_i2c.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_i2c.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -377,10 +377,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_iwdg.o" --omf_browse ".\Output\stm32f10x_iwdg.crf" --depend ".\Output\stm32f10x_iwdg.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_iwdg.o" --omf_browse ".\Output\stm32f10x_iwdg.crf" --depend ".\Output\stm32f10x_iwdg.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_iwdg.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -395,10 +395,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_pwr.o" --omf_browse ".\Output\stm32f10x_pwr.crf" --depend ".\Output\stm32f10x_pwr.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_pwr.o" --omf_browse ".\Output\stm32f10x_pwr.crf" --depend ".\Output\stm32f10x_pwr.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_pwr.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -414,10 +414,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_rcc.o" --omf_browse ".\Output\stm32f10x_rcc.crf" --depend ".\Output\stm32f10x_rcc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_rcc.o" --omf_browse ".\Output\stm32f10x_rcc.crf" --depend ".\Output\stm32f10x_rcc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -432,10 +432,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_rtc.o" --omf_browse ".\Output\stm32f10x_rtc.crf" --depend ".\Output\stm32f10x_rtc.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_rtc.o" --omf_browse ".\Output\stm32f10x_rtc.crf" --depend ".\Output\stm32f10x_rtc.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rtc.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -451,10 +451,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_sdio.o" --omf_browse ".\Output\stm32f10x_sdio.crf" --depend ".\Output\stm32f10x_sdio.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_sdio.o" --omf_browse ".\Output\stm32f10x_sdio.crf" --depend ".\Output\stm32f10x_sdio.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_sdio.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -470,10 +470,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_spi.o" --omf_browse ".\Output\stm32f10x_spi.crf" --depend ".\Output\stm32f10x_spi.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_spi.o" --omf_browse ".\Output\stm32f10x_spi.crf" --depend ".\Output\stm32f10x_spi.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_spi.h)(0x545CB527)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -489,10 +489,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_tim.o" --omf_browse ".\Output\stm32f10x_tim.crf" --depend ".\Output\stm32f10x_tim.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c)(0x545CB529)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_tim.o" --omf_browse ".\Output\stm32f10x_tim.crf" --depend ".\Output\stm32f10x_tim.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -507,10 +507,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_usart.o" --omf_browse ".\Output\stm32f10x_usart.crf" --depend ".\Output\stm32f10x_usart.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_usart.o" --omf_browse ".\Output\stm32f10x_usart.crf" --depend ".\Output\stm32f10x_usart.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -525,10 +525,10 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_wwdg.o" --omf_browse ".\Output\stm32f10x_wwdg.crf" --depend ".\Output\stm32f10x_wwdg.d")
F (..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c)(0x545CB528)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\stm32f10x_wwdg.o" --omf_browse ".\Output\stm32f10x_wwdg.crf" --depend ".\Output\stm32f10x_wwdg.d")
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h)(0x545CB529)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)
@ -543,9 +543,9 @@ I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x545CB529)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x545CB528)
I (..\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x545CB528)
F (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\system_stm32f10x.o" --omf_browse ".\Output\system_stm32f10x.crf" --depend ".\Output\system_stm32f10x.d")
F (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c)(0x545CB527)(-c --cpu Cortex-M3 -D__MICROLIB -g -O0 -Otime --apcs=interwork --split_sections -I..\app\inc -I..\components\rtt_uart -I..\components\others -I..\Libraries\STM32F10x_StdPeriph_Driver\inc -I..\Libraries\CMSIS_RVMDK\CM3\CoreSupport -I..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x -I..\..\..\..\easyflash\inc -I "C:\Program Files\Keil\ARM\INC" -I "C:\Program Files\Keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -DUSE_FULL_ASSERT -o ".\Output\system_stm32f10x.o" --omf_browse ".\Output\system_stm32f10x.crf" --depend ".\Output\system_stm32f10x.d")
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\core_cm3.h)(0x4BDE8684)
I (..\Libraries\CMSIS_RVMDK\CM3\CoreSupport\core_cm3.h)(0x545CB528)
I (C:\Program Files\Keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x545CB527)
I (..\app\inc\stm32f10x_conf.h)(0x545CB528)

File diff suppressed because one or more lines are too long

@ -345,7 +345,7 @@
<MiscControls></MiscControls>
<Define>USE_STDPERIPH_DRIVER,STM32F10X_HD,USE_FULL_ASSERT</Define>
<Undefine></Undefine>
<IncludePath>..\app\inc;..\components\rtt_uart;..\components\others;..\Libraries\STM32F10x_StdPeriph_Driver\inc;..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x;..\..\..\..\flash\inc</IncludePath>
<IncludePath>..\app\inc;..\components\rtt_uart;..\components\others;..\Libraries\STM32F10x_StdPeriph_Driver\inc;..\Libraries\CMSIS_RVMDK\CM3\CoreSupport;..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x;..\..\..\..\easyflash\inc</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -421,34 +421,34 @@
<GroupName>easyflash</GroupName>
<Files>
<File>
<FileName>flash_port.c</FileName>
<FileName>easyflash.c</FileName>
<FileType>1</FileType>
<FilePath>..\components\flash\port\flash_port.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\easyflash.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
<FileName>env.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\env.c</FilePath>
</File>
<File>
<FileName>flash_env.c</FileName>
<FileName>env_wl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_env.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\env_wl.c</FilePath>
</File>
<File>
<FileName>flash_env_wl.c</FileName>
<FileName>iap.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_env_wl.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\iap.c</FilePath>
</File>
<File>
<FileName>flash_iap.c</FileName>
<FileName>ef_utils.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_iap.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_utils.c</FilePath>
</File>
<File>
<FileName>flash_utils.c</FileName>
<FileName>ef_port.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_utils.c</FilePath>
<FilePath>..\components\easyflash\port\ef_port.c</FilePath>
</File>
</Files>
</Group>

@ -1,5 +1,5 @@
#include "bsp.h"
#include "flash.h"
#include "easyflash.h"
#include <stdio.h>
#include <stdlib.h>
@ -9,7 +9,7 @@ int main(void){
BSP_Init();
if (flash_init() == FLASH_NO_ERR) {
if (easyflash_init() == EF_NO_ERR) {
/* test Env demo */
test_env();
}
@ -32,7 +32,7 @@ static void test_env(void) {
char *c_old_boot_times, c_new_boot_times[11] = {0};
/* get the boot count number from Env */
c_old_boot_times = flash_get_env("boot_times");
c_old_boot_times = ef_get_env("boot_times");
assert_param(c_old_boot_times);
i_boot_times = atol(c_old_boot_times);
/* boot count +1 */
@ -41,6 +41,6 @@ static void test_env(void) {
/* interger to string */
sprintf(c_new_boot_times,"%ld", i_boot_times);
/* set and store the boot count number to Env */
flash_set_env("boot_times", c_new_boot_times);
flash_save_env();
ef_set_env("boot_times", c_new_boot_times);
ef_save_env();
}

@ -26,7 +26,7 @@
* Created on: 2015-01-16
*/
#include "flash.h"
#include "easyflash.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@ -40,21 +40,21 @@
#endif
/* Environment variables start address */
#define FLASH_ENV_START_ADDR (FLASH_BASE + 100 * 1024) /* from the chip position: 100KB */
#define ENV_START_ADDR (FLASH_BASE + 100 * 1024) /* from the chip position: 100KB */
/* the minimum size of flash erasure */
#define FLASH_ERASE_MIN_SIZE PAGE_SIZE /* it is one page for STM32 */
#ifdef FLASH_ENV_USING_WEAR_LEVELING_MODE
#define ERASE_MIN_SIZE PAGE_SIZE /* it is one page for STM32 */
#ifdef EF_ENV_USING_WL_MODE
/* ENV section total bytes size in wear leveling mode. */
#define FLASH_ENV_SECTION_SIZE (4 * FLASH_ERASE_MIN_SIZE)/* 8K */
#define ENV_SECTION_SIZE (4 * ERASE_MIN_SIZE) /* 8K */
#else
/* ENV section total bytes size in normal mode. It's equal with FLASH_USER_SETTING_ENV_SIZE */
#define FLASH_ENV_SECTION_SIZE (FLASH_USER_SETTING_ENV_SIZE)
#define ENV_SECTION_SIZE (EF_USER_SETTING_ENV_SIZE)
#endif
/* print debug information of flash */
#define FLASH_PRINT_DEBUG
#define PRINT_DEBUG
/* default environment variables set for user */
static const flash_env default_env_set[] = {
static const ef_env default_env_set[] = {
{"iap_need_copy_app","0"},
{"iap_copy_app_size","0"},
{"stop_in_bootloader","0"},
@ -76,18 +76,18 @@ static char log_buf[128];
*
* @return result
*/
FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
flash_env const **default_env, size_t *default_env_size, size_t *log_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
ef_env const **default_env, size_t *default_env_size, size_t *log_size) {
EfErrCode result = EF_NO_ERR;
EF_ASSERT(EF_USER_SETTING_ENV_SIZE % 4 == 0);
EF_ASSERT(ENV_SECTION_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_ENV_SECTION_SIZE % 4 == 0);
*env_addr = FLASH_ENV_START_ADDR;
*env_total_size = FLASH_ENV_SECTION_SIZE;
*erase_min_size = FLASH_ERASE_MIN_SIZE;
*env_addr = ENV_START_ADDR;
*env_total_size = ENV_SECTION_SIZE;
*erase_min_size = ERASE_MIN_SIZE;
*default_env = default_env_set;
*default_env_size = sizeof(default_env_set)/sizeof(default_env_set[0]);
*default_env_size = sizeof(default_env_set) / sizeof(default_env_set[0]);
return result;
}
@ -102,10 +102,10 @@ FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t
*
* @return result
*/
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
/*copy from flash to ram */
for (; size > 0; size -= 4, addr += 4, buf++) {
@ -125,13 +125,13 @@ FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
*
* @return result
*/
FlashErrCode flash_erase(uint32_t addr, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_erase(uint32_t addr, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_Status flash_status;
size_t erase_pages, i;
/* make sure the start address is a multiple of FLASH_ERASE_MIN_SIZE */
FLASH_ASSERT(addr % FLASH_ERASE_MIN_SIZE == 0);
EF_ASSERT(addr % ERASE_MIN_SIZE == 0);
/* calculate pages */
erase_pages = size / PAGE_SIZE;
@ -145,7 +145,7 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
for (i = 0; i < erase_pages; i++) {
flash_status = FLASH_ErasePage(addr + (PAGE_SIZE * i));
if (flash_status != FLASH_COMPLETE) {
result = FLASH_ERASE_ERR;
result = EF_ERASE_ERR;
break;
}
}
@ -164,12 +164,12 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
*
* @return result
*/
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
size_t i;
uint32_t read_data;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
FLASH_Unlock();
FLASH_ClearFlag(FLASH_FLAG_BSY | FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPRTERR);
@ -179,7 +179,7 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
read_data = *(uint32_t *)addr;
/* check data */
if (read_data != *buf) {
result = FLASH_WRITE_ERR;
result = EF_WRITE_ERR;
break;
}
}
@ -191,14 +191,14 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
/**
* lock the ENV ram cache
*/
void flash_env_lock(void) {
void ef_port_env_lock(void) {
__disable_irq();
}
/**
* unlock the ENV ram cache
*/
void flash_env_unlock(void) {
void ef_port_env_unlock(void) {
__enable_irq();
}
@ -212,18 +212,18 @@ void flash_env_unlock(void) {
* @param ... args
*
*/
void flash_log_debug(const char *file, const long line, const char *format, ...) {
void ef_log_debug(const char *file, const long line, const char *format, ...) {
#ifdef FLASH_PRINT_DEBUG
#ifdef PRINT_DEBUG
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash](%s:%ld) ", file, line);
ef_print("[Flash](%s:%ld) ", file, line);
/* must use vprintf to print */
vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
printf("\r");
va_end(args);
@ -237,15 +237,15 @@ void flash_log_debug(const char *file, const long line, const char *format, ...)
* @param format output format
* @param ... args
*/
void flash_log_info(const char *format, ...) {
void ef_log_info(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash]");
ef_print("[Flash]");
/* must use vprintf to print */
vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
printf("\r");
va_end(args);
}
@ -255,7 +255,7 @@ void flash_log_info(const char *format, ...) {
* @param format output format
* @param ... args
*/
void flash_print(const char *format, ...) {
void ef_print(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */

File diff suppressed because it is too large Load Diff

@ -955,25 +955,25 @@
<group>
<name>port</name>
<file>
<name>$PROJ_DIR$\..\components\easyflash\port\flash_port.c</name>
<name>$PROJ_DIR$\..\components\easyflash\port\ef_port.c</name>
</file>
</group>
<group>
<name>src</name>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\easyflash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_env.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_env.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_env_wl.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_env_wl.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_iap.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_iap.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\flash_utils.c</name>
<name>$PROJ_DIR$\..\..\..\..\easyflash\src\ef_utils.c</name>
</file>
</group>
</group>

@ -34,7 +34,7 @@
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ShowCodeCoverage>1</ShowCodeCoverage><ShowInstrProfiling>1</ShowInstrProfiling></Disassembly>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item></item></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Windows>

@ -35,14 +35,14 @@
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app_task.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>208</SelStart2><SelEnd2>208</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app_task.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>21</SelStart2><SelEnd2>21</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02ea3dd8><key>iaridepm.enu1</key></Toolbar-02ea3dd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>744</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>771458</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>178</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>180</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>186143</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-02935388><key>iaridepm.enu1</key></Toolbar-02935388></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>744</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>771458</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>178</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>180</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>186143</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

@ -19,7 +19,7 @@
## 2、文件说明
`components\easyflash\port\flash_port.c` 移植参考文件
`components\easyflash\port\ef_port.c` 移植参考文件
`RVMDK` 下为Keil工程文件

File diff suppressed because one or more lines are too long

@ -461,34 +461,34 @@
<GroupName>easyflash</GroupName>
<Files>
<File>
<FileName>flash_port.c</FileName>
<FileName>easyflash.c</FileName>
<FileType>1</FileType>
<FilePath>..\components\easyflash\port\flash_port.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\easyflash.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
<FileName>ef_env.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_env.c</FilePath>
</File>
<File>
<FileName>flash_env.c</FileName>
<FileName>ef_env_wl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_env.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_env_wl.c</FilePath>
</File>
<File>
<FileName>flash_env_wl.c</FileName>
<FileName>ef_iap.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_env_wl.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_iap.c</FilePath>
</File>
<File>
<FileName>flash_iap.c</FileName>
<FileName>ef_utils.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_iap.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_utils.c</FilePath>
</File>
<File>
<FileName>flash_utils.c</FileName>
<FileName>ef_port.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\easyflash\src\flash_utils.c</FilePath>
<FilePath>..\components\easyflash\port\ef_port.c</FilePath>
</File>
</Files>
</Group>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -345,7 +345,7 @@
<MiscControls></MiscControls>
<Define>USE_STDPERIPH_DRIVER,STM32F10X_HD,USE_FULL_ASSERT</Define>
<Undefine></Undefine>
<IncludePath>..\app\inc;..\components\rtt_uart;..\components\others;..\Libraries\STM32F10x_StdPeriph_Driver\inc;..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x;..\RT-Thread-1.2.2\include;..\RT-Thread-1.2.2\components\drivers\include;..\RT-Thread-1.2.2\components\drivers\include\drivers;..\RT-Thread-1.2.2\components\finsh;..\..\..\..\flash\inc</IncludePath>
<IncludePath>..\app\inc;..\components\rtt_uart;..\components\others;..\Libraries\STM32F10x_StdPeriph_Driver\inc;..\Libraries\CMSIS_RVMDK\CM3\CoreSupport;..\Libraries\CMSIS_RVMDK\CM3\DeviceSupport\ST\STM32F10x;..\RT-Thread-1.2.2\include;..\RT-Thread-1.2.2\components\drivers\include;..\RT-Thread-1.2.2\components\drivers\include\drivers;..\RT-Thread-1.2.2\components\finsh;..\..\..\..\easyflash\inc</IncludePath>
</VariousControls>
</Cads>
<Aads>
@ -461,34 +461,34 @@
<GroupName>easyflash</GroupName>
<Files>
<File>
<FileName>flash_port.c</FileName>
<FileName>easyflash.c</FileName>
<FileType>1</FileType>
<FilePath>..\components\flash\port\flash_port.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\easyflash.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
<FileName>ef_utils.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\ef_utils.c</FilePath>
</File>
<File>
<FileName>flash_env.c</FileName>
<FileName>env.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_env.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\env.c</FilePath>
</File>
<File>
<FileName>flash_env_wl.c</FileName>
<FileName>env_wl.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_env_wl.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\env_wl.c</FilePath>
</File>
<File>
<FileName>flash_iap.c</FileName>
<FileName>iap.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_iap.c</FilePath>
<FilePath>..\..\..\..\easyflash\src\iap.c</FilePath>
</File>
<File>
<FileName>flash_utils.c</FileName>
<FileName>ef_port.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\flash\src\flash_utils.c</FilePath>
<FilePath>..\components\easyflash\port\ef_port.c</FilePath>
</File>
</Files>
</Group>

@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "bsp.h"
#include "flash.h"
#include "easyflash.h"
#include "finsh.h"
#include "shell.h"
#include "delay_conf.h"
@ -64,7 +64,7 @@ void test_env(void) {
char *c_old_boot_times, c_new_boot_times[11] = {0};
/* get the boot count number from Env */
c_old_boot_times = flash_get_env("boot_times");
c_old_boot_times = ef_get_env("boot_times");
RT_ASSERT(c_old_boot_times);
i_boot_times = atol(c_old_boot_times);
/* boot count +1 */
@ -73,8 +73,8 @@ void test_env(void) {
/* interger to string */
sprintf(c_new_boot_times,"%ld", i_boot_times);
/* set and store the boot count number to Env */
flash_set_env("boot_times", c_new_boot_times);
flash_save_env();
ef_set_env("boot_times", c_new_boot_times);
ef_save_env();
}
/**
@ -86,7 +86,7 @@ void sys_init_thread(void* parameter){
set_system_status(SYSTEM_STATUS_INIT);
/* EasyFlash initialization */
if (flash_init() == FLASH_NO_ERR) {
if (easyflash_init() == EF_NO_ERR) {
/* initialize OK and switch to running status */
set_system_status(SYSTEM_STATUS_RUN);
/* test Env demo */

@ -7,7 +7,7 @@
#include <rthw.h>
#include <rtthread.h>
#include <stm32f10x_conf.h>
#include "flash.h"
#include "easyflash.h"
#include "finsh.h"
void reboot(uint8_t argc, char **argv) {
@ -32,28 +32,28 @@ void setenv(uint8_t argc, char **argv) {
}
}
if (argc == 1) {
flash_set_env(value, value);
ef_set_env(value, value);
} else if (argc == 2) {
flash_set_env(argv[1], value);
ef_set_env(argv[1], value);
} else {
flash_set_env(argv[1], argv[2]);
ef_set_env(argv[1], argv[2]);
}
}
MSH_CMD_EXPORT(setenv, Set an envrionment variable.);
void printenv(uint8_t argc, char **argv) {
flash_print_env();
ef_print_env();
}
MSH_CMD_EXPORT(printenv, Print all envrionment variables.);
void saveenv(uint8_t argc, char **argv) {
flash_save_env();
ef_save_env();
}
MSH_CMD_EXPORT(saveenv, Save all envrionment variables to flash.);
void getvalue(uint8_t argc, char **argv) {
char *value = NULL;
value = flash_get_env(argv[1]);
value = ef_get_env(argv[1]);
if (value) {
rt_kprintf("The %s value is %s.\n", argv[1], value);
} else {

@ -26,7 +26,7 @@
* Created on: 2015-01-16
*/
#include "flash.h"
#include "easyflash.h"
#include <rthw.h>
#include <rtthread.h>
#include <stm32f10x_conf.h>
@ -39,21 +39,21 @@
#endif
/* Environment variables start address */
#define FLASH_ENV_START_ADDR (FLASH_BASE + 100 * 1024) /* from the chip position: 100KB */
#define ENV_START_ADDR (FLASH_BASE + 100 * 1024) /* from the chip position: 100KB */
/* the minimum size of flash erasure */
#define FLASH_ERASE_MIN_SIZE PAGE_SIZE /* it is one page for STM32 */
#ifdef FLASH_ENV_USING_WEAR_LEVELING_MODE
#define ERASE_MIN_SIZE PAGE_SIZE /* it is one page for STM32 */
#ifdef EF_ENV_USING_WL_MODE
/* ENV section total bytes size in wear leveling mode. */
#define FLASH_ENV_SECTION_SIZE (4 * FLASH_ERASE_MIN_SIZE)/* 8K */
#define ENV_SECTION_SIZE (4 * ERASE_MIN_SIZE) /* 8K */
#else
/* ENV section total bytes size in normal mode. It's equal with FLASH_USER_SETTING_ENV_SIZE */
#define FLASH_ENV_SECTION_SIZE (FLASH_USER_SETTING_ENV_SIZE)
#define ENV_SECTION_SIZE (EF_USER_SETTING_ENV_SIZE)
#endif
/* print debug information of flash */
#define FLASH_PRINT_DEBUG
#define PRINT_DEBUG
/* default environment variables set for user */
static const flash_env default_env_set[] = {
static const ef_env default_env_set[] = {
{"iap_need_copy_app","0"},
{"iap_copy_app_size","0"},
{"stop_in_bootloader","0"},
@ -61,7 +61,7 @@ static const flash_env default_env_set[] = {
{"boot_times","0"},
};
static char log_buf[RT_CONSOLEBUF_SIZE];
static char log_buf[128];
static struct rt_semaphore env_cache_lock;
/**
@ -76,25 +76,24 @@ static struct rt_semaphore env_cache_lock;
*
* @return result
*/
FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
flash_env const **default_env, size_t *default_env_size, size_t *log_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
ef_env const **default_env, size_t *default_env_size, size_t *log_size) {
EfErrCode result = EF_NO_ERR;
EF_ASSERT(EF_USER_SETTING_ENV_SIZE % 4 == 0);
EF_ASSERT(ENV_SECTION_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_ENV_SECTION_SIZE % 4 == 0);
*env_addr = FLASH_ENV_START_ADDR;
*env_total_size = FLASH_ENV_SECTION_SIZE;
*erase_min_size = FLASH_ERASE_MIN_SIZE;
*env_addr = ENV_START_ADDR;
*env_total_size = ENV_SECTION_SIZE;
*erase_min_size = ERASE_MIN_SIZE;
*default_env = default_env_set;
*default_env_size = sizeof(default_env_set)/sizeof(default_env_set[0]);
*default_env_size = sizeof(default_env_set) / sizeof(default_env_set[0]);
rt_sem_init(&env_cache_lock, "env lock", 1, RT_IPC_FLAG_PRIO);
return result;
}
/**
* Read data from flash.
* @note This operation's units is word.
@ -105,10 +104,10 @@ FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t
*
* @return result
*/
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
/*copy from flash to ram */
for (; size > 0; size -= 4, addr += 4, buf++) {
@ -128,13 +127,13 @@ FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
*
* @return result
*/
FlashErrCode flash_erase(uint32_t addr, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_erase(uint32_t addr, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_Status flash_status;
size_t erase_pages, i;
/* make sure the start address is a multiple of FLASH_ERASE_MIN_SIZE */
FLASH_ASSERT(addr % FLASH_ERASE_MIN_SIZE == 0);
EF_ASSERT(addr % ERASE_MIN_SIZE == 0);
/* calculate pages */
erase_pages = size / PAGE_SIZE;
@ -148,7 +147,7 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
for (i = 0; i < erase_pages; i++) {
flash_status = FLASH_ErasePage(addr + (PAGE_SIZE * i));
if (flash_status != FLASH_COMPLETE) {
result = FLASH_ERASE_ERR;
result = EF_ERASE_ERR;
break;
}
}
@ -167,13 +166,13 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
*
* @return result
*/
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
size_t i;
uint32_t read_data;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
FLASH_Unlock();
FLASH_ClearFlag(FLASH_FLAG_BSY | FLASH_FLAG_EOP | FLASH_FLAG_PGERR | FLASH_FLAG_WRPRTERR);
for (i = 0; i < size; i += 4, buf++, addr += 4) {
@ -182,7 +181,7 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
read_data = *(uint32_t *)addr;
/* check data */
if (read_data != *buf) {
result = FLASH_WRITE_ERR;
result = EF_WRITE_ERR;
break;
}
}
@ -194,17 +193,18 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
/**
* lock the ENV ram cache
*/
void flash_env_lock(void) {
void ef_port_env_lock(void) {
rt_sem_take(&env_cache_lock, RT_WAITING_FOREVER);
}
/**
* unlock the ENV ram cache
*/
void flash_env_unlock(void) {
void ef_port_env_unlock(void) {
rt_sem_release(&env_cache_lock);
}
/**
* This function is print flash debug info.
*
@ -214,18 +214,18 @@ void flash_env_unlock(void) {
* @param ... args
*
*/
void flash_log_debug(const char *file, const long line, const char *format, ...) {
void ef_log_debug(const char *file, const long line, const char *format, ...) {
#ifdef FLASH_PRINT_DEBUG
#ifdef PRINT_DEBUG
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash](%s:%ld) ", file, line);
ef_print("[Flash](%s:%ld) ", file, line);
/* must use vprintf to print */
rt_vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
va_end(args);
#endif
@ -238,15 +238,15 @@ void flash_log_debug(const char *file, const long line, const char *format, ...)
* @param format output format
* @param ... args
*/
void flash_log_info(const char *format, ...) {
void ef_log_info(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash]");
ef_print("[Flash]");
/* must use vprintf to print */
rt_vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
va_end(args);
}
/**
@ -255,7 +255,7 @@ void flash_log_info(const char *format, ...) {
* @param format output format
* @param ... args
*/
void flash_print(const char *format, ...) {
void ef_print(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */

File diff suppressed because it is too large Load Diff

@ -955,25 +955,25 @@
<group>
<name>port</name>
<file>
<name>$PROJ_DIR$\..\components\easyflash\port\flash_port.c</name>
<name>$PROJ_DIR$\..\components\easyflash\port\ef_port.c</name>
</file>
</group>
<group>
<name>src</name>
<file>
<name>$PROJ_DIR$\..\..\..\easyflash\src\flash.c</name>
<name>$PROJ_DIR$\..\..\..\easyflash\src\easyflash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\easyflash\src\flash_env.c</name>
<name>$PROJ_DIR$\..\..\..\easyflash\src\ef_env.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\easyflash\src\flash_env_wl.c</name>
<name>$PROJ_DIR$\..\..\..\easyflash\src\ef_env_wl.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\easyflash\src\flash_iap.c</name>
<name>$PROJ_DIR$\..\..\..\easyflash\src\ef_iap.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\easyflash\src\flash_utils.c</name>
<name>$PROJ_DIR$\..\..\..\easyflash\src\ef_utils.c</name>
</file>
</group>
</group>

@ -34,7 +34,7 @@
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ShowCodeCoverage>1</ShowCodeCoverage><ShowInstrProfiling>1</ShowInstrProfiling></Disassembly>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item></item></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><WATCH_1><expressions><item>eMasterRcvState</item><item>eMasterSndState</item><item>CpuUsageMinor</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>138</item><item>150</item><item>100</item><item>221</item></col-widths><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows></WATCH_1><Auto><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>WATCH_1</Factory></Window><Window><Factory>StaticWatch</Factory></Window></Windows></PreferedWindows><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>100</item></col-widths></Auto><StaticWatch><expressions><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>140</item><item>150</item><item>100</item><item>139</item></col-widths></StaticWatch></Static>
<Windows>

@ -17,7 +17,7 @@
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Find-All-Declarations</Factory></Window><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1215</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3></Build><TerminalIO/><Debug-Log><ColumnWidth0>19</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log><Find-All-Declarations><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations><DRIVER_CUSTOM_SFR><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><col-names><item>Access</item><item>Address</item><item>Name</item><item>Size</item><item>Zone</item><item>_I0</item></col-names><col-widths><item>120</item><item>150</item><item>150</item><item>50</item><item>120</item><item>20</item></col-widths></DRIVER_CUSTOM_SFR></Static>
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-30370-1297</Identity>
@ -29,20 +29,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-28122-19222</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-16453-20055</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>1</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-28122-19222</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-16453-20055</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>1</SelectedTab></Wnd3></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app_task.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>2110</SelStart2><SelEnd2>2110</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\app\src\app_task.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>339</SelStart2><SelEnd2>339</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-03f83dd8><key>iaridepm.enu1</key></Toolbar-03f83dd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>744</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>771458</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>178</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>180</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>186143</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-030d5388><key>iaridepm.enu1</key></Toolbar-030d5388></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>744</Bottom><Right>314</Right><x>-2</x><y>-2</y><xscreen>510</xscreen><yscreen>51</yscreen><sizeHorzCX>303571</sizeHorzCX><sizeHorzCY>52740</sizeHorzCY><sizeVertCX>188095</sizeVertCX><sizeVertCY>771458</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>178</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>180</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>186143</sizeHorzCY><sizeVertCX>303571</sizeVertCX><sizeVertCY>52740</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "bsp.h"
#include "flash.h"
#include "easyflash.h"
#include "finsh.h"
#include "shell.h"
#include "delay_conf.h"
@ -56,7 +56,7 @@ void test_env(void) {
char *c_old_boot_times, c_new_boot_times[11] = {0};
/* get the boot count number from Env */
c_old_boot_times = flash_get_env("boot_times");
c_old_boot_times = ef_get_env("boot_times");
RT_ASSERT(c_old_boot_times);
i_boot_times = atol(c_old_boot_times);
/* boot count +1 */
@ -65,8 +65,8 @@ void test_env(void) {
/* interger to string */
sprintf(c_new_boot_times,"%ld", i_boot_times);
/* set and store the boot count number to Env */
flash_set_env("boot_times", c_new_boot_times);
flash_save_env();
ef_set_env("boot_times", c_new_boot_times);
ef_save_env();
}
/**
@ -78,7 +78,7 @@ void sys_init_thread(void* parameter){
set_system_status(SYSTEM_STATUS_INIT);
/* EasyFlash initialization */
if (flash_init() == FLASH_NO_ERR) {
if (easyflash_init() == EF_NO_ERR) {
/* initialize OK and switch to running status */
set_system_status(SYSTEM_STATUS_RUN);
/* test Env demo */

@ -7,7 +7,7 @@
#include <rthw.h>
#include <rtthread.h>
#include <stm32f4xx_conf.h>
#include "flash.h"
#include "easyflash.h"
#include "finsh.h"
void reboot(uint8_t argc, char **argv) {
@ -32,28 +32,28 @@ void setenv(uint8_t argc, char **argv) {
}
}
if (argc == 1) {
flash_set_env(value, value);
ef_set_env(value, value);
} else if (argc == 2) {
flash_set_env(argv[1], value);
ef_set_env(argv[1], value);
} else {
flash_set_env(argv[1], argv[2]);
ef_set_env(argv[1], argv[2]);
}
}
MSH_CMD_EXPORT(setenv, Set an envrionment variable.);
void printenv(uint8_t argc, char **argv) {
flash_print_env();
ef_print_env();
}
MSH_CMD_EXPORT(printenv, Print all envrionment variables.);
void saveenv(uint8_t argc, char **argv) {
flash_save_env();
ef_save_env();
}
MSH_CMD_EXPORT(saveenv, Save all envrionment variables to flash.);
void getvalue(uint8_t argc, char **argv) {
char *value = NULL;
value = flash_get_env(argv[1]);
value = ef_get_env(argv[1]);
if (value) {
rt_kprintf("The %s value is %s.\n", argv[1], value);
} else {

@ -26,24 +26,24 @@
* Created on: 2015-01-16
*/
#include "flash.h"
#include "easyflash.h"
#include <rthw.h>
#include <rtthread.h>
#include <stm32f4xx_conf.h>
/* ENV start address */
#define FLASH_ENV_START_ADDR (FLASH_BASE + 256 * 1024) /* on the chip position: 256KB */
#define ENV_START_ADDR (FLASH_BASE + 256 * 1024) /* on the chip position: 256KB */
/* the minimum size of flash erasure */
#define FLASH_ERASE_MIN_SIZE (128 * 1024) /* it is 128K for compatibility */
#ifdef FLASH_ENV_USING_WEAR_LEVELING_MODE
#define ERASE_MIN_SIZE (128 * 1024) /* it is 128K for compatibility */
#ifdef EF_ENV_USING_WL_MODE
/* ENV section total bytes size in wear leveling mode. */
#define FLASH_ENV_SECTION_SIZE (4 * FLASH_ERASE_MIN_SIZE)/* 512K */
#define ENV_SECTION_SIZE (4 * ERASE_MIN_SIZE) /* 512K */
#else
/* ENV section total bytes size in normal mode. It's equal with FLASH_USER_SETTING_ENV_SIZE */
#define FLASH_ENV_SECTION_SIZE (FLASH_USER_SETTING_ENV_SIZE)
/* ENV section total bytes size in normal mode. It's equal with EF_USER_SETTING_ENV_SIZE */
#define ENV_SECTION_SIZE (EF_USER_SETTING_ENV_SIZE)
#endif
/* print debug information of flash */
#define FLASH_PRINT_DEBUG
#define PRINT_DEBUG
/* base address of the flash sectors */
#define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base address of Sector 0, 16 K bytes */
@ -72,7 +72,7 @@
#define ADDR_FLASH_SECTOR_23 ((uint32_t)0x081E0000) /* Base address of Sector 23, 128 K bytes */
/* default ENV set for user */
static const flash_env default_env_set[] = {
static const ef_env default_env_set[] = {
{"iap_need_copy_app","0"},
{"iap_copy_app_size","0"},
{"stop_in_bootloader","0"},
@ -98,25 +98,24 @@ static uint32_t stm32_get_sector_size(uint32_t sector);
*
* @return result
*/
FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
flash_env const **default_env, size_t *default_env_size, size_t *log_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
ef_env const **default_env, size_t *default_env_size, size_t *log_size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_ENV_SECTION_SIZE % 4 == 0);
EF_ASSERT(EF_USER_SETTING_ENV_SIZE % 4 == 0);
EF_ASSERT(ENV_SECTION_SIZE % 4 == 0);
*env_addr = FLASH_ENV_START_ADDR;
*env_total_size = FLASH_ENV_SECTION_SIZE;
*erase_min_size = FLASH_ERASE_MIN_SIZE;
*env_addr = ENV_START_ADDR;
*env_total_size = ENV_SECTION_SIZE;
*erase_min_size = ERASE_MIN_SIZE;
*default_env = default_env_set;
*default_env_size = sizeof(default_env_set)/sizeof(default_env_set[0]);
*default_env_size = sizeof(default_env_set) / sizeof(default_env_set[0]);
rt_sem_init(&env_cache_lock, "env lock", 1, RT_IPC_FLAG_PRIO);
return result;
}
/**
* Read data from flash.
* @note This operation's units is word.
@ -127,10 +126,10 @@ FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t
*
* @return result
*/
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
/*copy from flash to ram */
for (; size > 0; size -= 4, addr += 4, buf++) {
@ -150,14 +149,14 @@ FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
*
* @return result
*/
FlashErrCode flash_erase(uint32_t addr, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_erase(uint32_t addr, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_Status flash_status;
size_t erased_size = 0;
uint32_t cur_erase_sector;
/* make sure the start address is a multiple of FLASH_ERASE_MIN_SIZE */
FLASH_ASSERT(addr % FLASH_ERASE_MIN_SIZE == 0);
/* make sure the start address is a multiple of ERASE_MIN_SIZE */
EF_ASSERT(addr % ERASE_MIN_SIZE == 0);
/* start erase */
FLASH_Unlock();
@ -168,7 +167,7 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
cur_erase_sector = stm32_get_sector(addr + erased_size);
flash_status = FLASH_EraseSector(cur_erase_sector, VoltageRange_3);
if (flash_status != FLASH_COMPLETE) {
result = FLASH_ERASE_ERR;
result = EF_ERASE_ERR;
break;
}
erased_size += stm32_get_sector_size(cur_erase_sector);
@ -188,13 +187,13 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
*
* @return result
*/
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
size_t i;
uint32_t read_data;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
FLASH_Unlock();
FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR
| FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
@ -204,7 +203,7 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
read_data = *(uint32_t *)addr;
/* check data */
if (read_data != *buf) {
result = FLASH_WRITE_ERR;
result = EF_WRITE_ERR;
break;
}
}
@ -216,17 +215,18 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
/**
* lock the ENV ram cache
*/
void flash_env_lock(void) {
void ef_port_env_lock(void) {
rt_sem_take(&env_cache_lock, RT_WAITING_FOREVER);
}
/**
* unlock the ENV ram cache
*/
void flash_env_unlock(void) {
void ef_port_env_unlock(void) {
rt_sem_release(&env_cache_lock);
}
/**
* Get the sector of a given address
*
@ -299,7 +299,7 @@ static uint32_t stm32_get_sector(uint32_t address) {
* @return sector size
*/
static uint32_t stm32_get_sector_size(uint32_t sector) {
FLASH_ASSERT(IS_FLASH_SECTOR(sector));
EF_ASSERT(IS_FLASH_SECTOR(sector));
switch (sector) {
case 0: return 16 * 1024;
@ -339,18 +339,18 @@ static uint32_t stm32_get_sector_size(uint32_t sector) {
* @param ... args
*
*/
void flash_log_debug(const char *file, const long line, const char *format, ...) {
void ef_log_debug(const char *file, const long line, const char *format, ...) {
#ifdef FLASH_PRINT_DEBUG
#ifdef PRINT_DEBUG
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash](%s:%ld) ", file, line);
ef_print("[Flash](%s:%ld) ", file, line);
/* must use vprintf to print */
rt_vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
va_end(args);
#endif
@ -363,15 +363,15 @@ void flash_log_debug(const char *file, const long line, const char *format, ...)
* @param format output format
* @param ... args
*/
void flash_log_info(const char *format, ...) {
void ef_log_info(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */
va_start(args, format);
flash_print("[Flash]");
ef_print("[Flash]");
/* must use vprintf to print */
rt_vsprintf(log_buf, format, args);
flash_print("%s", log_buf);
ef_print("%s", log_buf);
va_end(args);
}
/**
@ -380,7 +380,7 @@ void flash_log_info(const char *format, ...) {
* @param format output format
* @param ... args
*/
void flash_print(const char *format, ...) {
void ef_print(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */

@ -2,11 +2,11 @@
---
所有支持的API接口都在 `\flash\inc\flash.h` 中声明。以下内容较多,建议使用 **CTRL+F** 搜索。
所有支持的API接口都在 `\easyflash\inc\easyflash.h` 中声明。以下内容较多,建议使用 **CTRL+F** 搜索。
名词介绍:
**备份区** 是EasyFlash定义的一个存放环境变量及已下载程序的Flash区域详细存储架构可以参考 `\flash\src\flash.c` 文件头位置的注释说明。
**备份区** 是EasyFlash定义的一个存放环境变量及已下载程序的Flash区域详细存储架构可以参考 `\easyflash\src\easyflash.c` 文件头位置的注释说明。
**环境变量表** 负责存放所有的环境变量该表在Flash及RAM中均存在上电后需从Flash加载到RAM中修改后则需要保存其至Flash中。。
@ -14,10 +14,10 @@
### 1.1 初始化
初始化EasyFlash。在初始化的过程中会使用 `\flash\port\flash_port.c` 中的用户自定义参数。
初始化EasyFlash。在初始化的过程中会使用 `\easyflash\port\ef_port.c` 中的用户自定义参数。
```C
FlashErrCode flash_init(void)
EfErrCode easyflash_init(void)
```
### 1.2 环境变量
@ -27,15 +27,15 @@ FlashErrCode flash_init(void)
加载Flash中的所有环境变量到系统内存中。
```C
void flash_load_env(void)
void ef_load_env(void)
```
#### 1.2.2 打印环境变量
通过在移植接口( `\flash\port\flash_port.c` )中定义的 `flash_print` 打印方法来将Flash中的所有环境变量输出出来。
通过在移植接口( `\easyflash\port\ef_port.c` )中定义的 `ef_print` 打印方法来将Flash中的所有环境变量输出出来。
```C
void flash_print_env(void)
void ef_print_env(void)
```
#### 1.2.3 获取环境变量
@ -43,7 +43,7 @@ void flash_print_env(void)
通过环境变量的名字来获取其对应的值。(注意:此处的环境变量指代的已加载到内存中的环境变量)
```C
char *flash_get_env(const char *key)
char *ef_get_env(const char *key)
```
|参数 |描述|
@ -61,7 +61,7 @@ char *flash_get_env(const char *key)
- **删除** 当入参中的value为空时则会删除入参名对应的环境变量。
```C
FlashErrCode flash_set_env(const char *key, const char *value)
EfErrCode ef_set_env(const char *key, const char *value)
```
|参数 |描述|
@ -74,26 +74,26 @@ FlashErrCode flash_set_env(const char *key, const char *value)
保存内存中的环境变量表到Flash中。
```C
FlashErrCode flash_save_env(void)
EfErrCode ef_save_env(void)
```
#### 1.2.6 重置环境变量
将内存中的环境变量表重置为默认值。
```C
FlashErrCode flash_env_set_default(void)
EfErrCode ef_env_set_default(void)
```
#### 1.2.7 获取环境变量分区的总容量
```C
size_t flash_get_env_total_size(void)
size_t ef_get_env_total_size(void)
```
#### 1.2.8 获取当前环境变量写入到Flash的字节大小
```C
size_t flash_get_env_write_bytes(void)
size_t ef_get_env_write_bytes(void)
```
### 1.3 在线升级
@ -101,7 +101,7 @@ size_t flash_get_env_write_bytes(void)
#### 1.3.1 擦除备份区中的应用程序
```C
FlashErrCode flash_erase_bak_app(size_t app_size)
EfErrCode ef_erase_bak_app(size_t app_size)
```
#### 1.3.2 擦除用户的应用程序
@ -109,7 +109,7 @@ FlashErrCode flash_erase_bak_app(size_t app_size)
注意:请不要在应用程序中调用该方法
```C
FlashErrCode flash_erase_user_app(uint32_t user_app_addr, size_t user_app_size)
EfErrCode ef_erase_user_app(uint32_t user_app_addr, size_t user_app_size)
```
|参数 |描述|
@ -122,7 +122,7 @@ FlashErrCode flash_erase_user_app(uint32_t user_app_addr, size_t user_app_size)
注意请不要在Bootloader中调用该方法
```C
FlashErrCode flash_erase_bl(uint32_t bl_addr, size_t bl_size)
EfErrCode ef_erase_bl(uint32_t bl_addr, size_t bl_size)
```
|参数 |描述|
@ -136,10 +136,10 @@ FlashErrCode flash_erase_bl(uint32_t bl_addr, size_t bl_size)
注意写之前请先确认Flash已进行擦除。
```C
FlashErrCode flash_write_data_to_bak(uint8_t *data,
size_t size,
size_t *cur_size,
size_t total_size)
EfErrCode ef_write_data_to_bak(uint8_t *data,
size_t size,
size_t *cur_size,
size_t total_size)
```
|参数 |描述|
@ -157,7 +157,7 @@ FlashErrCode flash_write_data_to_bak(uint8_t *data,
2、不要在应用程序中调用该方法
```C
FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size)
EfErrCode ef_copy_app_from_bak(uint32_t user_app_addr, size_t app_size)
```
|参数 |描述|
@ -173,7 +173,7 @@ FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size)
2、不要在Bootloader中调用该方法
```C
FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size)
EfErrCode ef_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size)
```
|参数 |描述|
@ -186,7 +186,7 @@ FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size)
#### 1.4.1 从Flash中读取已存在的日志
```C
FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size);
EfErrCode ef_log_read(size_t index, uint32_t *log, size_t size);
```
|参数 |描述|
@ -198,7 +198,7 @@ FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size);
#### 1.4.2 往Flash中保存日志
```C
FlashErrCode flash_log_write(const uint32_t *log, size_t size);
EfErrCode ef_log_write(const uint32_t *log, size_t size);
```
|参数 |描述|
@ -209,13 +209,13 @@ FlashErrCode flash_log_write(const uint32_t *log, size_t size);
#### 1.4.3 清空存储在Flash中全部日志
```C
FlashErrCode flash_log_clean(void);
EfErrCode ef_log_clean(void);
```
#### 1.4.4 获取已存储在Flash中的日志大小
```C
size_t flash_log_get_used_size(void);
size_t ef_log_get_used_size(void);
```
## 2 移植接口
@ -225,7 +225,7 @@ size_t flash_log_get_used_size(void);
最小单位为4个字节
```C
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size)
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size)
```
|参数 |描述|
@ -237,7 +237,7 @@ FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size)
### 2.2 擦除Flash
```C
FlashErrCode flash_erase(uint32_t addr, size_t size)
EfErrCode ef_port_erase(uint32_t addr, size_t size)
```
|参数 |描述|
@ -250,7 +250,7 @@ FlashErrCode flash_erase(uint32_t addr, size_t size)
最小单位为4个字节
```C
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size)
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size)
```
|参数 |描述|
@ -262,21 +262,21 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size)
### 2.4 对环境变量缓冲区加锁
```C
void flash_env_lock(void)
void ef_port_env_lock(void)
```
### 2.5 对环境变量缓冲区解锁
```C
void flash_env_unlock(void)
void ef_port_env_unlock(void)
```
### 2.6 打印调试日志信息
在定义 `FLASH_PRINT_DEBUG` 宏后,打印调试日志信息
在定义 `PRINT_DEBUG` 宏后,打印调试日志信息
```C
void flash_log_debug(const char *file, const long line, const char *format, ...)
void ef_log_debug(const char *file, const long line, const char *format, ...)
```
|参数 |描述|
@ -289,7 +289,7 @@ void flash_log_debug(const char *file, const long line, const char *format, ...)
### 2.7 打印普通日志信息
```C
void flash_log_info(const char *format, ...)
void ef_log_info(const char *format, ...)
```
|参数 |描述|
@ -299,10 +299,10 @@ void flash_log_info(const char *format, ...)
### 2.8 无格式打印信息
该方法输出无固定格式的打印信息,为 `flash_print_env` 方法所用。而 `flash_log_debug` 及 `flash_log_info` 可以输出带指定前缀及格式的打印日志信息。
该方法输出无固定格式的打印信息,为 `ef_print_env` 方法所用。而 `ef_log_debug` 及 `ef_log_info` 可以输出带指定前缀及格式的打印日志信息。
```C
void flash_print(const char *format, ...)
void ef_print(const char *format, ...)
```
|参数 |描述|
@ -312,33 +312,35 @@ void flash_print(const char *format, ...)
## 3、配置
配置该库需要打开`\flash\flash.h`文件,开启、关闭、修改对应的宏即可。
配置该库需要打开`\easyflash\easyflash.h`文件,开启、关闭、修改对应的宏即可。
### 3.1 ENV功能
- 默认状态:开启
- 操作方法:开启、关闭`FLASH_USING_ENV`宏即可
- 操作方法:开启、关闭`EF_USING_ENV`宏即可
### 3.2 IAP功能
- 默认状态:开启
- 操作方法:开启、关闭`FLASH_USING_IAP`宏即可
- 操作方法:开启、关闭`EF_USING_IAP`宏即可
### 3.3 Log功能
- 默认状态:开启
- 操作方法:开启、关闭`FLASH_USING_LOG`宏即可
- 操作方法:开启、关闭`EF_USING_LOG`宏即可
### 3.4 环境变量的容量
- 默认容量2K Bytes
- 操作方法:修改`FLASH_USER_SETTING_ENV_SIZE`宏定义即可
- 操作方法:修改`EF_USER_SETTING_ENV_SIZE`宏定义即可
### 3.5 磨损平衡/常规 模式
> 磨损平衡由于flash在写操作之前需要擦除且使用寿命有限所以需要设计合理的磨损平衡写平衡机制来保证数据被安全的保存在未到擦写寿命的Flash区中。
- 默认状态:常规模式
- 磨损平衡模式:打开`FLASH_ENV_USING_WEAR_LEVELING_MODE`,关闭`FLASH_ENV_USING_NORMAL_MODE`
- 常规模式:打开`FLASH_ENV_USING_NORMAL_MODE`,关闭`FLASH_ENV_USING_WEAR_LEVELING_MODE`
- 磨损平衡模式:打开`EF_ENV_USING_WL_MODE`,关闭`EF_ENV_USING_NORMAL_MODE`
- 常规模式:打开`EF_ENV_USING_NORMAL_MODE`,关闭`FLASH_ENV_USING_WL_MODE`
> 注意:只能选择其中一种模式,两种模式不能同时使用
@ -347,6 +349,6 @@ void flash_print(const char *format, ...)
## 4、注意
- 写数据前务必记得先擦除
- 环境变量设置完后,只有调用 `flash_save_env`才会保存在Flash中否则开机会丢失修改的内容
- 环境变量设置完后,只有调用 `ef_save_env`才会保存在Flash中否则开机会丢失修改的内容
- 不要在应用程序及Bootloader中执行擦除及拷贝自身的动作
- ENV及Log功能对Flash擦除和写入要求4个字节对齐擦除的最小单位则需根据用户的平台来确定

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 236 KiB

@ -0,0 +1,142 @@
/*
* This file is part of the EasyFlash Library.
*
* Copyright (c) 2014, Armink, <armink.ztl@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Function: Is is an head file for this library. You can see all be called functions.
* Created on: 2014-09-10
*/
#ifndef EASYFLASH_H_
#define EASYFLASH_H_
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/* using ENV function */
#define EF_USING_ENV
/* using IAP function */
#define EF_USING_IAP
/* using save log function */
/* #define EF_USING_LOG */
/* the user setting size of ENV, must be word alignment */
#define EF_USER_SETTING_ENV_SIZE (2 * 1024) /* default 2K */
/* using wear leveling mode or normal mode */
/* #define EF_ENV_USING_WL_MODE */
#define EF_ENV_USING_NORMAL_MODE
/* EasyFlash debug print function. Must be implement by user. */
#define EF_DEBUG(...) ef_log_debug(__FILE__, __LINE__, __VA_ARGS__)
/* EasyFlash routine print function. Must be implement by user. */
#define EF_INFO(...) ef_log_info(__VA_ARGS__)
/* EasyFlash assert for developer. */
#define EF_ASSERT(EXPR) \
if (!(EXPR)) \
{ \
EF_DEBUG("(%s) has assert failed at %s.\n", #EXPR, __FUNCTION__); \
while (1); \
}
/* EasyFlash software version number */
#define EF_SW_VERSION "1.07.04"
typedef struct _eflash_env{
char *key;
char *value;
}ef_env, *ef_env_t;
/* EasyFlash error code */
typedef enum {
EF_NO_ERR,
EF_ERASE_ERR,
EF_WRITE_ERR,
EF_ENV_NAME_ERR,
EF_ENV_NAME_EXIST,
EF_ENV_FULL,
} EfErrCode;
/* the flash sector current status */
typedef enum {
FLASH_SECTOR_EMPTY,
FLASH_SECTOR_USING,
FLASH_SECTOR_FULL,
}FlashSecrorStatus;
/* easyflash.c */
EfErrCode easyflash_init(void);
#ifdef EF_USING_ENV
/* env.c env_wl.c */
void ef_load_env(void);
void ef_print_env(void);
char *ef_get_env(const char *key);
EfErrCode ef_set_env(const char *key, const char *value);
EfErrCode ef_save_env(void);
EfErrCode ef_env_set_default(void);
size_t ef_get_env_total_size(void);
size_t ef_get_env_write_bytes(void);
#endif
#ifdef EF_USING_IAP
/* iap.c */
EfErrCode ef_erase_bak_app(size_t app_size);
EfErrCode ef_erase_user_app(uint32_t user_app_addr, size_t user_app_size);
EfErrCode ef_erase_bl(uint32_t bl_addr, size_t bl_size);
EfErrCode ef_write_data_to_bak(uint8_t *data, size_t size, size_t *cur_size,
size_t total_size);
EfErrCode ef_copy_app_from_bak(uint32_t user_app_addr, size_t app_size);
EfErrCode ef_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size);
#endif
#ifdef EF_USING_LOG
/* log.c */
EfErrCode ef_log_read(size_t index, uint32_t *log, size_t size);
EfErrCode ef_log_write(const uint32_t *log, size_t size);
EfErrCode ef_log_clean(void);
size_t ef_log_get_used_size(void);
#endif
/* utils.c */
uint32_t calc_crc32(uint32_t crc, const void *buf, size_t size);
FlashSecrorStatus ef_get_sector_status(uint32_t addr, size_t sec_size);
uint32_t ef_find_sec_using_end_addr(uint32_t addr, size_t sec_size);
/* port.c */
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size);
EfErrCode ef_port_erase(uint32_t addr, size_t size);
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size);
void ef_port_env_lock(void);
void ef_port_env_unlock(void);
void ef_log_debug(const char *file, const long line, const char *format, ...);
void ef_log_info(const char *format, ...);
void ef_print(const char *format, ...);
#ifdef __cplusplus
}
#endif
#endif /* EASYFLASH_H_ */

@ -1,142 +0,0 @@
/*
* This file is part of the EasyFlash Library.
*
* Copyright (c) 2014, Armink, <armink.ztl@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Function: Is is an head file for this library. You can see all be called functions.
* Created on: 2014-09-10
*/
#ifndef FLASH_H_
#define FLASH_H_
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/* using ENV function */
#define FLASH_USING_ENV
/* using IAP function */
#define FLASH_USING_IAP
/* using save log function */
#define FLASH_USING_LOG
/* the user setting size of ENV, must be word alignment */
#define FLASH_USER_SETTING_ENV_SIZE (2 * 1024) /* default 2K */
/* using wear leveling mode or normal mode */
/* #define FLASH_ENV_USING_WEAR_LEVELING_MODE */
#define FLASH_ENV_USING_NORMAL_MODE
/* Flash debug print function. Must be implement by user. */
#define FLASH_DEBUG(...) flash_log_debug(__FILE__, __LINE__, __VA_ARGS__)
/* Flash routine print function. Must be implement by user. */
#define FLASH_INFO(...) flash_log_info(__VA_ARGS__)
/* Flash assert for developer. */
#define FLASH_ASSERT(EXPR) \
if (!(EXPR)) \
{ \
FLASH_DEBUG("(%s) has assert failed at %s.\n", #EXPR, __FUNCTION__); \
while (1); \
}
/* EasyFlash software version number */
#define FLASH_SW_VERSION "1.07.02"
typedef struct _flash_env{
char *key;
char *value;
}flash_env, *flash_env_t;
/* Flash error code */
typedef enum {
FLASH_NO_ERR,
FLASH_ERASE_ERR,
FLASH_WRITE_ERR,
FLASH_ENV_NAME_ERR,
FLASH_ENV_NAME_EXIST,
FLASH_ENV_FULL,
} FlashErrCode;
/* the flash sector current status */
typedef enum {
FLASH_SECTOR_EMPTY,
FLASH_SECTOR_USING,
FLASH_SECTOR_FULL,
}FlashSecrorStatus;
/* flash.c */
FlashErrCode flash_init(void);
#ifdef FLASH_USING_ENV
/* flash_env.c flash_env_wl.c */
void flash_load_env(void);
void flash_print_env(void);
char *flash_get_env(const char *key);
FlashErrCode flash_set_env(const char *key, const char *value);
FlashErrCode flash_save_env(void);
FlashErrCode flash_env_set_default(void);
size_t flash_get_env_total_size(void);
size_t flash_get_env_write_bytes(void);
#endif
#ifdef FLASH_USING_IAP
/* flash_iap.c */
FlashErrCode flash_erase_bak_app(size_t app_size);
FlashErrCode flash_erase_user_app(uint32_t user_app_addr, size_t user_app_size);
FlashErrCode flash_erase_bl(uint32_t bl_addr, size_t bl_size);
FlashErrCode flash_write_data_to_bak(uint8_t *data, size_t size, size_t *cur_size,
size_t total_size);
FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size);
FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size);
#endif
#ifdef FLASH_USING_LOG
/* flash_log.c */
FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size);
FlashErrCode flash_log_write(const uint32_t *log, size_t size);
FlashErrCode flash_log_clean(void);
size_t flash_log_get_used_size(void);
#endif
/* flash_utils.c */
uint32_t calc_crc32(uint32_t crc, const void *buf, size_t size);
FlashSecrorStatus flash_get_sector_status(uint32_t addr, size_t sec_size);
uint32_t flash_find_sec_using_end_addr(uint32_t addr, size_t sec_size);
/* flash_port.c */
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size);
FlashErrCode flash_erase(uint32_t addr, size_t size);
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size);
void flash_env_lock(void);
void flash_env_unlock(void);
void flash_log_debug(const char *file, const long line, const char *format, ...);
void flash_log_info(const char *format, ...);
void flash_print(const char *format, ...);
#ifdef __cplusplus
}
#endif
#endif /* FLASH_H_ */

@ -26,23 +26,23 @@
* Created on: 2015-01-16
*/
#include "flash.h"
#include "easyflash.h"
/* environment variables start address */
#define FLASH_ENV_START_ADDR /* @note you must define it for a value */
#define ENV_START_ADDR /* @note you must define it for a value */
/* the minimum size of flash erasure */
#define FLASH_ERASE_MIN_SIZE /* @note you must define it for a value */
#ifdef FLASH_ENV_USING_WEAR_LEVELING_MODE
#define ERASE_MIN_SIZE /* @note you must define it for a value */
#ifdef EF_ENV_USING_WL_MODE
/* ENV section total bytes size in wear leveling mode. */
#define FLASH_ENV_SECTION_SIZE /* @note you must define it for a value */
#define ENV_SECTION_SIZE /* @note you must define it for a value */
#else
/* ENV section total bytes size in normal mode. It's equal with FLASH_USER_SETTING_ENV_SIZE */
#define FLASH_ENV_SECTION_SIZE (FLASH_USER_SETTING_ENV_SIZE)
#define ENV_SECTION_SIZE (EF_USER_SETTING_ENV_SIZE)
#endif
/* saved log section size */
#define FLASH_LOG_AREA_SIZE /* @note you must define it for a value */
#define LOG_AREA_SIZE /* @note you must define it for a value */
/* print debug information of flash */
#define FLASH_PRINT_DEBUG
#define PRINT_DEBUG
/* default environment variables set for user */
static const flash_env default_env_set[] = {
@ -61,19 +61,19 @@ static const flash_env default_env_set[] = {
*
* @return result
*/
FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
flash_env const **default_env, size_t *default_env_size, size_t *log_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_init(uint32_t *env_addr, size_t *env_total_size, size_t *erase_min_size,
ef_env const **default_env, size_t *default_env_size, size_t *log_size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE % 4 == 0);
FLASH_ASSERT(FLASH_ENV_SECTION_SIZE % 4 == 0);
EF_ASSERT(EF_USER_SETTING_ENV_SIZE % 4 == 0);
EF_ASSERT(ENV_SECTION_SIZE % 4 == 0);
*env_addr = FLASH_ENV_START_ADDR;
*env_total_size = FLASH_ENV_SECTION_SIZE;
*erase_min_size = FLASH_ERASE_MIN_SIZE;
*env_addr = ENV_START_ADDR;
*env_total_size = ENV_SECTION_SIZE;
*erase_min_size = ERASE_MIN_SIZE;
*default_env = default_env_set;
*default_env_size = sizeof(default_env_set)/sizeof(default_env_set[0]);
*log_size = FLASH_LOG_AREA_SIZE;
*default_env_size = sizeof(default_env_set) / sizeof(default_env_set[0]);
*log_size = LOG_AREA_SIZE;
return result;
}
@ -88,10 +88,10 @@ FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size, size_t
*
* @return result
*/
FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
FLASH_ASSERT(size % 4 == 0);
EfErrCode ef_port_read(uint32_t addr, uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
EF_ASSERT(size % 4 == 0);
/* You can add your code under here. */
@ -108,11 +108,11 @@ FlashErrCode flash_read(uint32_t addr, uint32_t *buf, size_t size) {
*
* @return result
*/
FlashErrCode flash_erase(uint32_t addr, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
/* make sure the start address is a multiple of FLASH_ERASE_MIN_SIZE */
FLASH_ASSERT(addr % FLASH_ERASE_MIN_SIZE == 0);
EfErrCode ef_port_erase(uint32_t addr, size_t size) {
EfErrCode result = EF_NO_ERR;
/* make sure the start address is a multiple of ERASE_MIN_SIZE */
EF_ASSERT(addr % ERASE_MIN_SIZE == 0);
/* You can add your code under here. */
@ -129,10 +129,10 @@ FlashErrCode flash_erase(uint32_t addr, size_t size) {
*
* @return result
*/
FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_port_write(uint32_t addr, const uint32_t *buf, size_t size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
/* You can add your code under here. */
@ -142,7 +142,7 @@ FlashErrCode flash_write(uint32_t addr, const uint32_t *buf, size_t size) {
/**
* lock the ENV ram cache
*/
void flash_env_lock(void) {
void ef_port_env_lock(void) {
/* You can add your code under here. */
@ -151,7 +151,7 @@ void flash_env_lock(void) {
/**
* unlock the ENV ram cache
*/
void flash_env_unlock(void) {
void ef_port_env_unlock(void) {
/* You can add your code under here. */
@ -167,9 +167,9 @@ void flash_env_unlock(void) {
* @param ... args
*
*/
void flash_log_debug(const char *file, const long line, const char *format, ...) {
void ef_log_debug(const char *file, const long line, const char *format, ...) {
#ifdef FLASH_PRINT_DEBUG
#ifdef PRINT_DEBUG
va_list args;
@ -190,7 +190,7 @@ void flash_log_debug(const char *file, const long line, const char *format, ...)
* @param format output format
* @param ... args
*/
void flash_log_info(const char *format, ...) {
void ef_log_info(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */
@ -206,7 +206,7 @@ void flash_log_info(const char *format, ...) {
* @param format output format
* @param ... args
*/
void flash_print(const char *format, ...) {
void ef_print(const char *format, ...) {
va_list args;
/* args point to the first variable parameter */

@ -50,66 +50,66 @@
* 2.data section.(storage all environment variables)
*
*/
#include "flash.h"
#include "easyflash.h"
/**
* Flash system initialize.
* EasyFlash system initialize.
*
* @return result
*/
FlashErrCode flash_init(void) {
extern FlashErrCode flash_port_init(uint32_t *env_addr, size_t *env_total_size,
size_t *erase_min_size, flash_env const **default_env, size_t *default_env_size,
EfErrCode easyflash_init(void) {
extern EfErrCode ef_port_init(uint32_t *env_addr, size_t *env_total_size,
size_t *erase_min_size, ef_env const **default_env, size_t *default_env_size,
size_t *log_size);
extern FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size,
size_t erase_min_size, flash_env const *default_env, size_t default_env_size);
extern FlashErrCode flash_iap_init(uint32_t start_addr);
extern FlashErrCode flash_log_init(uint32_t start_addr, size_t log_size, size_t erase_min_size);
extern EfErrCode ef_env_init(uint32_t start_addr, size_t total_size, size_t erase_min_size,
ef_env const *default_env, size_t default_env_size);
extern EfErrCode ef_iap_init(uint32_t start_addr);
extern EfErrCode ef_log_init(uint32_t start_addr, size_t log_size, size_t erase_min_size);
uint32_t env_start_addr;
size_t env_total_size = 0, erase_min_size = 0, default_env_set_size = 0, log_size = 0;
const flash_env *default_env_set;
FlashErrCode result = FLASH_NO_ERR;
const ef_env *default_env_set;
EfErrCode result = EF_NO_ERR;
result = flash_port_init(&env_start_addr, &env_total_size, &erase_min_size, &default_env_set,
result = ef_port_init(&env_start_addr, &env_total_size, &erase_min_size, &default_env_set,
&default_env_set_size, &log_size);
#ifdef FLASH_USING_ENV
if (result == FLASH_NO_ERR) {
result = flash_env_init(env_start_addr, env_total_size, erase_min_size, default_env_set,
#ifdef EF_USING_ENV
if (result == EF_NO_ERR) {
result = ef_env_init(env_start_addr, env_total_size, erase_min_size, default_env_set,
default_env_set_size);
}
#endif
#ifdef FLASH_USING_IAP
if (result == FLASH_NO_ERR) {
if (flash_get_env_total_size() < erase_min_size) {
result = flash_iap_init(env_start_addr + erase_min_size + log_size);
} else if (flash_get_env_total_size() % erase_min_size == 0) {
result = flash_iap_init(env_start_addr + flash_get_env_total_size() + log_size);
#ifdef EF_USING_IAP
if (result == EF_NO_ERR) {
if (ef_get_env_total_size() < erase_min_size) {
result = ef_iap_init(env_start_addr + erase_min_size + log_size);
} else if (ef_get_env_total_size() % erase_min_size == 0) {
result = ef_iap_init(env_start_addr + ef_get_env_total_size() + log_size);
} else {
result = flash_iap_init((flash_get_env_total_size() / erase_min_size + 1) * erase_min_size + log_size);
result = ef_iap_init((ef_get_env_total_size() / erase_min_size + 1) * erase_min_size + log_size);
}
}
#endif
#ifdef FLASH_USING_LOG
if (result == FLASH_NO_ERR) {
if (flash_get_env_total_size() < erase_min_size) {
result = flash_log_init(env_start_addr + erase_min_size, log_size, erase_min_size);
} else if (flash_get_env_total_size() % erase_min_size == 0) {
result = flash_log_init(env_start_addr + flash_get_env_total_size(), log_size, erase_min_size);
#ifdef EF_USING_LOG
if (result == EF_NO_ERR) {
if (ef_get_env_total_size() < erase_min_size) {
result = ef_log_init(env_start_addr + erase_min_size, log_size, erase_min_size);
} else if (ef_get_env_total_size() % erase_min_size == 0) {
result = ef_log_init(env_start_addr + ef_get_env_total_size(), log_size, erase_min_size);
} else {
result = flash_log_init((flash_get_env_total_size() / erase_min_size + 1) * erase_min_size,
result = ef_log_init((ef_get_env_total_size() / erase_min_size + 1) * erase_min_size,
log_size, erase_min_size);
}
}
#endif
if (result == FLASH_NO_ERR) {
FLASH_DEBUG("EasyFlash V%s is initialize success.\n", FLASH_SW_VERSION);
if (result == EF_NO_ERR) {
EF_DEBUG("EasyFlash V%s is initialize success.\n", EF_SW_VERSION);
} else {
FLASH_DEBUG("EasyFlash V%s is initialize fail.\n", FLASH_SW_VERSION);
EF_DEBUG("EasyFlash V%s is initialize fail.\n", EF_SW_VERSION);
}
return result;

@ -26,13 +26,13 @@
* Created on: 2014-10-06
*/
#include "flash.h"
#include "easyflash.h"
#include <string.h>
#include <stdlib.h>
#ifdef FLASH_USING_ENV
#ifdef EF_USING_ENV
#ifdef FLASH_ENV_USING_NORMAL_MODE
#ifdef EF_ENV_USING_NORMAL_MODE
/**
* ENV area has 2 sections
@ -58,11 +58,11 @@ enum {
};
/* default ENV set, must be initialized by user */
static flash_env const *default_env_set = NULL;
static ef_env const *default_env_set = NULL;
/* default ENV set size, must be initialized by user */
static size_t default_env_set_size = NULL;
/* ENV RAM cache */
static uint32_t env_cache[FLASH_USER_SETTING_ENV_SIZE / 4] = { 0 };
static uint32_t env_cache[EF_USER_SETTING_ENV_SIZE / 4] = { 0 };
/* ENV start address in flash */
static uint32_t env_start_addr = NULL;
@ -70,11 +70,11 @@ static uint32_t get_env_system_addr(void);
static uint32_t get_env_data_addr(void);
static uint32_t get_env_end_addr(void);
static void set_env_end_addr(uint32_t end_addr);
static FlashErrCode write_env(const char *key, const char *value);
static EfErrCode write_env(const char *key, const char *value);
static uint32_t *find_env(const char *key);
static FlashErrCode del_env(const char *key);
static EfErrCode del_env(const char *key);
static size_t get_env_data_size(void);
static FlashErrCode create_env(const char *key, const char *value);
static EfErrCode create_env(const char *key, const char *value);
static uint32_t calc_env_crc(void);
static bool env_crc_is_ok(void);
@ -91,26 +91,26 @@ static bool env_crc_is_ok(void);
*
* @return result
*/
FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size, size_t erase_min_size,
flash_env const *default_env, size_t default_env_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_env_init(uint32_t start_addr, size_t total_size, size_t erase_min_size,
ef_env const *default_env, size_t default_env_size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(start_addr);
FLASH_ASSERT(total_size);
EF_ASSERT(start_addr);
EF_ASSERT(total_size);
/* user_size must equal with total_size in normal mode */
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE == total_size);
FLASH_ASSERT(default_env);
FLASH_ASSERT(default_env_size < total_size);
EF_ASSERT(EF_USER_SETTING_ENV_SIZE == total_size);
EF_ASSERT(default_env);
EF_ASSERT(default_env_size < total_size);
/* must be word alignment for ENV */
FLASH_ASSERT(total_size % 4 == 0);
EF_ASSERT(total_size % 4 == 0);
env_start_addr = start_addr;
default_env_set = default_env;
default_env_set_size = default_env_size;
FLASH_DEBUG("Env start address is 0x%08X, size is %d bytes.\n", start_addr, total_size);
EF_DEBUG("Env start address is 0x%08X, size is %d bytes.\n", start_addr, total_size);
flash_load_env();
ef_load_env();
return result;
}
@ -120,15 +120,15 @@ FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size, size_t erase
*
* @return result
*/
FlashErrCode flash_env_set_default(void){
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_env_set_default(void){
EfErrCode result = EF_NO_ERR;
size_t i;
FLASH_ASSERT(default_env_set);
FLASH_ASSERT(default_env_set_size);
EF_ASSERT(default_env_set);
EF_ASSERT(default_env_set_size);
/* lock the ENV cache */
flash_env_lock();
ef_port_env_lock();
/* set environment end address is at data section start address */
set_env_end_addr(get_env_data_addr());
@ -139,9 +139,9 @@ FlashErrCode flash_env_set_default(void){
}
/* unlock the ENV cache */
flash_env_unlock();
ef_port_env_unlock();
flash_save_env();
ef_save_env();
return result;
}
@ -152,7 +152,7 @@ FlashErrCode flash_env_set_default(void){
* @return system section start address
*/
static uint32_t get_env_system_addr(void) {
FLASH_ASSERT(env_start_addr);
EF_ASSERT(env_start_addr);
return env_start_addr;
}
@ -162,7 +162,7 @@ static uint32_t get_env_system_addr(void) {
* @return data section start address
*/
static uint32_t get_env_data_addr(void) {
FLASH_ASSERT(env_start_addr);
EF_ASSERT(env_start_addr);
return env_start_addr + ENV_PARAM_BYTE_SIZE;
}
@ -201,8 +201,8 @@ static size_t get_env_data_size(void) {
*
* @return size
*/
size_t flash_get_env_total_size(void) {
return FLASH_USER_SETTING_ENV_SIZE;
size_t ef_get_env_total_size(void) {
return EF_USER_SETTING_ENV_SIZE;
}
/**
@ -210,7 +210,7 @@ size_t flash_get_env_total_size(void) {
*
* @return write bytes
*/
size_t flash_get_env_write_bytes(void) {
size_t ef_get_env_write_bytes(void) {
return get_env_end_addr() - env_start_addr;
}
@ -222,8 +222,8 @@ size_t flash_get_env_write_bytes(void) {
*
* @return result
*/
static FlashErrCode write_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode write_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
size_t ker_len = strlen(key), value_len = strlen(value), env_str_len;
char *env_cache_bak = (char *)env_cache;
@ -233,11 +233,11 @@ static FlashErrCode write_env(const char *key, const char *value) {
env_str_len = (env_str_len / 4 + 1) * 4;
}
/* check capacity of ENV */
if (env_str_len + get_env_data_size() >= flash_get_env_total_size()) {
return FLASH_ENV_FULL;
if (env_str_len + get_env_data_size() >= ef_get_env_total_size()) {
return EF_ENV_FULL;
}
/* calculate current ENV ram cache end address */
env_cache_bak += flash_get_env_write_bytes();
env_cache_bak += ef_get_env_write_bytes();
/* copy key name */
memcpy(env_cache_bak, key, ker_len);
env_cache_bak += ker_len;
@ -269,16 +269,16 @@ static uint32_t *find_env(const char *key) {
char *env_start, *env_end, *env;
size_t key_len = strlen(key), env_len;
FLASH_ASSERT(env_start_addr);
EF_ASSERT(env_start_addr);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not empty!\n");
EF_INFO("Flash ENV name must be not empty!\n");
return NULL;
}
/* from data section start to data section end */
env_start = (char *) ((char *) env_cache + ENV_PARAM_BYTE_SIZE);
env_end = (char *) ((char *) env_cache + flash_get_env_write_bytes());
env_end = (char *) ((char *) env_cache + ef_get_env_write_bytes());
/* ENV is null */
if (env_start == env_end) {
@ -314,26 +314,26 @@ static uint32_t *find_env(const char *key) {
*
* @return result
*/
static FlashErrCode create_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode create_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(key);
FLASH_ASSERT(value);
EF_ASSERT(key);
EF_ASSERT(value);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not empty!\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name must be not empty!\n");
return EF_ENV_NAME_ERR;
}
if (strchr(key, '=')) {
FLASH_INFO("Flash ENV name can't contain '='.\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name can't contain '='.\n");
return EF_ENV_NAME_ERR;
}
/* find ENV */
if (find_env(key)) {
FLASH_INFO("The name of \"%s\" is already exist.\n", key);
return FLASH_ENV_NAME_EXIST;
EF_INFO("The name of \"%s\" is already exist.\n", key);
return EF_ENV_NAME_EXIST;
}
/* write ENV at the end of cache */
result = write_env(key, value);
@ -348,29 +348,29 @@ static FlashErrCode create_env(const char *key, const char *value) {
*
* @return result
*/
static FlashErrCode del_env(const char *key){
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode del_env(const char *key){
EfErrCode result = EF_NO_ERR;
char *del_env_str = NULL;
size_t del_env_length, remain_env_length;
FLASH_ASSERT(key);
EF_ASSERT(key);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not NULL!\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name must be not NULL!\n");
return EF_ENV_NAME_ERR;
}
if (strchr(key, '=')) {
FLASH_INFO("Flash ENV name or value can't contain '='.\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name or value can't contain '='.\n");
return EF_ENV_NAME_ERR;
}
/* find ENV */
del_env_str = (char *) find_env(key);
if (!del_env_str) {
FLASH_INFO("Not find \"%s\" in ENV.\n", key);
return FLASH_ENV_NAME_ERR;
EF_INFO("Not find \"%s\" in ENV.\n", key);
return EF_ENV_NAME_ERR;
}
del_env_length = strlen(del_env_str);
/* '\0' also must be as ENV length */
@ -399,11 +399,11 @@ static FlashErrCode del_env(const char *key){
*
* @return result
*/
FlashErrCode flash_set_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_set_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
/* lock the ENV cache */
flash_env_lock();
ef_port_env_lock();
/* if ENV value is empty, delete it */
if (*value == NULL) {
@ -413,12 +413,12 @@ FlashErrCode flash_set_env(const char *key, const char *value) {
if (find_env(key)) {
result = del_env(key);
}
if (result == FLASH_NO_ERR) {
if (result == EF_NO_ERR) {
result = create_env(key, value);
}
}
/* unlock the ENV cache */
flash_env_unlock();
ef_port_env_unlock();
return result;
}
@ -430,7 +430,7 @@ FlashErrCode flash_set_env(const char *key, const char *value) {
*
* @return value
*/
char *flash_get_env(const char *key) {
char *ef_get_env(const char *key) {
uint32_t *env_cache_addr = NULL;
char *value = NULL;
@ -451,7 +451,7 @@ char *flash_get_env(const char *key) {
/**
* Print ENV.
*/
void flash_print_env(void) {
void ef_print_env(void) {
uint32_t *env_cache_data_addr = env_cache + ENV_PARAM_WORD_SIZE,
*env_cache_end_addr =
(uint32_t *) (env_cache + ENV_PARAM_WORD_SIZE + get_env_data_size() / 4);
@ -461,43 +461,43 @@ void flash_print_env(void) {
for (; env_cache_data_addr < env_cache_end_addr; env_cache_data_addr += 1) {
for (j = 0; j < 4; j++) {
c = (*env_cache_data_addr) >> (8 * j);
flash_print("%c", c);
ef_print("%c", c);
if (c == NULL) {
flash_print("\n");
ef_print("\n");
break;
}
}
}
flash_print("\nENV size: %ld/%ld bytes, mode: normal.\n",
flash_get_env_write_bytes(), flash_get_env_total_size());
ef_print("\nENV size: %ld/%ld bytes, mode: normal.\n",
ef_get_env_write_bytes(), ef_get_env_total_size());
}
/**
* Load flash ENV to ram.
*/
void flash_load_env(void) {
void ef_load_env(void) {
uint32_t *env_cache_bak, env_end_addr;
/* read ENV end address from flash */
flash_read(get_env_system_addr() + ENV_PARAM_INDEX_END_ADDR * 4, &env_end_addr, 4);
ef_port_read(get_env_system_addr() + ENV_PARAM_INDEX_END_ADDR * 4, &env_end_addr, 4);
/* if ENV is not initialize or flash has dirty data, set default for it */
if ((env_end_addr == 0xFFFFFFFF)
|| (env_end_addr > env_start_addr + flash_get_env_total_size())) {
flash_env_set_default();
|| (env_end_addr > env_start_addr + ef_get_env_total_size())) {
ef_env_set_default();
} else {
/* set ENV end address */
set_env_end_addr(env_end_addr);
env_cache_bak = env_cache + ENV_PARAM_WORD_SIZE;
/* read all ENV from flash */
flash_read(get_env_data_addr(), env_cache_bak, get_env_data_size());
ef_port_read(get_env_data_addr(), env_cache_bak, get_env_data_size());
/* read ENV CRC code from flash */
flash_read(get_env_system_addr() + ENV_PARAM_INDEX_DATA_CRC * 4,
ef_port_read(get_env_system_addr() + ENV_PARAM_INDEX_DATA_CRC * 4,
&env_cache[ENV_PARAM_INDEX_DATA_CRC] , 4);
/* if ENV CRC32 check is fault, set default for it */
if (!env_crc_is_ok()) {
FLASH_INFO("Warning: ENV CRC check failed. Set it to default.\n");
flash_env_set_default();
EF_INFO("Warning: ENV CRC check failed. Set it to default.\n");
ef_env_set_default();
}
}
}
@ -505,34 +505,34 @@ void flash_load_env(void) {
/**
* Save ENV to flash.
*/
FlashErrCode flash_save_env(void) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_save_env(void) {
EfErrCode result = EF_NO_ERR;
/* calculate and cache CRC32 code */
env_cache[ENV_PARAM_INDEX_DATA_CRC] = calc_env_crc();
/* erase ENV */
result = flash_erase(get_env_system_addr(), flash_get_env_write_bytes());
result = ef_port_erase(get_env_system_addr(), ef_get_env_write_bytes());
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Erased ENV OK.\n");
case EF_NO_ERR: {
EF_INFO("Erased ENV OK.\n");
break;
}
case FLASH_ERASE_ERR: {
FLASH_INFO("Warning: Erased ENV fault!\n");
case EF_ERASE_ERR: {
EF_INFO("Warning: Erased ENV fault!\n");
/* will return when erase fault */
return result;
}
}
/* write ENV to flash */
result = flash_write(get_env_system_addr(), env_cache, flash_get_env_write_bytes());
result = ef_port_write(get_env_system_addr(), env_cache, ef_get_env_write_bytes());
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Saved ENV OK.\n");
case EF_NO_ERR: {
EF_INFO("Saved ENV OK.\n");
break;
}
case FLASH_WRITE_ERR: {
FLASH_INFO("Warning: Saved ENV fault!\n");
case EF_WRITE_ERR: {
EF_INFO("Warning: Saved ENV fault!\n");
break;
}
}
@ -552,7 +552,7 @@ static uint32_t calc_env_crc(void) {
* The 4 is ENV end address bytes size. */
crc32 = calc_crc32(crc32, &env_cache[ENV_PARAM_INDEX_END_ADDR], 4);
crc32 = calc_crc32(crc32, &env_cache[ENV_PARAM_WORD_SIZE], get_env_data_size());
FLASH_DEBUG("Calculate Env CRC32 number is 0x%08X.\n", crc32);
EF_DEBUG("Calculate Env CRC32 number is 0x%08X.\n", crc32);
return crc32;
}
@ -564,13 +564,13 @@ static uint32_t calc_env_crc(void) {
*/
static bool env_crc_is_ok(void) {
if (calc_env_crc() == env_cache[ENV_PARAM_INDEX_DATA_CRC]) {
FLASH_DEBUG("Verify Env CRC32 result is OK.\n");
EF_DEBUG("Verify Env CRC32 result is OK.\n");
return true;
} else {
return false;
}
}
#endif /* FLASH_ENV_USING_NORMAL_MODE */
#endif /* EF_ENV_USING_NORMAL_MODE */
#endif /* FLASH_USING_ENV */
#endif /* EF_USING_ENV */

@ -26,13 +26,13 @@
* Created on: 2015-02-11
*/
#include "flash.h"
#include "easyflash.h"
#include <string.h>
#include <stdlib.h>
#ifdef FLASH_USING_ENV
#ifdef EF_USING_ENV
#ifdef FLASH_ENV_USING_WEAR_LEVELING_MODE
#ifdef EF_ENV_USING_WL_MODE
/**
* ENV area has 2 sections
@ -65,7 +65,7 @@ enum {
};
/* default ENV set, must be initialized by user */
static flash_env const *default_env_set = NULL;
static ef_env const *default_env_set = NULL;
/* default ENV set size, must be initialized by user */
static size_t default_env_set_size = NULL;
/* flash ENV all section total size */
@ -73,7 +73,7 @@ static size_t env_total_size = NULL;
/* the minimum size of flash erasure */
static size_t flash_erase_min_size = NULL;
/* ENV RAM cache */
static uint32_t env_cache[FLASH_USER_SETTING_ENV_SIZE / 4] = { 0 };
static uint32_t env_cache[EF_USER_SETTING_ENV_SIZE / 4] = { 0 };
/* ENV start address in flash */
static uint32_t env_start_addr = NULL;
/* current using data section address */
@ -85,13 +85,13 @@ static uint32_t get_env_detail_addr(void);
static uint32_t get_env_detail_end_addr(void);
static void set_cur_using_data_addr(uint32_t using_data_addr);
static void set_env_detail_end_addr(uint32_t end_addr);
static FlashErrCode write_env(const char *key, const char *value);
static EfErrCode write_env(const char *key, const char *value);
static uint32_t *find_env(const char *key);
static size_t get_env_detail_size(void);
static size_t get_env_user_used_size(void);
static FlashErrCode create_env(const char *key, const char *value);
static FlashErrCode del_env(const char *key);
static FlashErrCode save_cur_using_data_addr(uint32_t cur_data_addr);
static EfErrCode create_env(const char *key, const char *value);
static EfErrCode del_env(const char *key);
static EfErrCode save_cur_using_data_addr(uint32_t cur_data_addr);
static uint32_t calc_env_crc(void);
static bool env_crc_is_ok(void);
@ -106,20 +106,20 @@ static bool env_crc_is_ok(void);
*
* @return result
*/
FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size, size_t erase_min_size,
flash_env const *default_env, size_t default_env_size) {
FlashErrCode result = FLASH_NO_ERR;
FLASH_ASSERT(start_addr);
FLASH_ASSERT(total_size);
FLASH_ASSERT(erase_min_size);
FLASH_ASSERT(default_env);
FLASH_ASSERT(default_env_size < FLASH_USER_SETTING_ENV_SIZE);
EfErrCode ef_env_init(uint32_t start_addr, size_t total_size, size_t erase_min_size,
ef_env const *default_env, size_t default_env_size) {
EfErrCode result = EF_NO_ERR;
EF_ASSERT(start_addr);
EF_ASSERT(total_size);
EF_ASSERT(erase_min_size);
EF_ASSERT(default_env);
EF_ASSERT(default_env_size < EF_USER_SETTING_ENV_SIZE);
/* must be word alignment for ENV */
FLASH_ASSERT(FLASH_USER_SETTING_ENV_SIZE % 4 == 0);
FLASH_ASSERT(total_size % 4 == 0);
EF_ASSERT(EF_USER_SETTING_ENV_SIZE % 4 == 0);
EF_ASSERT(total_size % 4 == 0);
/* the ENV total size should be an integral multiple of erase minimum size. */
FLASH_ASSERT(total_size % erase_min_size == 0);
EF_ASSERT(total_size % erase_min_size == 0);
env_start_addr = start_addr;
env_total_size = total_size;
@ -127,9 +127,9 @@ FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size, size_t erase
default_env_set = default_env;
default_env_set_size = default_env_size;
FLASH_DEBUG("Env start address is 0x%08X, size is %d bytes.\n", start_addr, total_size);
EF_DEBUG("Env start address is 0x%08X, size is %d bytes.\n", start_addr, total_size);
flash_load_env();
ef_load_env();
return result;
}
@ -139,15 +139,15 @@ FlashErrCode flash_env_init(uint32_t start_addr, size_t total_size, size_t erase
*
* @return result
*/
FlashErrCode flash_env_set_default(void){
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_env_set_default(void){
EfErrCode result = EF_NO_ERR;
size_t i;
FLASH_ASSERT(default_env_set);
FLASH_ASSERT(default_env_set_size);
EF_ASSERT(default_env_set);
EF_ASSERT(default_env_set_size);
/* lock the ENV cache */
flash_env_lock();
ef_port_env_lock();
/* set ENV detail part end address is at ENV detail part start address */
set_env_detail_end_addr(get_env_detail_addr());
@ -158,9 +158,9 @@ FlashErrCode flash_env_set_default(void){
}
/* unlock the ENV cache */
flash_env_unlock();
ef_port_env_unlock();
flash_save_env();
ef_save_env();
return result;
}
@ -171,7 +171,7 @@ FlashErrCode flash_env_set_default(void){
* @return ENV start address in flash
*/
static uint32_t get_env_start_addr(void) {
FLASH_ASSERT(env_start_addr);
EF_ASSERT(env_start_addr);
return env_start_addr;
}
/**
@ -180,7 +180,7 @@ static uint32_t get_env_start_addr(void) {
* @return current using data section address
*/
static uint32_t get_cur_using_data_addr(void) {
FLASH_ASSERT(cur_using_data_addr);
EF_ASSERT(cur_using_data_addr);
return cur_using_data_addr;
}
@ -199,7 +199,7 @@ static void set_cur_using_data_addr(uint32_t using_data_addr) {
* @return detail part start address
*/
static uint32_t get_env_detail_addr(void) {
FLASH_ASSERT(cur_using_data_addr);
EF_ASSERT(cur_using_data_addr);
return get_cur_using_data_addr() + ENV_PARAM_PART_BYTE_SIZE;
}
@ -236,7 +236,7 @@ static size_t get_env_detail_size(void) {
/**
* Get current user used ENV size.
*
* @see FLASH_USER_SETTING_ENV_SIZE
* @see EF_USER_SETTING_ENV_SIZE
*
* @return size
*/
@ -251,7 +251,7 @@ static size_t get_env_user_used_size(void) {
*
* @return write bytes
*/
size_t flash_get_env_write_bytes(void) {
size_t ef_get_env_write_bytes(void) {
return get_env_detail_end_addr() - get_env_start_addr();
}
@ -262,9 +262,9 @@ size_t flash_get_env_write_bytes(void) {
*
* @return size
*/
size_t flash_get_env_total_size(void) {
size_t ef_get_env_total_size(void) {
/* must be initialized */
FLASH_ASSERT(env_total_size);
EF_ASSERT(env_total_size);
return env_total_size;
}
@ -277,8 +277,8 @@ size_t flash_get_env_total_size(void) {
*
* @return result
*/
static FlashErrCode write_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode write_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
size_t ker_len = strlen(key), value_len = strlen(value), env_str_len;
char *env_cache_bak = (char *)env_cache;
@ -288,8 +288,8 @@ static FlashErrCode write_env(const char *key, const char *value) {
env_str_len = (env_str_len / 4 + 1) * 4;
}
/* check capacity of ENV */
if (env_str_len + get_env_detail_size() >= FLASH_USER_SETTING_ENV_SIZE) {
return FLASH_ENV_FULL;
if (env_str_len + get_env_detail_size() >= EF_USER_SETTING_ENV_SIZE) {
return EF_ENV_FULL;
}
/* calculate current ENV ram cache end address */
env_cache_bak += ENV_PARAM_PART_BYTE_SIZE + get_env_detail_size();
@ -324,10 +324,10 @@ static uint32_t *find_env(const char *key) {
char *env_start, *env_end, *env;
size_t key_len = strlen(key), env_len;
FLASH_ASSERT(cur_using_data_addr);
EF_ASSERT(cur_using_data_addr);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not empty!\n");
EF_INFO("Flash ENV name must be not empty!\n");
return NULL;
}
@ -370,26 +370,26 @@ static uint32_t *find_env(const char *key) {
*
* @return result
*/
static FlashErrCode create_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode create_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(key);
FLASH_ASSERT(value);
EF_ASSERT(key);
EF_ASSERT(value);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not empty!\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name must be not empty!\n");
return EF_ENV_NAME_ERR;
}
if (strchr(key, '=')) {
FLASH_INFO("Flash ENV name can't contain '='.\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name can't contain '='.\n");
return EF_ENV_NAME_ERR;
}
/* find ENV */
if (find_env(key)) {
FLASH_INFO("The name of \"%s\" is already exist.\n", key);
return FLASH_ENV_NAME_EXIST;
EF_INFO("The name of \"%s\" is already exist.\n", key);
return EF_ENV_NAME_EXIST;
}
/* write ENV at the end of cache */
result = write_env(key, value);
@ -404,29 +404,29 @@ static FlashErrCode create_env(const char *key, const char *value) {
*
* @return result
*/
static FlashErrCode del_env(const char *key) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode del_env(const char *key) {
EfErrCode result = EF_NO_ERR;
char *del_env_str = NULL;
size_t del_env_length, remain_env_length;
FLASH_ASSERT(key);
EF_ASSERT(key);
if (*key == NULL) {
FLASH_INFO("Flash ENV name must be not NULL!\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name must be not NULL!\n");
return EF_ENV_NAME_ERR;
}
if (strchr(key, '=')) {
FLASH_INFO("Flash ENV name or value can't contain '='.\n");
return FLASH_ENV_NAME_ERR;
EF_INFO("Flash ENV name or value can't contain '='.\n");
return EF_ENV_NAME_ERR;
}
/* find ENV */
del_env_str = (char *) find_env(key);
if (!del_env_str) {
FLASH_INFO("Not find \"%s\" in ENV.\n", key);
return FLASH_ENV_NAME_ERR;
EF_INFO("Not find \"%s\" in ENV.\n", key);
return EF_ENV_NAME_ERR;
}
del_env_length = strlen(del_env_str);
/* '\0' also must be as ENV length */
@ -455,11 +455,11 @@ static FlashErrCode del_env(const char *key) {
*
* @return result
*/
FlashErrCode flash_set_env(const char *key, const char *value) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_set_env(const char *key, const char *value) {
EfErrCode result = EF_NO_ERR;
/* lock the ENV cache */
flash_env_lock();
ef_port_env_lock();
/* if ENV value is empty, delete it */
if (*value == NULL) {
@ -469,12 +469,12 @@ FlashErrCode flash_set_env(const char *key, const char *value) {
if (find_env(key)) {
result = del_env(key);
}
if (result == FLASH_NO_ERR) {
if (result == EF_NO_ERR) {
result = create_env(key, value);
}
}
/* unlock the ENV cache */
flash_env_unlock();
ef_port_env_unlock();
return result;
}
@ -486,7 +486,7 @@ FlashErrCode flash_set_env(const char *key, const char *value) {
*
* @return value
*/
char *flash_get_env(const char *key) {
char *ef_get_env(const char *key) {
uint32_t *env_cache_addr = NULL;
char *value = NULL;
@ -507,9 +507,8 @@ char *flash_get_env(const char *key) {
/**
* Print ENV.
*/
void flash_print_env(void) {
uint32_t *env_cache_detail_addr = env_cache + ENV_PARAM_PART_WORD_SIZE,
*env_cache_end_addr =
void ef_print_env(void) {
uint32_t *env_cache_detail_addr = env_cache + ENV_PARAM_PART_WORD_SIZE, *env_cache_end_addr =
(uint32_t *) (env_cache + ENV_PARAM_PART_WORD_SIZE + get_env_detail_size() / 4);
uint8_t j;
char c;
@ -517,58 +516,58 @@ void flash_print_env(void) {
for (; env_cache_detail_addr < env_cache_end_addr; env_cache_detail_addr += 1) {
for (j = 0; j < 4; j++) {
c = (*env_cache_detail_addr) >> (8 * j);
flash_print("%c", c);
ef_print("%c", c);
if (c == NULL) {
flash_print("\n");
ef_print("\n");
break;
}
}
}
flash_print("\nENV size: %ld/%ld bytes, write bytes %ld/%ld, mode: wear leveling.\n",
get_env_user_used_size(), FLASH_USER_SETTING_ENV_SIZE, flash_get_env_write_bytes(),
flash_get_env_total_size());
ef_print("\nENV size: %ld/%ld bytes, write bytes %ld/%ld, mode: wear leveling.\n",
get_env_user_used_size(), EF_USER_SETTING_ENV_SIZE, ef_get_env_write_bytes(),
ef_get_env_total_size());
}
/**
* Load flash ENV to ram.
*/
void flash_load_env(void) {
void ef_load_env(void) {
uint32_t *env_cache_bak, env_end_addr, using_data_addr;
/* read current using data section address */
flash_read(get_env_start_addr(), &using_data_addr, 4);
ef_port_read(get_env_start_addr(), &using_data_addr, 4);
/* if ENV is not initialize or flash has dirty data, set default for it */
if ((using_data_addr == 0xFFFFFFFF)
|| (using_data_addr > get_env_start_addr() + flash_get_env_total_size())
|| (using_data_addr > get_env_start_addr() + ef_get_env_total_size())
|| (using_data_addr < get_env_start_addr() + flash_erase_min_size)) {
/* initialize current using data section address */
set_cur_using_data_addr(get_env_start_addr() + flash_erase_min_size);
/* save current using data section address to flash*/
save_cur_using_data_addr(get_cur_using_data_addr());
/* set default ENV */
flash_env_set_default();
ef_env_set_default();
} else {
/* set current using data section address */
set_cur_using_data_addr(using_data_addr);
/* read ENV detail part end address from flash */
flash_read(get_cur_using_data_addr() + ENV_PARAM_PART_INDEX_END_ADDR * 4, &env_end_addr, 4);
ef_port_read(get_cur_using_data_addr() + ENV_PARAM_PART_INDEX_END_ADDR * 4, &env_end_addr, 4);
/* if ENV end address has error, set default for ENV */
if (env_end_addr > get_env_start_addr() + flash_get_env_total_size()) {
flash_env_set_default();
if (env_end_addr > get_env_start_addr() + ef_get_env_total_size()) {
ef_env_set_default();
} else {
/* set ENV detail part end address */
set_env_detail_end_addr(env_end_addr);
env_cache_bak = env_cache + ENV_PARAM_PART_WORD_SIZE;
/* read all ENV from flash */
flash_read(get_env_detail_addr(), env_cache_bak, get_env_detail_size());
ef_port_read(get_env_detail_addr(), env_cache_bak, get_env_detail_size());
/* read ENV CRC code from flash */
flash_read(get_cur_using_data_addr() + ENV_PARAM_PART_INDEX_DATA_CRC * 4,
ef_port_read(get_cur_using_data_addr() + ENV_PARAM_PART_INDEX_DATA_CRC * 4,
&env_cache[ENV_PARAM_PART_INDEX_DATA_CRC], 4);
/* if ENV CRC32 check is fault, set default for it */
if (!env_crc_is_ok()) {
FLASH_INFO("Warning: ENV CRC check failed. Set it to default.\n");
flash_env_set_default();
EF_INFO("Warning: ENV CRC check failed. Set it to default.\n");
ef_env_set_default();
}
}
@ -578,26 +577,26 @@ void flash_load_env(void) {
/**
* Save ENV to flash.
*/
FlashErrCode flash_save_env(void) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_save_env(void) {
EfErrCode result = EF_NO_ERR;
uint32_t cur_data_addr_bak = get_cur_using_data_addr(), move_offset_addr;
size_t env_detail_size = get_env_detail_size();
/* wear leveling process, automatic move ENV to next available position */
while (get_cur_using_data_addr() + env_detail_size
< get_env_start_addr() + flash_get_env_total_size()) {
< get_env_start_addr() + ef_get_env_total_size()) {
/* calculate and cache CRC32 code */
env_cache[ENV_PARAM_PART_INDEX_DATA_CRC] = calc_env_crc();
/* erase ENV */
result = flash_erase(get_cur_using_data_addr(), ENV_PARAM_PART_BYTE_SIZE + env_detail_size);
result = ef_port_erase(get_cur_using_data_addr(), ENV_PARAM_PART_BYTE_SIZE + env_detail_size);
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Erased ENV OK.\n");
case EF_NO_ERR: {
EF_INFO("Erased ENV OK.\n");
break;
}
case FLASH_ERASE_ERR: {
FLASH_INFO("Warning: Erased ENV fault!\n");
FLASH_INFO("Moving ENV to next available position.\n");
case EF_ERASE_ERR: {
EF_INFO("Warning: Erased ENV fault!\n");
EF_INFO("Moving ENV to next available position.\n");
/* Calculate move offset address.
* Current strategy is optimistic. It will offset the flash erasure minimum size.
*/
@ -610,16 +609,16 @@ FlashErrCode flash_save_env(void) {
}
}
/* write ENV to flash */
result = flash_write(get_cur_using_data_addr(), env_cache,
result = ef_port_write(get_cur_using_data_addr(), env_cache,
ENV_PARAM_PART_BYTE_SIZE + env_detail_size);
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Saved ENV OK.\n");
case EF_NO_ERR: {
EF_INFO("Saved ENV OK.\n");
break;
}
case FLASH_WRITE_ERR: {
FLASH_INFO("Warning: Saved ENV fault!\n");
FLASH_INFO("Moving ENV to next available position.\n");
case EF_WRITE_ERR: {
EF_INFO("Warning: Saved ENV fault!\n");
EF_INFO("Moving ENV to next available position.\n");
/* Calculate move offset address.
* Current strategy is optimistic. It will offset the flash erasure minimum size.
*/
@ -632,20 +631,20 @@ FlashErrCode flash_save_env(void) {
}
}
/* save ENV success */
if (result == FLASH_NO_ERR) {
if (result == EF_NO_ERR) {
break;
}
}
if (get_cur_using_data_addr() + env_detail_size
< get_env_start_addr() + flash_get_env_total_size()) {
< get_env_start_addr() + ef_get_env_total_size()) {
/* current using data section address has changed, save it */
if (get_cur_using_data_addr() != cur_data_addr_bak) {
save_cur_using_data_addr(get_cur_using_data_addr());
}
} else {
result = FLASH_ENV_FULL;
FLASH_INFO("Error: The flash has no available space to save ENV.\n");
result = EF_ENV_FULL;
EF_INFO("Error: The flash has no available space to save ENV.\n");
/* clear current using data section address on flash */
save_cur_using_data_addr(0xFFFFFFFF);
}
@ -665,7 +664,7 @@ static uint32_t calc_env_crc(void) {
* The 4 is ENV end address bytes size. */
crc32 = calc_crc32(crc32, &env_cache[ENV_PARAM_PART_INDEX_END_ADDR], 4);
crc32 = calc_crc32(crc32, &env_cache[ENV_PARAM_PART_WORD_SIZE], get_env_detail_size());
FLASH_DEBUG("Calculate Env CRC32 number is 0x%08X.\n", crc32);
EF_DEBUG("Calculate Env CRC32 number is 0x%08X.\n", crc32);
return crc32;
}
@ -677,7 +676,7 @@ static uint32_t calc_env_crc(void) {
*/
static bool env_crc_is_ok(void) {
if (calc_env_crc() == env_cache[ENV_PARAM_PART_INDEX_DATA_CRC]) {
FLASH_DEBUG("Verify Env CRC32 result is OK.\n");
EF_DEBUG("Verify Env CRC32 result is OK.\n");
return true;
} else {
return false;
@ -691,24 +690,24 @@ static bool env_crc_is_ok(void) {
*
* @return result
*/
static FlashErrCode save_cur_using_data_addr(uint32_t cur_data_addr) {
FlashErrCode result = FLASH_NO_ERR;
static EfErrCode save_cur_using_data_addr(uint32_t cur_data_addr) {
EfErrCode result = EF_NO_ERR;
/* erase ENV system section */
result = flash_erase(get_env_start_addr(), 4);
if (result == FLASH_NO_ERR) {
result = ef_port_erase(get_env_start_addr(), 4);
if (result == EF_NO_ERR) {
/* write current using data section address to flash */
result = flash_write(get_env_start_addr(), &cur_data_addr, 4);
if (result == FLASH_WRITE_ERR) {
FLASH_INFO("Error: Write system section fault!\n");
FLASH_INFO("Note: The ENV can not be used.\n");
result = ef_port_write(get_env_start_addr(), &cur_data_addr, 4);
if (result == EF_WRITE_ERR) {
EF_INFO("Error: Write system section fault!\n");
EF_INFO("Note: The ENV can not be used.\n");
}
} else {
FLASH_INFO("Error: Erased system section fault!\n");
FLASH_INFO("Note: The ENV can not be used\n");
EF_INFO("Error: Erased system section fault!\n");
EF_INFO("Note: The ENV can not be used\n");
}
return result;
}
#endif /* FLASH_ENV_USING_WEAR_LEVELING_MODE */
#endif /* EF_ENV_USING_WL_MODE */
#endif /* FLASH_USING_ENV */
#endif /* EF_USING_ENV */

@ -26,9 +26,9 @@
* Created on: 2015-01-05
*/
#include "flash.h"
#include "easyflash.h"
#ifdef FLASH_USING_IAP
#ifdef EF_USING_IAP
/* IAP section backup application section start address in flash */
static uint32_t bak_app_start_addr = NULL;
@ -42,10 +42,10 @@ static uint32_t get_bak_app_start_addr(void);
*
* @return result
*/
FlashErrCode flash_iap_init(uint32_t start_addr) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_iap_init(uint32_t start_addr) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(start_addr);
EF_ASSERT(start_addr);
bak_app_start_addr = start_addr;
return result;
@ -58,17 +58,17 @@ FlashErrCode flash_iap_init(uint32_t start_addr) {
*
* @return result
*/
FlashErrCode flash_erase_bak_app(size_t app_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_erase_bak_app(size_t app_size) {
EfErrCode result = EF_NO_ERR;
result = flash_erase(get_bak_app_start_addr(), app_size);
result = ef_port_erase(get_bak_app_start_addr(), app_size);
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Erased backup area application OK.\n");
case EF_NO_ERR: {
EF_INFO("Erased backup area application OK.\n");
break;
}
case FLASH_ERASE_ERR: {
FLASH_INFO("Warning: Erase backup area application fault!\n");
case EF_ERASE_ERR: {
EF_INFO("Warning: Erase backup area application fault!\n");
/* will return when erase fault */
return result;
}
@ -86,17 +86,17 @@ FlashErrCode flash_erase_bak_app(size_t app_size) {
*
* @return result
*/
FlashErrCode flash_erase_user_app(uint32_t user_app_addr, size_t app_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_erase_user_app(uint32_t user_app_addr, size_t app_size) {
EfErrCode result = EF_NO_ERR;
result = flash_erase(user_app_addr, app_size);
result = ef_port_erase(user_app_addr, app_size);
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Erased user application OK.\n");
case EF_NO_ERR: {
EF_INFO("Erased user application OK.\n");
break;
}
case FLASH_ERASE_ERR: {
FLASH_INFO("Warning: Erase user application fault!\n");
case EF_ERASE_ERR: {
EF_INFO("Warning: Erase user application fault!\n");
/* will return when erase fault */
return result;
}
@ -113,17 +113,17 @@ FlashErrCode flash_erase_user_app(uint32_t user_app_addr, size_t app_size) {
*
* @return result
*/
FlashErrCode flash_erase_bl(uint32_t bl_addr, size_t bl_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_erase_bl(uint32_t bl_addr, size_t bl_size) {
EfErrCode result = EF_NO_ERR;
result = flash_erase(bl_addr, bl_size);
result = ef_port_erase(bl_addr, bl_size);
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Erased bootloader OK.\n");
case EF_NO_ERR: {
EF_INFO("Erased bootloader OK.\n");
break;
}
case FLASH_ERASE_ERR: {
FLASH_INFO("Warning: Erase bootloader fault!\n");
case EF_ERASE_ERR: {
EF_INFO("Warning: Erase bootloader fault!\n");
/* will return when erase fault */
return result;
}
@ -142,24 +142,24 @@ FlashErrCode flash_erase_bl(uint32_t bl_addr, size_t bl_size) {
*
* @return result
*/
FlashErrCode flash_write_data_to_bak(uint8_t *data, size_t size, size_t *cur_size,
EfErrCode ef_write_data_to_bak(uint8_t *data, size_t size, size_t *cur_size,
size_t total_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode result = EF_NO_ERR;
/* make sure don't write excess data */
if (*cur_size + size > total_size) {
size = total_size - *cur_size;
}
result = flash_write(get_bak_app_start_addr() + *cur_size, (uint32_t *) data, size);
result = ef_port_write(get_bak_app_start_addr() + *cur_size, (uint32_t *) data, size);
switch (result) {
case FLASH_NO_ERR: {
case EF_NO_ERR: {
*cur_size += size;
FLASH_INFO("Write data to backup area OK.\n");
EF_INFO("Write data to backup area OK.\n");
break;
}
case FLASH_WRITE_ERR: {
FLASH_INFO("Warning: Write data to backup area fault!\n");
case EF_WRITE_ERR: {
EF_INFO("Warning: Write data to backup area fault!\n");
break;
}
}
@ -175,10 +175,10 @@ FlashErrCode flash_write_data_to_bak(uint8_t *data, size_t size, size_t *cur_siz
*
* @return result
*/
FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size) {
EfErrCode ef_copy_app_from_bak(uint32_t user_app_addr, size_t app_size) {
size_t cur_size;
uint32_t app_cur_addr, bak_cur_addr;
FlashErrCode result = FLASH_NO_ERR;
EfErrCode result = EF_NO_ERR;
/* 32 words size buffer */
uint32_t buff[32];
@ -186,20 +186,20 @@ FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size) {
for (cur_size = 0; cur_size < app_size; cur_size += sizeof(buff)) {
app_cur_addr = user_app_addr + cur_size;
bak_cur_addr = get_bak_app_start_addr() + cur_size;
flash_read(bak_cur_addr, buff, sizeof(buff));
result = flash_write(app_cur_addr, buff, sizeof(buff));
if (result != FLASH_NO_ERR) {
ef_port_read(bak_cur_addr, buff, sizeof(buff));
result = ef_port_write(app_cur_addr, buff, sizeof(buff));
if (result != EF_NO_ERR) {
break;
}
}
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Write data to application entry OK.\n");
case EF_NO_ERR: {
EF_INFO("Write data to application entry OK.\n");
break;
}
case FLASH_WRITE_ERR: {
FLASH_INFO("Warning: Write data to application entry fault!\n");
case EF_WRITE_ERR: {
EF_INFO("Warning: Write data to application entry fault!\n");
break;
}
}
@ -215,10 +215,10 @@ FlashErrCode flash_copy_app_from_bak(uint32_t user_app_addr, size_t app_size) {
*
* @return result
*/
FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size) {
EfErrCode ef_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size) {
size_t cur_size;
uint32_t bl_cur_addr, bak_cur_addr;
FlashErrCode result = FLASH_NO_ERR;
EfErrCode result = EF_NO_ERR;
/* 32 words buffer */
uint32_t buff[32];
@ -226,20 +226,20 @@ FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size) {
for (cur_size = 0; cur_size < bl_size; cur_size += sizeof(buff)) {
bl_cur_addr = bl_addr + cur_size;
bak_cur_addr = get_bak_app_start_addr() + cur_size;
flash_read(bak_cur_addr, buff, sizeof(buff));
result = flash_write(bl_cur_addr, buff, sizeof(buff));
if (result != FLASH_NO_ERR) {
ef_port_read(bak_cur_addr, buff, sizeof(buff));
result = ef_port_write(bl_cur_addr, buff, sizeof(buff));
if (result != EF_NO_ERR) {
break;
}
}
switch (result) {
case FLASH_NO_ERR: {
FLASH_INFO("Write data to bootloader entry OK.\n");
case EF_NO_ERR: {
EF_INFO("Write data to bootloader entry OK.\n");
break;
}
case FLASH_WRITE_ERR: {
FLASH_INFO("Warning: Write data to bootloader entry fault!\n");
case EF_WRITE_ERR: {
EF_INFO("Warning: Write data to bootloader entry fault!\n");
break;
}
}
@ -253,8 +253,8 @@ FlashErrCode flash_copy_bl_from_bak(uint32_t bl_addr, size_t bl_size) {
* @return size
*/
static uint32_t get_bak_app_start_addr(void) {
FLASH_ASSERT(bak_app_start_addr);
EF_ASSERT(bak_app_start_addr);
return bak_app_start_addr;
}
#endif /* FLASH_USING_IAP */
#endif /* EF_USING_IAP */

@ -26,9 +26,9 @@
* Created on: 2015-06-04
*/
#include "flash.h"
#include "easyflash.h"
#ifdef FLASH_USING_LOG
#ifdef EF_USING_LOG
/* the stored logs start address and end address. It's like a ring buffer which implement by flash. */
static uint32_t log_start_addr = 0, log_end_addr = 0;
@ -53,16 +53,16 @@ static uint32_t get_next_flash_sec_addr(uint32_t cur_addr);
*
* @return result
*/
FlashErrCode flash_log_init(uint32_t start_addr, size_t log_size, size_t erase_min_size) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_log_init(uint32_t start_addr, size_t log_size, size_t erase_min_size) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(start_addr);
FLASH_ASSERT(log_size);
FLASH_ASSERT(erase_min_size);
EF_ASSERT(start_addr);
EF_ASSERT(log_size);
EF_ASSERT(erase_min_size);
/* the log area size must be an integral multiple of erase minimum size. */
FLASH_ASSERT(log_size % erase_min_size == 0);
EF_ASSERT(log_size % erase_min_size == 0);
/* the log area size must be more than 2 multiple of erase minimum size */
FLASH_ASSERT(log_size / erase_min_size >= 2);
EF_ASSERT(log_size / erase_min_size >= 2);
log_area_start_addr = start_addr;
flash_log_size = log_size;
@ -111,12 +111,12 @@ static void find_start_and_end_addr(void) {
uint8_t cur_log_sec_state = 0;
/* get the first sector status */
cur_sec_status = flash_get_sector_status(log_area_start_addr, flash_erase_min_size);
cur_sec_status = ef_get_sector_status(log_area_start_addr, flash_erase_min_size);
last_sec_status = cur_sec_status;
for (cur_size = flash_erase_min_size; cur_size < flash_log_size; cur_size += flash_erase_min_size) {
/* get current sector status */
cur_sec_status = flash_get_sector_status(log_area_start_addr + cur_size, flash_erase_min_size);
cur_sec_status = ef_get_sector_status(log_area_start_addr + cur_size, flash_erase_min_size);
/* compare last and current status */
switch (last_sec_status) {
case FLASH_SECTOR_EMPTY: {
@ -124,12 +124,12 @@ static void find_start_and_end_addr(void) {
case FLASH_SECTOR_EMPTY:
break;
case FLASH_SECTOR_USING:
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
case FLASH_SECTOR_FULL:
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
}
empty_sec_counts++;
@ -144,8 +144,8 @@ static void find_start_and_end_addr(void) {
cur_using_sec_addr = log_area_start_addr + cur_size - flash_erase_min_size;
break;
case FLASH_SECTOR_USING:
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
case FLASH_SECTOR_FULL:
/* like state 2 */
@ -162,8 +162,8 @@ static void find_start_and_end_addr(void) {
case FLASH_SECTOR_EMPTY:
/* like state 1 */
if (cur_log_sec_state == 2) {
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
} else {
cur_log_sec_state = 1;
@ -203,20 +203,20 @@ static void find_start_and_end_addr(void) {
}
if (using_sec_counts > 1) {
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
} else if (empty_sec_counts == total_sec_num) {
log_start_addr = log_end_addr = log_area_start_addr;
} else if (full_sector_counts == total_sec_num) {
/* this state is almost impossible */
FLASH_DEBUG("Error: Log area error! Now will clean all log area.\n");
flash_log_clean();
EF_DEBUG("Error: Log area error! Now will clean all log area.\n");
ef_log_clean();
return;
} else if (((cur_log_sec_state == 1) && (cur_using_sec_addr != 0))
|| (cur_log_sec_state == 2)) {
/* find the end address */
log_end_addr = flash_find_sec_using_end_addr(cur_using_sec_addr, flash_erase_min_size);
log_end_addr = ef_find_sec_using_end_addr(cur_using_sec_addr, flash_erase_min_size);
}
}
@ -225,12 +225,12 @@ static void find_start_and_end_addr(void) {
*
* @return log used flash total size
*/
size_t flash_log_get_used_size(void) {
FLASH_ASSERT(log_start_addr);
FLASH_ASSERT(log_end_addr);
size_t ef_log_get_used_size(void) {
EF_ASSERT(log_start_addr);
EF_ASSERT(log_end_addr);
/* must be call this function after initialize OK */
FLASH_ASSERT(init_ok);
EF_ASSERT(init_ok);
if (log_start_addr < log_end_addr) {
return log_end_addr - log_start_addr + 4;
@ -252,22 +252,22 @@ size_t flash_log_get_used_size(void) {
*
* @return result
*/
FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
size_t cur_using_size = flash_log_get_used_size();
EfErrCode ef_log_read(size_t index, uint32_t *log, size_t size) {
EfErrCode result = EF_NO_ERR;
size_t cur_using_size = ef_log_get_used_size();
size_t read_size_temp = 0;
FLASH_ASSERT(size % 4 == 0);
FLASH_ASSERT(index + size <= cur_using_size);
EF_ASSERT(size % 4 == 0);
EF_ASSERT(index + size <= cur_using_size);
/* must be call this function after initialize OK */
FLASH_ASSERT(init_ok);
EF_ASSERT(init_ok);
if (!size) {
return result;
}
if (log_start_addr < log_end_addr) {
result = flash_read(log_area_start_addr + index, log, size);
result = ef_port_read(log_area_start_addr + index, log, size);
} else if (log_start_addr > log_end_addr) {
if (log_start_addr + index + size <= log_area_start_addr + flash_log_size) {
/* Flash log area
@ -287,7 +287,7 @@ FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size) {
*
* read from (log_start_addr + index) to (log_start_addr + index + size)
*/
result = flash_read(log_start_addr + index, log, size);
result = ef_port_read(log_start_addr + index, log, size);
} else if (log_start_addr + index < log_area_start_addr + flash_log_size) {
/* Flash log area
* |--------------|
@ -308,9 +308,9 @@ FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size) {
* step2: read from flash log area start address to read size's end address
*/
read_size_temp = (log_area_start_addr + flash_log_size) - (log_start_addr + index);
result = flash_read(log_start_addr + index, log, read_size_temp);
if (result == FLASH_NO_ERR) {
result = flash_read(log_area_start_addr, log + read_size_temp,
result = ef_port_read(log_start_addr + index, log, read_size_temp);
if (result == EF_NO_ERR) {
result = ef_port_read(log_area_start_addr, log + read_size_temp,
size - read_size_temp);
}
} else {
@ -330,7 +330,7 @@ FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size) {
* |--------------|
* read from (log_start_addr + index - flash_log_size) to read size's end address
*/
result = flash_read(log_start_addr + index - flash_log_size, log, size);
result = ef_port_read(log_start_addr + index - flash_log_size, log, size);
}
}
@ -345,14 +345,14 @@ FlashErrCode flash_log_read(size_t index, uint32_t *log, size_t size) {
*
* @return result
*/
FlashErrCode flash_log_write(const uint32_t *log, size_t size) {
FlashErrCode result = FLASH_NO_ERR;
size_t cur_using_size = flash_log_get_used_size(), write_size = 0, writable_size = 0;
EfErrCode ef_log_write(const uint32_t *log, size_t size) {
EfErrCode result = EF_NO_ERR;
size_t cur_using_size = ef_log_get_used_size(), write_size = 0, writable_size = 0;
uint32_t write_addr, erase_addr;
FLASH_ASSERT(size % 4 == 0);
EF_ASSERT(size % 4 == 0);
/* must be call this function after initialize OK */
FLASH_ASSERT(init_ok);
EF_ASSERT(init_ok);
/* write address is after log end address */
write_addr = log_end_addr + 4;
@ -360,13 +360,13 @@ FlashErrCode flash_log_write(const uint32_t *log, size_t size) {
writable_size = flash_erase_min_size - ((write_addr - log_area_start_addr) % flash_erase_min_size);
if (writable_size != flash_erase_min_size) {
if (size > writable_size) {
result = flash_write(write_addr, log, writable_size);
if (result != FLASH_NO_ERR) {
result = ef_port_write(write_addr, log, writable_size);
if (result != EF_NO_ERR) {
goto exit;
}
write_size += writable_size;
} else {
result = flash_write(write_addr, log, size);
result = ef_port_write(write_addr, log, size);
log_end_addr = write_addr + size - 4;
goto exit;
}
@ -380,19 +380,19 @@ FlashErrCode flash_log_write(const uint32_t *log, size_t size) {
log_start_addr = get_next_flash_sec_addr(log_start_addr);
}
/* erase sector */
result = flash_erase(erase_addr, flash_erase_min_size);
if (result == FLASH_NO_ERR) {
result = ef_port_erase(erase_addr, flash_erase_min_size);
if (result == EF_NO_ERR) {
if (size - write_size > flash_erase_min_size) {
result = flash_write(write_addr, log + write_size / 4, flash_erase_min_size);
if (result != FLASH_NO_ERR) {
result = ef_port_write(write_addr, log + write_size / 4, flash_erase_min_size);
if (result != EF_NO_ERR) {
goto exit;
}
log_end_addr = write_addr + flash_erase_min_size - 4;
write_size += flash_erase_min_size;
write_addr += flash_erase_min_size;
} else {
result = flash_write(write_addr, log + write_size / 4, size - write_size);
if (result != FLASH_NO_ERR) {
result = ef_port_write(write_addr, log + write_size / 4, size - write_size);
if (result != EF_NO_ERR) {
goto exit;
}
log_end_addr = write_addr + (size - write_size) - 4;
@ -430,18 +430,18 @@ static uint32_t get_next_flash_sec_addr(uint32_t cur_addr) {
*
* @return result
*/
FlashErrCode flash_log_clean(void) {
FlashErrCode result = FLASH_NO_ERR;
EfErrCode ef_log_clean(void) {
EfErrCode result = EF_NO_ERR;
FLASH_ASSERT(log_area_start_addr);
FLASH_ASSERT(flash_log_size);
EF_ASSERT(log_area_start_addr);
EF_ASSERT(flash_log_size);
/* clean address */
log_start_addr = log_end_addr = log_area_start_addr;
/* erase log flash area */
result = flash_erase(log_area_start_addr, flash_log_size);
result = ef_port_erase(log_area_start_addr, flash_log_size);
return result;
}
#endif
#endif /* EF_USING_LOG */

@ -26,7 +26,7 @@
* Created on: 2015-01-14
*/
#include "flash.h"
#include "easyflash.h"
static const uint32_t crc32_table[] =
{
@ -106,8 +106,8 @@ uint32_t calc_crc32(uint32_t crc, const void *buf, size_t size)
*
* @return the flash sector current status
*/
FlashSecrorStatus flash_get_sector_status(uint32_t addr, size_t sec_size) {
uint32_t cur_using_addr = flash_find_sec_using_end_addr(addr, sec_size);
FlashSecrorStatus ef_get_sector_status(uint32_t addr, size_t sec_size) {
uint32_t cur_using_addr = ef_find_sec_using_end_addr(addr, sec_size);
/* get current status by current using address */
if (cur_using_addr == addr) {
return FLASH_SECTOR_EMPTY;
@ -126,7 +126,7 @@ FlashSecrorStatus flash_get_sector_status(uint32_t addr, size_t sec_size) {
*
* @return current flash sector using end address
*/
uint32_t flash_find_sec_using_end_addr(uint32_t addr, size_t sec_size) {
uint32_t ef_find_sec_using_end_addr(uint32_t addr, size_t sec_size) {
size_t start, continue_ff;
/* counts continuous 0xFF */
for (start = 0; start < sec_size; start++) {
Loading…
Cancel
Save