application.c 691 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2012-11-20 Bernard the first version
  13. */
  14. #include <stdlib.h>
  15. #include <rtthread.h>
  16. #include <components.h>
  17. #ifdef RT_USING_GDB
  18. #include <gdb_stub.h>
  19. #endif
  20. int rt_application_init()
  21. {
  22. /* do component initialization */
  23. rt_components_init();
  24. #ifdef RT_USING_GDB
  25. gdb_set_device("uart4");
  26. gdb_start();
  27. #endif
  28. return 0;
  29. }