board.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2006-2018, Synwit Technology Co.,Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-05-31 ZYH first version
  9. * 2018-12-10 Zohar_Lee format file
  10. */
  11. #ifndef BOARD_H__
  12. #define BOARD_H__
  13. #include <rtthread.h>
  14. #include <SWM320.h>
  15. #define SRAM_BASE 0x20000000
  16. #define SRAM_SIZE 0x20000
  17. #ifdef BSP_USING_EXT_SRAM
  18. #define EXT_SRAM_BASE SRAMM_BASE
  19. #define EXT_SRAM_SIZE BSP_EXT_SRAM_SIZE
  20. #define EXT_SRAM_BEGIN EXT_SRAM_BASE
  21. #define EXT_SRAM_END (EXT_SRAM_BASE + EXT_SRAM_SIZE)
  22. #endif
  23. #define SRAM_END (SRAM_BASE + SRAM_SIZE)
  24. #if defined(__CC_ARM) || defined(__CLANG_ARM)
  25. extern int Image$$RW_IRAM1$$ZI$$Limit;
  26. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  27. #elif __ICCARM__
  28. #pragma section = "HEAP"
  29. #define HEAP_BEGIN (__segment_end("HEAP"))
  30. #else
  31. extern int __bss_end;
  32. #define HEAP_BEGIN ((void *)&__bss_end)
  33. #endif
  34. #define HEAP_END SRAM_END
  35. #define HEAP_SIZE (HEAP_END - (rt_uint32_t)HEAP_BEGIN)
  36. extern void rt_hw_board_init(void);
  37. #endif