linux环境下单独编译cFE

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 修改配置参数并编译

  1. 取消顶层目录下 setvars.sh文件中的下面这一行指令的注释.启动cFE的表服务.
export EXCLUDE_CFE_TBL=TRUE 
  1. $CFS_MISSION即存放下载cFE库的目录,修改 $CFS_MISSION/build/cpu1/Makefile文件中的配置信息.
#bin for linux; "o" for vxWorks
CFE_CORE_EXE_TYPE:=bin
#so for linux ; "o" for vxWorks
CFS_APP_EXE_TYPE:=so
  1. 选择目标平台.修改$CFS_MISSION/build/cpux/cfe/cfe-config.mak文件.以下为选择linux平台.
OS = posix
PSP = pc-linux
BSP = pc-linux
  1. 给setvars.sh增加权限.source一次.
chmod a+x setvars.sh
source setvars.sh
  1. 编译cFE
cd $CFS_MISSION/build/cpu1/
make clean
make config
make
  1. 编译好的文件是$CFS_MISSION/build/cpu1/exe/core-linux.bin

猜你喜欢

转载自blog.csdn.net/u013894391/article/details/89881330