项目作者: ubirch

项目描述 :
Flash storage lib to store non-volatile data
高级语言: C++
项目地址: git://github.com/ubirch/ubirch-mbed-storage.git
创建时间: 2017-09-27T09:00:06Z
项目社区:https://github.com/ubirch/ubirch-mbed-storage

开源协议:Apache License 2.0

下载


Flash Storage

An mbed OS library to store data in non-volatile memory. Requires some
setup to ensure space is available or alternatively, you know your
free areas.

Wraps the chip and mbed specific implementations in an easy to use
library.

To add this library to your project:

  1. mbed add https://github.com/ubirch/ubirch-mbed-nrf52-storage

Nordic nRF52832

These functions allow the handling of the non-volatile data storage in
the flash memory of the MCU.

Testing

  1. mbed new .
  2. mbed target NRF52_DK
  3. mbed toolchain GCC_ARM
  4. mbed test -n tests-storage-nrf52*

Current Status:

  1. +------------------+---------------+-----------------------------------+--------+--------------------+-------------+
  2. | target | platform_name | test suite | result | elapsed_time (sec) | copy_method |
  3. +------------------+---------------+-----------------------------------+--------+--------------------+-------------+
  4. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | OK | 36.78 | default |
  5. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | OK | 30.84 | default |
  6. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | OK | 30.14 | default |
  7. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | OK | 32.74 | default |
  8. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-nosd | OK | 25.12 | default |
  9. +------------------+---------------+-----------------------------------+--------+--------------------+-------------+
  10. mbedgt: test suite results: 5 OK
  11. mbedgt: test case report:
  12. +------------------+---------------+-----------------------------------+------------------------------------------------------------+--------+--------+--------+--------------------+
  13. | target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
  14. +------------------+---------------+-----------------------------------+------------------------------------------------------------+--------+--------+--------+--------------------+
  15. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage | 2 | 0 | OK | 0.05 |
  16. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage erase pages | 1 | 0 | OK | 0.22 |
  17. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage write big buffer | 1 | 0 | OK | 0.08 |
  18. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage write buffer over page boarder | 1 | 0 | OK | 0.09 |
  19. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage write byte above end address | 1 | 0 | OK | 0.15 |
  20. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage write over the upper bound | 1 | 0 | OK | 0.08 |
  21. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced | Storage [SD] test storage write subsequent bytes | 1 | 0 | OK | 2.22 |
  22. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage | 2 | 0 | OK | 0.06 |
  23. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage erase pages | 1 | 0 | OK | 0.21 |
  24. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage write big buffer | 1 | 0 | OK | 0.09 |
  25. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage write buffer over page boarder | 1 | 0 | OK | 0.08 |
  26. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage write byte above end address | 1 | 0 | OK | 0.14 |
  27. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage write over the upper bound | 1 | 0 | OK | 0.08 |
  28. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-advanced-nosd | Storage [noSD] test storage write subsequent bytes | 1 | 0 | OK | 2.23 |
  29. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write 1.5 words | 1 | 0 | OK | 0.07 |
  30. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write 2 words | 1 | 0 | OK | 0.07 |
  31. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write 3 byte | 1 | 0 | OK | 0.07 |
  32. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write buffer | 1 | 0 | OK | 0.06 |
  33. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write byte | 1 | 0 | OK | 0.07 |
  34. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write existing fails | 1 | 0 | OK | 0.08 |
  35. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write half word | 1 | 0 | OK | 0.07 |
  36. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write non-aligned | 1 | 0 | OK | 0.07 |
  37. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic | Storage [SD] test storage write word | 1 | 0 | OK | 0.07 |
  38. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write 1.5 words | 1 | 0 | OK | 0.07 |
  39. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write 2 words | 1 | 0 | OK | 0.07 |
  40. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write 3 byte | 1 | 0 | OK | 0.06 |
  41. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write buffer | 1 | 0 | OK | 0.07 |
  42. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write byte | 1 | 0 | OK | 0.07 |
  43. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write existing fails | 1 | 0 | OK | 0.08 |
  44. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write half word | 1 | 0 | OK | 0.08 |
  45. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write non-aligned | 1 | 0 | OK | 0.07 |
  46. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-basic-nosd | Storage [noSD] test storage write word | 1 | 0 | OK | 0.07 |
  47. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-nosd | Storage [nosd] test write page | 1 | 0 | OK | 0.17 |
  48. | NRF52_DK-GCC_ARM | NRF52_DK | tests-storage-nrf52-nosd | Storage [nosd] test write simple | 1 | 0 | OK | 0.06 |
  49. +------------------+---------------+-----------------------------------+------------------------------------------------------------+--------+--------+--------+--------------------+
  50. mbedgt: test case results: 34 OK

TODO

  • add automated tests on dev kit hardware

License

This library is available under the Apache License

  1. Copyright 2017 ubirch GmbH
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. `