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
Copy file name to clipboardExpand all lines: en/embox_quick_start_en.md
+56-34Lines changed: 56 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Clone git repository:
6
6
```
7
7
$ git clone https://github.com/embox/embox
8
8
```
9
-
Or download as an archive[https://github.com/embox/embox/releases](https://github.com/embox/embox/releases).
9
+
Or download as an archivefrom:[https://github.com/embox/embox/releases](https://github.com/embox/embox/releases)
10
10
11
11
## Work on Windows or MacOS
12
12
### Please follow the next recommendations:
@@ -17,10 +17,9 @@ Download an actual version of PowerShell:
17
17
Open PowerShell as an administrator and install WSL2 (please pay your attention to the demands on Windows version):
18
18
19
19
[How to install WSL2](https://learn.microsoft.com/en-us/windows/wsl/install-manual)
20
-
```
21
-
Before the next step upgrade WSL1 to WSL2 if you did'nt do this(the instruction is in a link above).
22
-
In other way Embox won't run on Windows.
23
-
```
20
+
21
+
**NOTE:** Before the next step upgrade WSL1 to WSL2 if you did'nt do this(the instruction is in a link above). In other way Embox won't run on Windows.
22
+
24
23
25
24
### Download Ubuntu from Microsoft Store
26
25
Check yout version of WSL the next way: insert the command below in PowerShell:
@@ -38,17 +37,17 @@ Run the commands below in command line of Ubuntu for installing necessary progra
38
37
sudo apt-get install python3
39
38
sudo apt-get install python-is-python3
40
39
```
41
-
Clone version of embox to yourself(use https or ssh):
40
+
Clone version of embox to yourself(use https or ssh):
@@ -61,8 +60,8 @@ If it's correct -- you can use the recommendations from the article(the link is
61
60
62
61
63
62
## Enviroment Settings
64
-
Minimal required packages: *make*, *gcc*, (cross-compiler for target platform. see "Cross-compiler installation").
65
-
Optional packages, which are recomended to install at once: *build-essential*, *gcc-multilib*, *curl*, *libmpc-dev*, *python*.
63
+
Minimal required packages: **make**, **gcc**, (cross-compiler for target platform. see "Cross-compiler installation").
64
+
Optional packages, which are recomended to install at once: **build-essential**, **gcc-multilib**, **curl**, **libmpc-dev**, **python**.
66
65
67
66
For Debian/Ubuntu:
68
67
```
@@ -87,7 +86,7 @@ Please note, it's required to install another packages if you already set up the
87
86
```
88
87
$ sudo apt install arm-none-eabi-gcc
89
88
```
90
-
or for Debian:
89
+
***or for Debian***:
91
90
```
92
91
$ sudo apt install gcc-arm-none-eabi
93
92
```
@@ -113,15 +112,15 @@ Or you can build cross-compiler with the script in the project's root folder:
113
112
As the result ***ARCH-elf-toolchain.tar.bz2*** archive will be created. Than you need to extract files from the archive and set up `PATH` enviroment variable.
114
113
115
114
## QEMU installation
116
-
Supported CPU architectures: x86, ARM, MIPS, Sparc, PPC, Microblaze.
115
+
Supported CPU architectures: `x86`, `ARM`, `MIPS`, `Sparc`, `PPC`, `Microblaze`.
117
116
118
117
QEMU can be installed in the following way:
119
118
```
120
119
$ sudo apt-get install qemu-system-<ARCH>
121
120
```
122
-
Where <ARCH>: i386, arm, sparc, mips, ppc or misc (for microblaze).
121
+
Where `<ARCH>`: i386, arm, sparc, mips, ppc or misc (for microblaze).
123
122
124
-
Notice: QEMU packages for all supported architectures can be installed with a single command:
123
+
QEMU packages for all supported architectures can be installed with a single command:
125
124
```
126
125
$ sudo apt-get install qemu-system
127
126
```
@@ -131,7 +130,8 @@ Set up default configuration for the desired platform:
131
130
```
132
131
$ make confload-<ARCH>/qemu
133
132
```
134
-
where <ARCH>: x86, arm, mips, ppc, sparc, microblaze.
133
+
Where `<ARCH>`: x86, arm, mips, ppc, sparc, microblaze.
134
+
135
135
Example for x86:
136
136
```
137
137
make confload-x86/qemu
@@ -140,7 +140,7 @@ Build Embox:
140
140
```
141
141
$ make
142
142
```
143
-
or for parallel building with N parallel jobs:
143
+
or for parallel building with **N** parallel jobs:
144
144
```
145
145
$ make -jN
146
146
```
@@ -161,37 +161,55 @@ Console output example:
161
161
If all unit tests passed successfully and all modules loaded, then command prompt will appear.
162
162
Now you can execute commands included in the configuration (`mods.conf`). You can start with ***help*** command which prints list of available commands.
163
163
164
-
Press ***ctrl+’A’*** and then `***x***` to exit from Qemu.
164
+
Press `ctrl + A` and then `x` to exit from QEMU.
165
165
166
166
## Preliminaries to Mybuild build system
167
-
Embox is modular and configurable. Declarative program language "Mybuild" has been developed for these features.
167
+
***Embox*** is modular and configurable. Declarative program language Mybuild has been developed for these features.
168
168
Mybuild allows to describe both single modules and whole target system.
169
169
170
-
A module is a base concept for build system. A module description contains: source files list, options which can be set for the module during configuration, and dependences list.
170
+
***A module*** is a base concept for build system.
171
+
A module description contains:
172
+
173
+
* source files list
174
+
* options, which can be set for the module during configuration
175
+
* dependences list
176
+
177
+
***The configuration*** is a particular description of the whole system.
178
+
It contains:
171
179
172
-
The configuration is a particular description of the whole system. It contains list of required modules, modules options and build rules (cross-compiler, additional compiler flags, memory map etc.).
180
+
* list of required modules
181
+
* modules options
182
+
* build rules (e. g. cross-compiler, additional compiler flags, memory map etc.)
173
183
174
184
Graph of the system will be based on the configuration and modules descriptions.
175
-
Build system, that generates different build artifacts: linker scripts, makefiles, headers.
176
-
It's not necesary to include all modules, they will be enabled using dependencies for each module included in the initial configuration list.
185
+
186
+
Build system, that generates different build artifacts: `linker scripts`, `makefiles`, `headers`.
187
+
188
+
It's not necesary to include all modules, they will be enabled, using dependencies.
177
189
178
190
Current configuration locates in ***conf/*** folder. It can be set up with:
179
191
```
180
192
$ make confload-<CONF_NAME>
181
193
```
182
-
For example, to set up demo configuration for qemu-arm you should do the following:
194
+
For example, to set up demo configuration for ***qemu-system-arm*** you should do the following:
183
195
```
184
196
$ make confload-arm/qemu
185
197
```
186
-
Use:
198
+
To get the list of all possible configurations, use:
187
199
```
188
200
$ make confload
189
201
```
190
-
to get the list of all possible configurations.
191
202
192
-
After you set up some configuration you can tune configuration due to your requirements.
193
-
You can add ***include \<PACKAGE_NAME\>\<MODULE_NAME\>*** to your ***conf/mods.conf*** file to enable additional application.
194
-
For example, add ***include embox.cmd.help*** to enable ***`help`*** command.
203
+
After you set up some configuration you can customize it to your requirements.
204
+
205
+
To enable additional application, you can insert to your ***conf/mods.conf*** file the line below:
206
+
```
207
+
include \<PACKAGE_NAME\>\<MODULE_NAME\>
208
+
```
209
+
For example, to enable ***`help`*** command type the following:
210
+
```
211
+
include embox.cmd.help
212
+
```
195
213
196
214
## "Hello world" application
197
215
Embox application is an usual Embox module with special attributes. These attributes declare your module as an executable application.
@@ -234,7 +252,8 @@ To add your own simplest application "Hello world" you can do the following:
234
252
```
235
253
$ ./scripts/qemu/auto_qemu
236
254
```
237
-
* Type ***help*** in Embox console to check if there is ***hello_world*** in commands list. Execute ***hello_world*** command and you will see:
255
+
* Type ***help*** in Embox console to check if there is ***hello_world*** in commands list.
256
+
Execute ***hello_world*** command and you will see:
238
257
```
239
258
root@embox:/#hello_world
240
259
Hello, world!
@@ -253,14 +272,16 @@ Let's look at the Mybuild file from "Hello world" example in more details:
253
272
}
254
273
```
255
274
The first line contains package name ***embox.cmd***. In Embox all modules are organized into packages.
256
-
Full module name consist of the corresponding package name appended with module name. Module name is defined in string ***module hello_world***.
275
+
Full module name consists of the corresponding package name appended with module name.
276
+
Module name is defined in string ***module hello_world***.
257
277
258
278
## Debugging
259
-
You can use the same script with *-s -S -no-kvm* flags for debugging:
279
+
You can use the same script with `-s`, `-S`, `-no-kvm` flags for debugging:
260
280
```
261
281
$ sudo ./scripts/qemu/auto_qemu -s -S -no-kvm
262
282
```
263
-
After running that QEMU waits for a connection from a gdb-client. Run gdb in the other terminal:
283
+
After running that QEMU waits for a connection from a gdb-client.
284
+
Run gdb in the other terminal:
264
285
```
265
286
$ gdb ./build/base/bin/embox
266
287
...
@@ -269,10 +290,11 @@ After running that QEMU waits for a connection from a gdb-client. Run gdb in the
269
290
```
270
291
The system starts to load.
271
292
272
-
At any moment in gdb terminal you can type <kbd>ctrl + C</kbd> and see the stack of the current thread (`backtrace`) or set breakpoints (`break <function name>`, `break <file name>:<line number>`).
293
+
At any moment in gdb terminal you can type `ctrl + C` and see the stack of the current thread (`backtrace`) or set breakpoints (`break <function name>`, `break <file name>:<line number>`).
273
294
274
295
## Connection of external repository
275
-
Embox allows to connect external repo to modules and templates. It's enough to specify root directory of repository for this purpose:
296
+
Embox allows to connect external repo to modules and templates.
297
+
It's enough to specify root directory of repository for this purpose:
276
298
```
277
299
make ext_conf EXT_PROJECT_PATH=<your projects path>
0 commit comments