board.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. * 2023-07-15 yby the first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rthw.h>
  13. #include <rtthread.h>
  14. #include <rtdevice.h>
  15. #include <msp.h>
  16. #include "hw_sysctl.h"
  17. #include "sysctl.h"
  18. #include "systick.h"
  19. #include "gpio.h"
  20. #include "pin_map.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #define MSP432_FLASH_START_ADRESS ((rt_uint32_t)0x00000000)
  25. #define MSP432_FLASH_SIZE (1024 * 1024)
  26. #define MSP432_FLASH_END_ADDRESS ((rt_uint32_t)(MSP432_FLASH_START_ADRESS + MSP432_FLASH_SIZE))
  27. #define MSP432_SRAM_SIZE 256
  28. #define MSP432_SRAM_END (0x20000000 + MSP432_SRAM_SIZE * 1024)
  29. #if defined(__ARMCC_VERSION)
  30. extern int Image$$RW_IRAM1$$ZI$$Limit;
  31. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  32. #elif __ICCARM__
  33. #pragma section="HEAP"
  34. #define HEAP_BEGIN (__segment_end("HEAP"))
  35. #else
  36. extern int __end;
  37. #define HEAP_BEGIN ((void *)&__end)
  38. #endif
  39. #define HEAP_END MSP432_SRAM_END
  40. void uart_hw_config(void);
  41. #ifdef RT_USING_PIN
  42. #include "drv_gpio.h"
  43. #endif /* RT_USING_PIN */
  44. #ifdef RT_USING_SERIAL
  45. #include "drv_uart.h"
  46. #endif /* RT_USING_SERIAL */
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /*__BOARD_H__*/