board.h 956 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. * 2020-04-29 supperthomas first version
  9. *
  10. */
  11. #ifndef _BOARD_H_
  12. #define _BOARD_H_
  13. #include <rtthread.h>
  14. #include <rthw.h>
  15. #include "nrf.h"
  16. #define MCU_FLASH_SIZE MCU_FLASH_SIZE_KB*1024
  17. #define MCU_FLASH_END_ADDRESS ((uint32_t)(MCU_FLASH_START_ADDRESS + MCU_FLASH_SIZE))
  18. #define MCU_SRAM_SIZE MCU_SRAM_SIZE_KB*1024
  19. #define MCU_SRAM_END_ADDRESS (MCU_SRAM_START_ADDRESS + MCU_SRAM_SIZE)
  20. #if defined(__ARMCC_VERSION)
  21. extern int Image$$RW_IRAM1$$ZI$$Limit;
  22. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  23. #elif __ICCARM__
  24. #pragma section="CSTACK"
  25. #define HEAP_BEGIN (__segment_end("CSTACK"))
  26. #else
  27. extern int __bss_end__;
  28. #define HEAP_BEGIN ((void *)&__bss_end__)
  29. #endif
  30. #define HEAP_END (MCU_SRAM_END_ADDRESS)
  31. void rt_hw_board_init(void);
  32. #endif