fal_cfg.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * File : fal_cfg.h
  3. * This file is part of FAL (Flash Abstraction Layer) package
  4. * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2018-05-17 armink the first version
  23. */
  24. #ifndef _FAL_CFG_H_
  25. #define _FAL_CFG_H_
  26. #define FAL_DEBUG 0
  27. #define FAL_PART_HAS_TABLE_CFG
  28. /* ===================== Flash device Configuration ========================= */
  29. extern const struct fal_flash_dev stm32_onchip_flash;
  30. /* flash device table */
  31. #define FAL_FLASH_DEV_TABLE \
  32. { \
  33. &stm32_onchip_flash \
  34. }
  35. /* ====================== Partition Configuration ========================== */
  36. #ifdef FAL_PART_HAS_TABLE_CFG
  37. /* partition table //0x19800 //0x26800 //0x33800 */
  38. #define FAL_PART_TABLE \
  39. { \
  40. {FAL_PART_MAGIC_WORD, "bl", "stm32_onchip", 0, 2*1024, 0}, \
  41. {FAL_PART_MAGIC_WORD, "app", "stm32_onchip", 2*1024, 96*1024, 0}, \
  42. {FAL_PART_MAGIC_WORD, "kv", "stm32_onchip", 98*1024, 60*1024, 0}, \
  43. {FAL_PART_MAGIC_WORD, "ts_plan", "stm32_onchip", 158*1024, 26*1024, 0}, \
  44. {FAL_PART_MAGIC_WORD, "ts_key", "stm32_onchip", 184*1024, 26*1024, 0}, \
  45. {FAL_PART_MAGIC_WORD, "ts_weight", "stm32_onchip", 210*1024, 44*1024, 0}, \
  46. }
  47. #endif /* FAL_PART_HAS_TABLE_CFG */
  48. #endif /* _FAL_CFG_H_ */