2023-04-14 13:23:06 +08:00
# How to create a RT-Studio project
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
[Download the latest RT-Thread studio ](https://www.rt-thread.io/studio.html ) and follow the instructions to install it on your windows machine.
This article use STM32F401-Nucleo as an example.
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 1 Create a new project
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 1.1 Go to File -> Import.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Import_bsp.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 1.2 Select RT-Thread Bsp Project into Workspace.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Workspace.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 1.3 Import Projects from BSP.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Import_prj.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 1.4 Browse Bsp Location to rt-threadx\bsp\stm32\stm32f401-st-nucleo, then click Select Folder.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Folder.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 1.5 Fill up the rest of the information and select ST-LINK for debugger. Then, click finish button. There will be a newly created project at the workspace.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Info.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Import.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/Project.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 2 Tool Chain
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 2.1 Select the latest tool chain version to resolve the warning.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/BuildSetting.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/GUN_Tools.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 2.2 If there is no latest tool chain version, click SDK manager to download the latest version.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/SDK.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
> Select the latest version from the RT-Thread SDK Manager window and click install packages button. After installation, click Exit SDK Manger button again.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/SDK_ver.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
> Then select the latest version from the Open Build Settings Dialog.
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 3 RT-Thread Setting
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 3.1 In order to configure kernel and to enable add-on software packages, click RT-Thread Settings. Then, click detail button.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/rt-studio-settings.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/softpkgs.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/select.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 3.2 After configuration, click save to update the latest configuration.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/save_select.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/saveing.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 4 Compilation
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 4.1 In order to complie the project, select the project and ensure that it is [Active - Debug ] state.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/select_prj.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
### 4.2 Click compilation icon at the menu bar to compile the project.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/build.png)
![](figures_en/build_finish.png)
### 4.3 Reset Mode Setup
By default, it is selected as hardware reset. After downloading the code, it is required to press the reset physical button on the board. However, this can be done automatically by selecting system reset option at the dropdown list.
To select system reset, click the configuration icon at menubar. Then, go to download tab. At the reset mode setup, you can either select hardware or system reset.
![](figures_en/setting.png)
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/rst.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 5 Terminal
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
To access the development board, click terminal icon at the menu ba and select the correct serial port.
2023-04-11 17:05:27 +08:00
2023-04-14 13:23:06 +08:00
![](figures_en/terminal.png)
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
## 6 Additional Info
2023-04-11 17:05:27 +08:00
2023-04-14 00:29:23 +08:00
If you need addtional information, visit to
2023-04-11 17:05:27 +08:00
https://www.rt-thread.io/document/site/programming-manual/interrupt/interrupt/
2023-04-14 13:23:06 +08:00
## 7 Author
2023-04-14 00:29:23 +08:00
2023-04-14 13:23:06 +08:00
[Stanley Lwin ](https://github.com/byte-me-stan )