board.c 784 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-11-16 Dystopia the first version
  9. */
  10. #include "board.h"
  11. #include "interrupt.h"
  12. #include "drv_timer.h"
  13. #include "common.h"
  14. #include <rtthread.h>
  15. /**
  16. * This function will initial board.
  17. */
  18. void rt_hw_board_init(void)
  19. {
  20. // initial CPU core
  21. keystone_cpu_init();
  22. // initial interrupt controller
  23. rt_hw_interrupt_init();
  24. // initial system timer
  25. rt_hw_system_timer_init();
  26. /* initialize memory system */
  27. rt_kprintf("heap: 0x%08x - 0x%08x\n", RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
  28. rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
  29. rt_hw_system_timer_start();
  30. }