fal_cfg.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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-08-21 MurphyZhao the first version
  9. */
  10. #ifndef _FAL_CFG_H_
  11. #define _FAL_CFG_H_
  12. #include <rtthread.h>
  13. #include <board.h>
  14. /* enable stm32l4 onchip flash driver sample */
  15. #define FAL_FLASH_PORT_DRIVER_STM32L4
  16. /* enable SFUD flash driver sample */
  17. #define FAL_FLASH_PORT_DRIVER_SFUD
  18. extern const struct fal_flash_dev stm32_onchip_flash;
  19. extern const struct fal_flash_dev nor_flash0;
  20. /* flash device table */
  21. #define FAL_FLASH_DEV_TABLE \
  22. { \
  23. &stm32_onchip_flash, \
  24. &nor_flash0, \
  25. }
  26. /* ====================== Partition Configuration ========================== */
  27. #ifdef FAL_PART_HAS_TABLE_CFG
  28. /* partition table */
  29. #define FAL_PART_TABLE \
  30. { \
  31. {FAL_PART_MAGIC_WROD, "app", "onchip_flash", 0, 384 * 1024, 0}, \
  32. {FAL_PART_MAGIC_WROD, "param", "onchip_flash", 384 * 1024, 128 * 1024, 0}, \
  33. {FAL_PART_MAGIC_WROD, "easyflash", "nor_flash", 0, 512 * 1024, 0}, \
  34. {FAL_PART_MAGIC_WROD, "download", "nor_flash", 512 * 1024, 1024 * 1024, 0}, \
  35. {FAL_PART_MAGIC_WROD, "wifi_image", "nor_flash", (512 + 1024) * 1024, 512 * 1024, 0}, \
  36. {FAL_PART_MAGIC_WROD, "font", "nor_flash", (512 + 1024 + 512) * 1024, 7 * 1024 * 1024, 0}, \
  37. {FAL_PART_MAGIC_WROD, "filesystem", "nor_flash", (512 + 1024 + 512 + 7 * 1024) * 1024, 7 * 1024 * 1024, 0}, \
  38. }
  39. #endif /* FAL_PART_HAS_TABLE_CFG */
  40. #endif /* _FAL_CFG_H_ */