board.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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-06-27 AHTYDHD the first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
  15. #define TM4C123_SRAM1_START (0x20000000)
  16. #define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
  17. #if defined(__ARMCC_VERSION)
  18. extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
  19. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
  20. #elif __ICCARM__
  21. #pragma section="HEAP"
  22. #define HEAP_BEGIN (__segment_end("HEAP"))
  23. #else
  24. extern int _ebss;
  25. #define HEAP_BEGIN ((void *)&_ebss)
  26. #endif
  27. #define HEAP_END TM4C123_SRAM1_END
  28. #endif
  29. #ifdef RT_USING_PIN
  30. #include "drv_gpio.h"
  31. #endif /* RT_USING_PIN */
  32. #ifdef RT_USING_SERIAL
  33. #include "drv_uart.h"
  34. #endif /* RT_USING_SERIAL */
  35. #ifdef RT_USING_PWM
  36. #include "drv_pwm.h"
  37. #endif /* RT_USING_PWM*/
  38. #ifdef RT_USING_SPI
  39. #include "drv_spi.h"
  40. #endif /* RT_USING_SPI*/
  41. #endif /*__BOARD_H__*/
  42. /************************** end of file ******************/