armink.ztl
Newbie level 1
Hi everyone, I recently wrote an open source software share with everyone.
An lightweight embedded flash memory library(https://github.com/armink/EasyFlash)
Download: View attachment EasyFlash V1.04.20.zip
1 EasyFlash Introduction
EasyFlash is an open source lightweight embedded flash memory library. It provide convenient application interface for MCU (Micro Control Unit). The developers can achieve more efficient and common application development based on Flash memory. The library currently provides two useful features :
1.1 File structure
1.2 Resource consumption
1.3 Supported platforms
Hardware platform has been ported stm32f10x and stm32f4xx series of on-chip Flash. This is my product platform. Remaining platform porting difficulty is little. The porting just modify \flash\port\flash_port.c file. Implement erase, write, read, print feature.
Welcome everyone to fork and pull request(Github|OSChina|**broken link removed**). The open source software success is inseparable from everyone efforts. I hope this project will help everyone reduce product development cycle and make product to success earlier.
2 Flow
2.1 Env
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.
2.2 IAP
The figure below shows the process of upgrade software through the console by IAP. It use this library comes with IAP function interface. Uses a serial port + Ymodem protocol mode. You can also be achieved through CAN, 485, Ethernet bus to online upgrade.
3 Documents
All documents is in the \docs\ folder.
4 License
Using GPL v3.0 open source license, please read the project LICENSE file.
An lightweight embedded flash memory library(https://github.com/armink/EasyFlash)
Download: View attachment EasyFlash V1.04.20.zip
1 EasyFlash Introduction
EasyFlash is an open source lightweight embedded flash memory library. It provide convenient application interface for MCU (Micro Control Unit). The developers can achieve more efficient and common application development based on Flash memory. The library currently provides two useful features :
- Env(environment variables) : Let variable easily achieve power down to save. Support write balance mode . No need to worry about variable length, wear leveling and other problems.
Use key-value model to stored variables to the Flash. You can be more simple to store setting parameters or running logs and other information which you want to power down to save. - IAP : online upgrade is no longer a difficult thing.
The library encapsulates the IAP (In-Application Programming) feature common interface. Support CRC32 checksum. While supporting the bootloader and application upgrade.
1.1 File structure
Source file | Description |
---|---|
\flash\src\flash_env.c | Env (normal mode) interface and implementation source code. |
\flash\src\flash_env_wl.c | Env (wear leveling mode) interface and implementation source code. |
\flash\src\flash_iap.c | IAP interface and implementation source code. |
\flash\src\flash_utils.c | EasyFlash utils. For example CRC32. |
\flash\src\flash.c | Currently contains EasyFlash initialization function only. |
\flash\port\flash_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. |
\demo\stm32f4xx | stm32f4xx demo base on RT-Thread. |
1.2 Resource consumption
- Minimum: ROM:6K bytes RAM:0.5K bytes +(Env size)
- Demo :STM32F103RET6 + RT-Thread1.2.2+Env(2K bytes)
- Actual : ROM:6K bytes RAM:2.6K bytes
1.3 Supported platforms
Hardware platform has been ported stm32f10x and stm32f4xx series of on-chip Flash. This is my product platform. Remaining platform porting difficulty is little. The porting just modify \flash\port\flash_port.c file. Implement erase, write, read, print feature.
Welcome everyone to fork and pull request(Github|OSChina|**broken link removed**). The open source software success is inseparable from everyone efforts. I hope this project will help everyone reduce product development cycle and make product to success earlier.
2 Flow
2.1 Env
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.
2.2 IAP
The figure below shows the process of upgrade software through the console by IAP. It use this library comes with IAP function interface. Uses a serial port + Ymodem protocol mode. You can also be achieved through CAN, 485, Ethernet bus to online upgrade.
3 Documents
All documents is in the \docs\ folder.
4 License
Using GPL v3.0 open source license, please read the project LICENSE file.
Last edited by a moderator: