This article introduces how to run RT-Thread Nano with RT-Thread Studio IDE, the stm32f103RB is taking as the example.
Open RT-Thread Studio, click【File】-【New】-【Project】:
Configure this new project:
Note: You can change the SystemClock_Config()
in board.c by modifying the system clock.
The project is generated, connect the hardware, and then compile and download it directly.
Since console serial port and its pin number are configured in the Project Creation Wizard, the uart driver and rt_hw_console_output()
are already implemented in the project and can be printed by default. By opening the serial terminal, you can see that printing has been performed in the terminal.
Double-click RT-Thread Settings
to enter the configuration page, open the component and check FinSH Shell option then save it. After this, the source code of the FinSH component is added to the project.
Among them, rt_hw_console_getchar()
has been implemented on drv_uart.c without any other operations to docking the FinSH code.
Connect the hardware, compile and download, press Tab button in the serial terminal to view the commands in the system: