fal_cfg.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-12-5 SummerGift first version
  9. * 2020-5-17 yufanyufan77 support H7
  10. */
  11. #ifndef __FAL_CFG_H__
  12. #define __FAL_CFG_H__
  13. #include <rtthread.h>
  14. #include <board.h>
  15. #define FLASH_SIZE_GRANULARITY_128K (16 * 128 * 1024)
  16. #define STM32_FLASH_START_ADRESS_128K (0x8000000)
  17. extern const struct fal_flash_dev stm32_onchip_flash_128k;
  18. /* flash device table */
  19. #define FAL_FLASH_DEV_TABLE \
  20. { \
  21. &stm32_onchip_flash_128k, \
  22. }
  23. /* ====================== Partition Configuration ========================== */
  24. #ifdef FAL_PART_HAS_TABLE_CFG
  25. /* partition table */
  26. #define FAL_PART_TABLE \
  27. { \
  28. {FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , 8*128*1024, 0}, \
  29. {FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k", 8*128*1024 , 128*1024, 0}, \
  30. {FAL_PART_MAGIC_WROD, "factory", "onchip_flash_128k", 9*128*1024 , 7*128*1024, 0}, \
  31. }
  32. #endif /* FAL_PART_HAS_TABLE_CFG */
  33. #endif /* _FAL_CFG_H_ */