Open source lightweight embedded Flash library Easyflash released

Source: Internet
Author: User
Tags crc32

EASYFLASH1, Introduction

Easyflash is an open source lightweight embedded flash memory library that provides a convenient, general-purpose upper-level application interface for the MCU (Micro Control Unit), enabling developers to more efficiently implement common application development based on flash memory. The library currently offers two useful functions :

    • ENV allows variables to be easily saved, supports write-balance mode without worrying about variable length, wear balance, etc.

      Using Key-value pairs (Key-value) to store variables in Flash, similar to U-boot, is used in the 环境变量 same way as U-boot.

    • IAP Online upgrade is no longer a difficult thing

      The library encapsulates the interfaces commonly used with the IAP (In-application programming) feature, supports CRC32 verification, and supports bootloader and application upgrades.

1.1. File structure
source File Description
\flash\src\flash_env.c ENV (general mode) related operation interface and realization of source code
\flash\src\flash_env_wl.c ENV (wear balance mode) related operation interface and realize the source code
\flash\src\flash_iap.c IAP related operation interface and realization source code
\flash\src\flash_utils.c Easyflash commonly used gadgets, such as: CRC32
\flash\src\flash.c Currently only contains Easyflash initialization methods
\flash\port\flash_port.c Easyflash porting interface and configuration parameters under different platforms
\demo\stm32f10x Demo under the stm32f10x platform
1.2. Resource occupancy
6K bytes     0.5K bytes + (Env大小)Demo平台:STM32F103RET6 + RT-Thread1.2.2 + Env(2K6K bytes     2.6K bytes
1.3. Support Platform

At present, the platform has only a STM32F10X series of on-chip flash, this is also the author of the Platform for product use. The rest of the platform is not very difficult to transplant, at the beginning of the design of the project to consider the compatibility of all platforms (except 64-bit), so all porting interfaces are reserved. Porting only needs \flash\port\flash_port.c to modify a file, to implement the erase, write, read and print functions.

Welcome everyone Forkand pull request (github| oschina| Coding). The success of open source software is inseparable from the efforts of all, but also hope that the project can help you reduce the development cycle, so that the product earlier success.

2, Process 2.1, environment variables

In order to manually invoke the common interface of environment variables through the console, it demonstrates the "temp" process of environment variables from creation to saving, then modifying and finally deleting. These interfaces are supported for direct invocation by the application layer.

2.2. Online Upgrade

The process of using the console to upgrade the IAP software is demonstrated by the use of the IAP interface in the library, which demonstrates the serial port +ymodem protocol. You can also realize the remote network update through can, 485, Ethernet and other bus.

3. Documentation

Refer \docs\ to the file under specific content.

4. Copyright

With the GPL v3.0 Open Source Agreement, please read the LICENSE file content in the project for details.

Open source lightweight embedded Flash library Easyflash released

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.