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
+54-34Lines changed: 54 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
```
@@ -115,7 +114,7 @@ As the result ***ARCH-elf-toolchain.tar.bz2*** archive will be created. Than you
115
114
## QEMU installation
116
115
Supported CPU architectures: x86, ARM, MIPS, Sparc, PPC, Microblaze.
117
116
118
-
QEMU can be installed in the following way:
117
+
***QEMU*** can be installed in the following way:
119
118
```
120
119
$ sudo apt-get install qemu-system-<ARCH>
121
120
```
@@ -132,23 +131,24 @@ Set up default configuration for the desired platform:
132
131
$ make confload-<ARCH>/qemu
133
132
```
134
133
where <ARCH>: x86, arm, mips, ppc, sparc, microblaze.
135
-
Example for x86:
134
+
135
+
***Example for x86:***
136
136
```
137
137
make confload-x86/qemu
138
138
```
139
-
Build Embox:
139
+
***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
```
147
147
Example of how to build with 4 parallel jobs:
148
148
```
149
149
$ make -j4
150
150
```
151
-
Now you are able to run Embox:
151
+
***Now you are able to run Embox:***
152
152
```
153
153
$ ./scripts/qemu/auto_qemu
154
154
```
@@ -161,37 +161,53 @@ 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
+
* source files list
173
+
* options, which can be set for the module during configuration
174
+
* dependences list
171
175
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.).
176
+
***The configuration*** is a particular description of the whole system.
177
+
It contains:
178
+
* list of required modules
179
+
* modules options
180
+
* build rules (e. g. cross-compiler, additional compiler flags, memory map etc.)
173
181
174
182
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.
183
+
184
+
Build system, that generates different build artifacts: `linker scripts`, `makefiles`, `headers`.
185
+
186
+
It's not necesary to include all modules, they will be enabled, using dependencies.
177
187
178
188
Current configuration locates in ***conf/*** folder. It can be set up with:
179
189
```
180
190
$ make confload-<CONF_NAME>
181
191
```
182
-
For example, to set up demo configuration for qemu-arm you should do the following:
192
+
For example, to set up demo configuration for ***qemu-system-arm*** you should do the following:
183
193
```
184
194
$ make confload-arm/qemu
185
195
```
186
-
Use:
196
+
To get the list of all possible configurations, use:
187
197
```
188
198
$ make confload
189
199
```
190
-
to get the list of all possible configurations.
191
200
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.
201
+
After you set up some configuration you can customize it to your requirements.
202
+
203
+
To enable additional application, you can insert to your ***conf/mods.conf*** file the line below:
204
+
```
205
+
include \<PACKAGE_NAME\>\<MODULE_NAME\>
206
+
```
207
+
For example, to enable ***`help`*** command type the following:
208
+
```
209
+
include embox.cmd.help
210
+
```
195
211
196
212
## "Hello world" application
197
213
Embox application is an usual Embox module with special attributes. These attributes declare your module as an executable application.
@@ -234,7 +250,8 @@ To add your own simplest application "Hello world" you can do the following:
234
250
```
235
251
$ ./scripts/qemu/auto_qemu
236
252
```
237
-
* Type ***help*** in Embox console to check if there is ***hello_world*** in commands list. Execute ***hello_world*** command and you will see:
253
+
* Type ***help*** in Embox console to check if there is ***hello_world*** in commands list.
254
+
Execute ***hello_world*** command and you will see:
238
255
```
239
256
root@embox:/#hello_world
240
257
Hello, world!
@@ -253,14 +270,16 @@ Let's look at the Mybuild file from "Hello world" example in more details:
253
270
}
254
271
```
255
272
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***.
273
+
Full module name consists of the corresponding package name appended with module name.
274
+
Module name is defined in string ***module hello_world***.
257
275
258
276
## Debugging
259
-
You can use the same script with *-s -S -no-kvm* flags for debugging:
277
+
You can use the same script with `-s`, `-S`, `-no-kvm` flags for debugging:
260
278
```
261
279
$ sudo ./scripts/qemu/auto_qemu -s -S -no-kvm
262
280
```
263
-
After running that QEMU waits for a connection from a gdb-client. Run gdb in the other terminal:
281
+
After running that QEMU waits for a connection from a gdb-client.
282
+
Run gdb in the other terminal:
264
283
```
265
284
$ gdb ./build/base/bin/embox
266
285
...
@@ -269,10 +288,11 @@ After running that QEMU waits for a connection from a gdb-client. Run gdb in the
269
288
```
270
289
The system starts to load.
271
290
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>`).
291
+
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
292
274
293
## 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:
294
+
Embox allows to connect external repo to modules and templates.
295
+
It's enough to specify root directory of repository for this purpose:
276
296
```
277
297
make ext_conf EXT_PROJECT_PATH=<your projects path>
0 commit comments