1 从github上下载需要的
cFE的库:[https://github.com/nasa/cFE.git](https://github.com/nasa/cFE.git)
OSAL的库:[https://github.com/nasa/osal.git](https://github.com/nasa/osal.git)
2 修改配置参数并编译
- 取消顶层目录下 setvars.sh文件中的下面这一行指令的注释.启动cFE的表服务.
export EXCLUDE_CFE_TBL=TRUE
- $CFS_MISSION即存放下载cFE库的目录,修改 $CFS_MISSION/build/cpu1/Makefile文件中的配置信息.
CFE_CORE_EXE_TYPE:=bin
CFS_APP_EXE_TYPE:=so
- 选择目标平台.修改$CFS_MISSION/build/cpux/cfe/cfe-config.mak文件.以下为选择linux平台.
OS = posix
PSP = pc-linux
BSP = pc-linux
- 给setvars.sh增加权限.source一次.
chmod a+x setvars.sh
source setvars.sh
- 编译cFE
cd $CFS_MISSION/build/cpu1/
make clean
make config
make
- 编译好的文件是$CFS_MISSION/build/cpu1/exe/core-linux.bin