-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathREADME
74 lines (57 loc) · 2.5 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Overview
-------------------
This main purpose of this project is to test embxx library and demonstrate its
usage on Raspberry Pi as bare metal platform.
What you need
-------------------
1. Git
2. CMake
3. Cross compiling gcc v4.7 toolchain or greater
How to compile
-------------------
1. Make a build directory and cd there:
> mkdir <embxx_on_rpi_dir>/build
> cd <embxx_on_rpi_dir>/build
2. Generate makefiles using CMake while defining CROSS_COMPILE prefix:
> cmake -DCROSS_COMPILE=/opt/arm-none-eabi-2013.05/bin/arm-none-eabi- ..
If CROSS_COMPILE prefix is not defined "arm-none-eabi-" is used and directory
containing all the toolchain utilities must be PATH environment variable.
> cmake ..
Please note that default cmake build type is similar to Debug mode but
without any debug simbols in produced binaries. To change the default
build type please use CMAKE_BUILD_TYPE definition when using cmake utility:
> cmake -DCMAKE_BUILD_TYPE=Release -DCROSS_COMPILE=/opt/arm-none-eabi-2013.05/bin/arm-none-eabi- ..
Please refer to CMake documentation for details about its build types.
It is also possible to provide a separate toolchain file instead of
specifying CROSS_COMPILE prefix.
> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/file ..
The custom toolchain file is expected to be similiar to this example:
set (CMAKE_SYSTEM_NAME "Generic")
include(CMakeForceCompiler)
cmake_force_c_compiler(arm-none-eabi-gcc)
cmake_force_cxx_compiler(arm-none-eabi-g++)
For CMake version 3.6 or newer it can look like this:
set (CMAKE_SYSTEM_NAME "Generic")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
3. Build the binaries:
> make
For the verbose make output use VERBOSE=1 environment variable:
> VERBOSE=1 make
4. The image of every compiled application will be:
<embxx_build_dir>/image/<app_name>/kernel.img
Applications
-------------------
See the README files in "src/app" directory for details of what each
application (image) does.
Git branches
-------------------
"master" - main branch, will always contain latest stable (released) version
that uses latest stable (released) version of embxx.
"develop" - current development branch that uses latest development version of
embxx.
Contact information
-------------------
Author: Alex Robenko
E-mail: [email protected]