@@ -60,18 +60,20 @@ See https://github.com/intel/tinycbor.git.
60
60
- tinycbor version 0.6.0
61
61
62
62
#### Build bplib with cFS
63
- 3 . Create a subdirectory for building bplib. Run CMake to set up the build tree. Build bplib by running __ make __ in the build subdirectory:
63
+ 3 . Clone, init, and update cFS and all required submodules. Then clone bp and bplib to the cFS local repository.
64
64
65
- ``` sh
66
- git clone https://github.com/nasa/cFS cfs_bundle
67
- cd ./cfs_bundle
65
+ ```
66
+ cd <chosen working directory>
67
+ export CFS_HOME="$(pwd)" # Use CFS_HOME at your discretion
68
+ git clone https://github.com/nasa/cFS "${CFS_HOME}"/cfs_bundle
69
+ cd "${CFS_HOME}"/cfs_bundle
68
70
git submodule init
69
71
git submodule update
70
- git clone https://github.com/nasa/bp . /apps/bp
71
- git clone https://github.com/nasa/bplib . /libs/bplib
72
+ git clone https://github.com/nasa/bp "${CFS_HOME}" /apps/bp
73
+ git clone https://github.com/nasa/bplib "${CFS_HOME}" /libs/bplib
72
74
```
73
75
74
- 3 . Setup OSAL.
76
+ 4 . Setup OSAL.
75
77
76
78
Define the OSAL definitions for CMake.
77
79
Run CMake for OSAL.
@@ -89,22 +91,22 @@ Run Make for OSAL with the destination directory `./osal-staging`.
89
91
make DESTDIR=../osal-staging install
90
92
```
91
93
92
- 4 . Build the test runners
94
+ 5 . Build bplib and the test runners
93
95
94
- Note that the possible build folders are one of <Debug/ Release>-<OSAL/ POSIX> for the build type and operating system layer respectively.
96
+ Note that the possible build folders are one of <Debug, Release>-<OSAL, POSIX> for the build type and operating system layer respectively.
95
97
96
- ``` sh
97
- # Create the build folder based on Debug/Release and OSAL/POSIX
98
+ Setup the required environment variables for CMake, choosing between Debug or Release, and OSAL or POSIX.
99
+
100
+ ```
98
101
# MATRIX_BUILD_TYPE=[Debug|Release]
99
102
# MATRIX_OS_LAYER=[OSAL|POSIX]
100
- # BPLIB_SOURCE=<path-to-cfs> /libs/bplib
103
+ # BPLIB_SOURCE=$CFS_HOME/cfs_bundle /libs/bplib
101
104
# BPLIB_BUILD=./bplib-build-matrix-<MATRIX_BUILD_TYPE>-<MATRIX_OS_LAYER>
102
- # one of:
103
- # BPLIB_BUILD=./bplib-build-matrix-Debug-OSAL
104
- # BPLIB_BUILD=./bplib-build-matrix-Debug-POSIX
105
- # BPLIB_BUILD=./bplib-build-matrix-Release-OSAL
106
- # BPLIB_BUILD=./bplib-build-matrix-Release-POSIX
107
-
105
+ ```
106
+
107
+ Run CMake and make all to build bplib and the bplib tests.
108
+
109
+ ```
108
110
cmake \
109
111
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
110
112
-DBPLIB_OS_LAYER="${MATRIX_OS_LAYER}" \
@@ -116,10 +118,8 @@ Note that the possible build folders are one of <Debug/Release>-<OSAL/POSIX> for
116
118
make all
117
119
```
118
120
119
- 5 . Test bplib
120
-
121
121
#### Example Test
122
-
122
+ 6 . Test bplib
123
123
124
124
```
125
125
export NasaOsal_DIR=osal-staging/usr/local/lib/cmake
@@ -128,31 +128,31 @@ Note that the possible build folders are one of <Debug/Release>-<OSAL/POSIX> for
128
128
```
129
129
130
130
#### Build bplib Stand Alone
131
- 6 . Create a subdirectory for building bplib .
131
+ 1 . Clone bplib into a working directory .
132
132
133
- ``` sh
134
- git clone https://github.com/nasa/bplib ./bplib
135
133
```
134
+ cd <chosen working directory>
135
+ export BPLIB_HOME="$(pwd)" # Use BPLIB_HOME at your discretion
136
136
137
- 7 . Build the test runners
137
+ git clone https://github.com/nasa/bplib "${BPLIB_HOME}"/bplib
138
+ ```
138
139
139
- Note that the possible build folders are one of <Debug/Release>-<OSAL/POSIX> for the build type and operating system layer respectively.
140
+ 2 . Build bplib and the test runners
140
141
141
- ``` sh
142
- # Create the build folder based on Debug/Release and OSAL/POSIX
142
+ Note that the possible build folders are one of <Debug,Release>-POSIX for the build type and operating system layer respectively.
143
+
144
+ Setup the required environment variables for CMake, choosing between Debug or Release, and POSIX.
145
+
146
+ ```
143
147
# MATRIX_BUILD_TYPE=[Debug|Release]
144
- # MATRIX_OS_LAYER=[OSAL|POSIX]
145
- # BPLIB_SOURCE=<path-to-cfs>/libs/bplib
146
- # BPLIB_BUILD=./bplib-build-matrix-<MATRIX_BUILD_TYPE>-<MATRIX_OS_LAYER>
147
- # one of:
148
- # BPLIB_BUILD=./bplib-build-matrix-Debug-OSAL
149
- # BPLIB_BUILD=./bplib-build-matrix-Debug-POSIX
150
- # BPLIB_BUILD=./bplib-build-matrix-Release-OSAL
151
- # BPLIB_BUILD=./bplib-build-matrix-Release-POSIX
152
-
153
- # Run cmake from the current directory with the CMake folder
154
- # indicated by -S "$BPLIB_SOURCE}".
148
+ # MATRIX_OS_LAYER=POSIX
149
+ # BPLIB_SOURCE=$CFS_HOME/cfs_bundle/libs/bplib
150
+ # BPLIB_BUILD=./bplib-build-matrix-<MATRIX_BUILD_TYPE>-POSIX
151
+ ```
155
152
153
+ Run CMake and make all to build bplib and the bplib tests.
154
+
155
+ ```
156
156
cmake \
157
157
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
158
158
-DBPLIB_OS_LAYER="${MATRIX_OS_LAYER}" \
@@ -164,9 +164,9 @@ Note that the possible build folders are one of <Debug/Release>-<OSAL/POSIX> for
164
164
make all
165
165
```
166
166
167
- 8 . Test bplib stand alone
167
+ 3 . Test bplib stand alone
168
168
169
- The example program ` bpcat ` is available in the bplib stand alone build
169
+ The example program ` bpcat ` referenced below is available in the bplib stand alone build.
170
170
171
171
```
172
172
$ ./bplib-build-matrix-Debug-POSIX/app/bpcat --help
0 commit comments