board.h 768 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2017-2019, MindMotion AE Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-03-13 henryhuang first version
  9. */
  10. #ifndef BOARD_H__
  11. #define BOARD_H__
  12. #include <rtthread.h>
  13. #include <hal_device.h>
  14. #define SRAM_SIZE 0x5000
  15. #define SRAM_END (SRAM_BASE + SRAM_SIZE)
  16. #ifdef __CC_ARM
  17. extern int Image$$RW_IRAM1$$ZI$$Limit;
  18. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  19. #elif __ICCARM__
  20. #pragma section = "HEAP"
  21. #define HEAP_BEGIN (__segment_end("HEAP"))
  22. #else
  23. extern int __bss_end;
  24. #define HEAP_BEGIN ((void *)&__bss_end)
  25. #endif
  26. #define HEAP_END SRAM_END
  27. #define HEAP_SIZE (HEAP_END - (rt_uint32_t)HEAP_BEGIN)
  28. extern void rt_hw_board_init(void);
  29. #endif