fal_cfg.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 <rtconfig.h>
  13. #include <board.h>
  14. #define NOR_FLASH_DEV_NAME "norflash0"
  15. /* ===================== Flash device Configuration ========================= */
  16. extern const struct fal_flash_dev stm32f2_onchip_flash;
  17. extern struct fal_flash_dev nor_flash0;
  18. /* flash device table */
  19. #define FAL_FLASH_DEV_TABLE \
  20. { \
  21. &stm32f2_onchip_flash, \
  22. &nor_flash0, \
  23. }
  24. /* ====================== Partition Configuration ========================== */
  25. #ifdef FAL_PART_HAS_TABLE_CFG
  26. /* partition table */
  27. #define FAL_PART_TABLE \
  28. { \
  29. {FAL_PART_MAGIC_WORD, "bl", "stm32_onchip", 0, 64*1024, 0}, \
  30. {FAL_PART_MAGIC_WORD, "app", "stm32_onchip", 64*1024, 704*1024, 0}, \
  31. {FAL_PART_MAGIC_WORD, "easyflash", NOR_FLASH_DEV_NAME, 0, 1024*1024, 0}, \
  32. {FAL_PART_MAGIC_WORD, "download", NOR_FLASH_DEV_NAME, 1024*1024, 1024*1024, 0}, \
  33. }
  34. #endif /* FAL_PART_HAS_TABLE_CFG */
  35. #endif /* _FAL_CFG_H_ */