Coder Social home page Coder Social logo

移植出现的部分问题 about easyflash HOT 4 CLOSED

armink avatar armink commented on August 23, 2024
移植出现的部分问题

from easyflash.

Comments (4)

armink avatar armink commented on August 23, 2024

之前做过一次重构,所以部分细节有些遗漏,多谢反馈哈~

from easyflash.

armink avatar armink commented on August 23, 2024

@JGINGIT 现在已经移植成功了吗?

from easyflash.

JesseGuoX avatar JesseGuoX commented on August 23, 2024

@armink 还没,代码还没仔细研究,理解不了EF_ERASE_MIN_SIZEENV_USER_SETTING_SIZE。例如我是W25Q16最小擦除单位是4KB,所以EF_ERASE_MIN_SIZE = (4 * 1024)

ENV_USER_SETTING_SIZE是用户设置的数据环境变量的空间大小么?

    /* check capacity of ENV  */
    if (env_str_len + get_env_data_size() >= ENV_USER_SETTING_SIZE) {
        return EF_ENV_FULL;
    }

但是又为什么有ENV_AREA_SIZE的定义,用户数据环境变量空间大小又等于ENV_AREA_SIZE - ENV_SYSTEM_SIZE?

from easyflash.

armink avatar armink commented on August 23, 2024

@JGINGIT

  • 1、W25Q16EF_ERASE_MIN_SIZE = (4 * 1024) 这个是没问题的
  • 2、对于ENV_AREA_SIZEENV_USER_SETTING_SIZE的区别,点击这里有解释
  • 2、由于EasyFlash对所有的环境变量都会使用RAM缓存,但是在更多时候用户使用的环境变量大小会比EF_ERASE_MIN_SIZE小,所以需要再定义ENV_USER_SETTING_SIZE来指定用户设定的环境变量大小。
  • 3、环境变量区总容量在不同的模式下会有差异
    • 1、常规模式:没有差异;
    • 2、擦写平衡模式:系统区将会占用1个EF_ERASE_MIN_SIZE大小,数据区至少等使用2个以上Flash扇区;
    • 3、掉电保护模式:环境变量区将会被备份,所以总容量是常规模式的2倍;
    • 4、擦写平衡+掉电保护模式:系统区将会占用1个EF_ERASE_MIN_SIZE大小,数据区将会是擦写平衡模式下的数据区总容量的2倍。

所以,你先看下这里的解释能不能理解?

from easyflash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.