fal_cfg.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-05-17 armink the first version
  9. */
  10. #ifndef _FAL_CFG_H_
  11. #define _FAL_CFG_H_
  12. #include <zos.h>
  13. #include <zos_config.h>
  14. /* ===================== Flash device Configuration ========================= */
  15. extern const struct fal_flash_dev zos_onchip_flash;
  16. #ifdef FAL_USING_SFUD_PORT
  17. #define NOR_FLASH_DEV_NAME "norflash0"
  18. extern struct fal_flash_dev nor_flash0;
  19. #define FAL_FLASH_DEV_TABLE \
  20. { \
  21. &zos_onchip_flash, \
  22. &nor_flash0, \
  23. }
  24. #else
  25. #define FAL_FLASH_DEV_TABLE \
  26. { \
  27. &zos_onchip_flash, \
  28. }
  29. #endif
  30. /* flash device table */
  31. /* ====================== Partition Configuration ========================== */
  32. #ifdef FAL_PART_HAS_TABLE_CFG
  33. #ifdef FAL_USING_SFUD_PORT
  34. #define FAL_PART_TABLE \
  35. { \
  36. {FAL_PART_MAGIC_WORD, "filesystem", "zos_onchip", 0, BSP_USING_FLASH_LEN * 1024, 0}, \
  37. {FAL_PART_MAGIC_WORD, "easyflash", NOR_FLASH_DEV_NAME, 0, 20*1024, 0}, \
  38. {FAL_PART_MAGIC_WORD, "download", NOR_FLASH_DEV_NAME, 20*1024, 1024*1024, 0}, \
  39. }
  40. #else
  41. #define FAL_PART_TABLE \
  42. { \
  43. {FAL_PART_MAGIC_WORD, "filesystem", "zos_onchip", 0, BSP_USING_FLASH_LEN * 1024, 0}, \
  44. }
  45. #endif
  46. /* partition table */
  47. #endif /* FAL_PART_HAS_TABLE_CFG */
  48. #endif /* _FAL_CFG_H_ */