board.h 804 B

123456789101112131415161718192021222324252627282930313233
  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. * 2021-08-05 mazhiyuan first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rtthread.h>
  13. #include "hal_device.h"
  14. #include "mm32_device.h"
  15. #define SRAM_SIZE 0x5000
  16. #define SRAM_END (SRAM_BASE + SRAM_SIZE)
  17. #ifdef __CC_ARM
  18. extern int Image$$RW_IRAM1$$ZI$$Limit;
  19. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  20. #elif __ICCARM__
  21. #pragma section = "HEAP"
  22. #define HEAP_BEGIN (__segment_end("HEAP"))
  23. #else
  24. extern int __bss_end;
  25. #define HEAP_BEGIN ((void *)&__bss_end)
  26. #endif
  27. #define HEAP_END SRAM_END
  28. #define HEAP_SIZE (HEAP_END - (rt_uint32_t)HEAP_BEGIN)
  29. extern void rt_hw_board_init(void);
  30. #endif