board.c 774 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-04-23 Wangshun first version
  9. */
  10. #include <board.h>
  11. #include <rthw.h>
  12. #include <rtthread.h>
  13. #include <drv_usart.h>
  14. extern unsigned long __heap_start;
  15. extern unsigned long __heap_end;
  16. /**
  17. * This function will initialize your board.
  18. */
  19. void rt_hw_board_init()
  20. {
  21. rt_hw_interrupt_init();
  22. #ifdef RT_USING_HEAP
  23. rt_system_heap_init((void *)&__heap_start, (void *)&__heap_end);
  24. #endif
  25. #ifdef BSP_USING_UART
  26. rt_hw_usart_init();
  27. #endif
  28. #ifdef RT_USING_CONSOLE
  29. rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
  30. #endif
  31. #ifdef RT_USING_COMPONENTS_INIT
  32. rt_components_board_init();
  33. #endif
  34. }