board.h 925 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2015, Freescale Semiconductor, Inc.
  3. * Copyright 2016-2018 NXP
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. */
  8. #ifndef _BOARD_H_
  9. #define _BOARD_H_
  10. #include <rtthread.h>
  11. #include "clock_config.h"
  12. #include "fsl_gpio.h"
  13. #if defined(__ARMCC_VERSION)
  14. extern int Image$$ARM_LIB_HEAP$$ZI$$Base;
  15. extern int Image$$ARM_LIB_STACK$$ZI$$Base;
  16. #define HEAP_BEGIN ((void *)&Image$$ARM_LIB_HEAP$$ZI$$Base)
  17. #define HEAP_END ((void*)&Image$$ARM_LIB_STACK$$ZI$$Base)
  18. #elif defined(__ICCARM__)
  19. #pragma section="HEAP"
  20. #define HEAP_BEGIN (__section_begin("HEAP"))
  21. #define HEAP_END (__section_end("HEAP"))
  22. #elif defined(__GNUC__)
  23. extern int __HeapBase;
  24. extern int __HeapLimit;
  25. #define HEAP_BEGIN ((void *)&__HeapBase)
  26. #define HEAP_END ((void *)&__HeapLimit)
  27. #endif
  28. void rt_hw_board_init(void);
  29. #if defined(__cplusplus)
  30. }
  31. #endif /* __cplusplus */
  32. #endif /* _BOARD_H_ */