diff --git a/bsp/stm32f40x/applications/application.c b/bsp/stm32f40x/applications/application.c index 08b672628c7c5decfcbdbe82738e24395970b056..d0bffdc05e011623748064edba7e926aab1132ab 100644 --- a/bsp/stm32f40x/applications/application.c +++ b/bsp/stm32f40x/applications/application.c @@ -34,10 +34,8 @@ void rt_init_thread_entry(void* parameter) { -#ifdef RT_USING_COMPONENTS_INIT /* initialization RT-Thread Components */ rt_components_init(); -#endif /* GDB STUB */ #ifdef RT_USING_GDB diff --git a/bsp/stm32f40x/drivers/board.c b/bsp/stm32f40x/drivers/board.c index 6abb8ccb2368d548ed386c42d80a04efdcc2cf2e..a63682d7798e4ac5f8526fe9a949ccfa366aedbe 100644 --- a/bsp/stm32f40x/drivers/board.c +++ b/bsp/stm32f40x/drivers/board.c @@ -93,17 +93,11 @@ void rt_hw_board_init() /* Configure the SysTick */ SysTick_Configuration(); - stm32_hw_usart_init(); - stm32_hw_pin_init(); - + rt_components_board_init(); + #ifdef RT_USING_CONSOLE rt_console_set_device(CONSOLE_DEVICE); -#endif - -#ifdef RT_USING_COMPONENTS_INIT - rt_components_board_init(); -#endif - +#endif } /*@}*/