application.c 667 B

123456789101112131415161718192021222324252627282930313233
  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. #ifdef RT_USING_GDB
  17. #include <gdb_stub.h>
  18. #endif
  19. int rt_application_init()
  20. {
  21. /* do component initialization */
  22. rt_components_init();
  23. #ifdef RT_USING_GDB
  24. gdb_set_device("uart4");
  25. gdb_start();
  26. #endif
  27. return 0;
  28. }