board.c 864 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/04/22 Juice the first version
  9. */
  10. #include <rthw.h>
  11. #include <rtthread.h>
  12. #include "board.h"
  13. #include "drv_uart.h"
  14. void rt_hw_board_init(void)
  15. {
  16. /* initialize hardware interrupt */
  17. rt_hw_uart_init();
  18. // rt_hw_systick_init();
  19. #if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
  20. /* set console device */
  21. rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
  22. #endif
  23. #ifdef RT_USING_HEAP
  24. rt_kprintf("heap: [0x%08x - 0x%08x]\n", (rt_ubase_t) RT_HW_HEAP_BEGIN, (rt_ubase_t) RT_HW_HEAP_END);
  25. /* initialize memory system */
  26. rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
  27. #endif
  28. #ifdef RT_USING_COMPONENTS_INIT
  29. rt_components_board_init();
  30. #endif
  31. }