board.h 813 B

1234567891011121314151617181920212223242526272829303132333435363738
  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-10-10 Sherman first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define RA_SRAM_SIZE 256 /* The SRAM size of the chip needs to be modified */
  16. #define RA_SRAM_END (0x20000000 + RA_SRAM_SIZE * 1024)
  17. #ifdef __ARMCC_VERSION
  18. extern int Image$$RAM_END$$ZI$$Base;
  19. #define HEAP_BEGIN ((void *)&Image$$RAM_END$$ZI$$Base)
  20. #elif __ICCARM__
  21. #pragma section="CSTACK"
  22. #define HEAP_BEGIN (__segment_end("CSTACK"))
  23. #else
  24. extern int __RAM_segment_used_end__;
  25. #define HEAP_BEGIN (&__RAM_segment_used_end__)
  26. #endif
  27. #define HEAP_END RA_SRAM_END
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif