You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The introduction to Env under the documentation
section of the RTT source code repository is
outdated and unmaintained. We recommend moving the Env
documentation to https://github.com/RT-Thread/env/
for self-maintenance.
Solution:
Direct users to the latest README at https://github.com/RT-Thread/env/.
The Env content under the documentation section of RTT
will not be deleted for now, but will be marked as "outdated".
Signed-off-by: Chen Wang <[email protected]>
Copy file name to clipboardExpand all lines: documentation/env/env.md
+36-35Lines changed: 36 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,9 @@
1
-
@page page_env User Manual of Env
1
+
@page page_env Env
2
2
3
3
Env is a handy utility tool developed by RT-Thread team to build environment, graphical system configuration, and packages management for software projects that intend to run on RT-Thread operating system. Env tool come with source code builder, compilation environment and package management system.
4
4
5
5
It is a wrapper tool for build-in menuconfig, which is an open source GUI tool which is designed to tailor for ease of use for developers. It can also be used to configure the kernel configuration parameters, components and software packages so that developers can construct the system like lego blocks.
6
6
7
-
Env for Windows repository: https://github.com/RT-Thread/env-windows
8
-
9
7
# Main Features
10
8
11
9
- menuconfig provides graphical interface to interact with operational logic and configuration parameters
@@ -16,24 +14,27 @@ Env for Windows repository: https://github.com/RT-Thread/env-windows
16
14
- Modular software packages and decoupling design make it easier to maintain.
17
15
- It also featured with point and click to download additional software packages and dependencies directly from Internet.
18
16
19
-
# Download
17
+
# User Guide
18
+
19
+
Lastest user guide see <https://github.com/RT-Thread/env/blob/master/README.md>.
20
+
21
+
# Archive Information
20
22
21
-
-[Download the Env tool](https://github.com/RT-Thread/env-windows/releases), e.g. `env-windows-v1.3.5.7z`.
22
-
- Extract the .7z file and the path shouldn't contain any non-ascii or space characters.
23
+
<spanstyle='color:red'>**NOTE: The following information may be outdated, please read carefully.**</span>
23
24
24
-
# User Guide of Env
25
+
##User Guide of Env
25
26
26
-
## Open the control Console
27
+
###Open the control Console
27
28
28
29
The rt-thread software package environment is mainly based on the command line console so that the rt-thread development environment can be set up by minimizing the modification of configuration files.
29
30
30
31
There are two ways to open the console:
31
32
32
-
### 1. click the Env directory executable file
33
+
####1. click the Env directory executable file
33
34
34
35
To enter the Env directory, you can run `env.exe` in this directory. If it fails to open, you can try to use `env.bat`.
35
36
36
-
### 2. open the Env console from the right-click menu in the folder
37
+
####2. open the Env console from the right-click menu in the folder
37
38
38
39
Add Env to the right-click menu:
39
40
@@ -49,19 +50,19 @@ Follow the steps from the image to launch the Env console from the right-click m
49
50
50
51
> Due to the need for the environment variables of the Env process to be set, the anti-virus software may misreport at the first startup. If the anti-virus software misreport is encountered, allow Env related programs to run, and then add related programs to the white list.
51
52
52
-
## Compile
53
+
###Compile
53
54
54
55
Scons is a compile building tool used by RT-Thread to compile RT-Threads using the scons related commands.
55
56
56
-
### Step One: Switch to the BSP root directory
57
+
####Step One: Switch to the BSP root directory
57
58
58
59
If you use Method 1 to open Env console, you need to switch to the target BSP using the `cd` command.
59
60
60
61
For example, the target BSP is `rt-thread\bsp\stm32\stm32f103-dofly-lyc8`:
Env for Windows carries Python2.7 & Scons . To compile BSP, just use the default ARM_GCC toolchain by running `scons` or `scons -j12` (12 CPU cores compiling) command in the target BSP directory.
67
68
@@ -84,28 +85,28 @@ scons --target=mdk5
84
85
85
86
For more scons tutorials, please refer to @ref page_scons.
86
87
87
-
## BSP configuration: menuconfig
88
+
###BSP configuration: menuconfig
88
89
89
90
Menuconfig is a graphical configuration tool that RT-Thread uses to configure and tailor the entire system.
90
91
91
-
### Instruction for Shortcuts
92
+
####Instruction for Shortcuts
92
93
93
94
Go to the BSP root directory and open the interface by entering `menuconfig`. The menuconfig common shortcuts are as shown:
94
95
95
96

96
97
97
-
### Modify Settings
98
+
####Modify Settings
98
99
99
100
There are many types of configuration items in menuconfig, and the modification methods are different. The common types are:
100
101
101
102
- On/Off Type: Use the space bar to select or close
102
103
- Value, string type: After pressing the Enter key, a dialog box will appear, and the configuration items will be modified in the dialog box.
103
104
104
-
### Save Settings
105
+
####Save Settings
105
106
106
107
After selecting the configuration item, press `ESC` to exit, and select `Save` to automatically generate the `rtconfig.h` file. At this point, using the `scons` command again will recompile the project according to the new rtconfig.h file.
107
108
108
-
## Package Management
109
+
###Package Management
109
110
110
111
RT-Thread provides a package management platform where the officially available or developer-supplied packages are stored. The platform provides developers with a choice of reusable software packages that are an important part of RT-Thread.
111
112
@@ -141,7 +142,7 @@ optional arguments:
141
142
--printenv print environmental variables to check
142
143
```
143
144
144
-
### Download, update, and delete packages
145
+
####Download, update, and delete packages
145
146
146
147
Before downloading and updating the software package, you need to **open** the target package in `menuconfig`.
147
148
@@ -155,13 +156,13 @@ Find the package you need and open, then save and exit menuconfig. The package w
155
156
-**update**: if the selected package has a latest update on the server and the version is selected **latest**, then enter `pkgs --update` , the package will be updated in local;
156
157
-**delete**: if a software package is not needed, deselect it in menuconfig and then use `pkgs --update` command. Then locally downloaded but unselected packages will be deleted.
157
158
158
-
### Update local package information and index
159
+
####Update local package information and index
159
160
160
161
As the package system grows, more and more packages will be added, so the list of packages in menuconfig may be **unsynchronized** with the server. This can be fixed by using `pkgs --upgrade` or `pkgs --upgrade-force` command (recommended), which not only synchronizes updates to local software packages [information and index](https://github.com/RT-Thread/packages), which are recommended for regular use. If there is a upgrade failure or merge failure, please use `pkgs --upgrade-force` command to force upgrade the local software packages index (recommended to use).
161
162
162
163
If wants to upgrade the [Env script](https://github.com/RT-Thread/env) as well, please use `pkgs --upgrade-script-force` command. This command not only can upgrade the software packages index, but also can upgrade the Env script.
163
164
164
-
## Env Tool Configuration
165
+
###Env Tool Configuration
165
166
166
167
- The new version of the Env tool includes an automatic update package and an option to automatically generate mdk/iar projects. The default is not enabled. It can be configured using `menuconfig -s/--setting` .
167
168
@@ -180,21 +181,21 @@ The three options are:
180
181
-**Send usage data for improve product**: For user number statistic.
181
182
182
183
183
-
# Use Env in Your Project
184
+
##Use Env in Your Project
184
185
185
-
## How to Modify Options in Menuconfig
186
+
###How to Modify Options in Menuconfig
186
187
187
188
If you want to add a macro definition in the configuration item of menuconfig, you can modify the `Kconfig` file under BSP. The modification method can search Kconfig syntax on the Internet for detailed documentation, or refer to the Kconfig file in RT-Thread or The Kconfig file in the BSP that supports menuconfig.
188
189
189
-
## To Add menuconfig function to New Project
190
+
###To Add menuconfig function to New Project
190
191
191
192
New project here refers to a newly developed project that has not yet generated `.config` and `rtconfig.h`. Because these two files are only created when menuconfig is first saved. The specific process is as follows:
192
193
193
194
1. Copy the kconfig file from the BSP that already supports the menuconfig function to the new project root directory.
194
195
2. Note that modifying the RTT_ROOT value in Kconfig is the directory where RT-Thread is located, otherwise RTT_ROOT may be not found.
195
196
3. Start the configuration with the menuconfig command.
196
197
197
-
## To Add menuconfig function to old Project
198
+
###To Add menuconfig function to old Project
198
199
199
200
Old project here refers to the development that has been going on for a while, and there is a modified `rtconfig.h` file in the project, but there is no project configured with menuconfig. The specific process is as follows:
200
201
@@ -205,53 +206,53 @@ Old project here refers to the development that has been going on for a while, a
205
206
5. Use the menuconfig command to configure the old project we want to modify. Menuconfig will read the `.config` file generated in the second step and generate a new `.config` file and rtconfig.h file based on the configuration parameters of the old project.
206
207
6. Check the old and new rtconfig.h files. If there are any inconsistencies, you can use the menuconfig command to adjust the configuration items.
207
208
208
-
# Notes for Using Env
209
+
##Notes for Using Env
209
210
210
211
- For the first time, Env is recommended to go to the official website to download the latest version of the Env tool. The new version of Env will have better compatibility and also support automatic update commands.
211
212
- You can use the Env built-in command `pkgs --upgrade` or `pkgs --upgrade-force` (recommended to use) to update the package list and Env's function code to minimize the problems you have fixed.
212
213
- Do not have Chinese or spaces in the routes of Env.
213
214
- Do not have Chinese or spaces in the routes where the BSP project is located.
214
215
215
-
# FAQs
216
+
##FAQs
216
217
217
-
## Q: It prompts that the git command cannot be found.
218
+
###Q: It prompts that the git command cannot be found.
218
219
219
220
'git' is not recognized as an internal or external command, possible program or batch file.
220
221
221
222
**A:** Git is not installed. You need to install git and add environment variables.
222
223
223
-
## Q: It prompts that the CMD command cannot be found.
224
+
###Q: It prompts that the CMD command cannot be found.
224
225
225
226
**A:** Right-click–>> Property—>> Advanced System Settings—>> Environment Variable, Add `C:\Windows\System32` to system environment variables.
226
227
227
-
## Q: Prompt "no module named site" when running python.
228
+
###Q: Prompt "no module named site" when running python.
228
229
229
230
**A:** Computer right button –>> Properties—>> Advanced System Settings—>> Environment Variable, in the user variable of the administrator, create a new variable named PYTHONHOME, and the variable value is: `F:\git_repositories\env\tools\Python27` (the installation route of Python in Env), do not add ";" afterwards, otherwise it will be invalid. If add PYTHONHOME can not solve theproblem, try to add PYTHONPATH in the same way.
230
231
231
-
## Q: What types of projects can I generate under Env?
232
+
###Q: What types of projects can I generate under Env?
232
233
233
234
**A:**
234
235
235
236
1. Currently, you can use the scons tool to generate mdk/iar projects under Env. There is no automatic generation of eclipse projects.
236
237
2. Generally, using gcc's toolchain, using an editor such as source insight or VS Code to edit the code and compile with `scons` command.
237
238
238
-
## Q: How can my own BSP support menuconfig?
239
+
###Q: How can my own BSP support menuconfig?
239
240
240
241
**A:** You can refer to this chapter **Use Env in Your Project**.
241
242
242
-
## Q: What is the difference between the pkgs --upgrade/--upgrade-force command and the pkgs --update command?
243
+
###Q: What is the difference between the pkgs --upgrade/--upgrade-force command and the pkgs --update command?
243
244
244
245
**A:**
245
246
246
247
1. The `pkgs --upgrade/--upgrade-force` command is used to upgrade the Env script itself and the list of packages. You cannot select a recently updated package without the latest package list.
247
248
2. The `pkgs --update` command is used to update the package itself. For example, if you selected json and mqtt packages in menuconfig, you did not download them when you exit menuconfig. You need to use the `pkgs --update` command, at which point Env will download the package you selected and add it to your project.
248
249
3. The new version of Env supports the `menuconfig -s/--setting` command. If you don't want to use the `pkgs --update` command after replacing the package, configure Env after using the `menuconfig -s/--setting` command. Select each time you use menuconfig. After the package is automatically updated.
249
250
250
-
## Q: Prompt "can't find file Kconfig" while using menuconfig.
251
+
###Q: Prompt "can't find file Kconfig" while using menuconfig.
251
252
252
253
**A:** The Kconfig file is missing from the current working BSP directory. Please refer *To Add menuconfig function to New Project* and *To Add menuconfig function to Old Project*.
0 commit comments