当前位置: 首页 > news >正文

Ubuntu环境下SomeIP/CommonAPI环境搭建详细步骤

环境搭建

1.Boost安装

下载Boost源码 : https://www.boost.org/users/download/

编译安装

首先安装编译所需依赖

sudo apt-get install build-essential g++ 
sudo apt-get install installpython-dev autotools-dev 
sudo apt-get install installlibicu-dev build-essential 
sudo apt-get install libbz2-dev libboost-all-dev

进入到BOOST源码根目录

./bootstrap.sh -h

可以查看一些编译的选项,我们主要注意这三个

  --with-libraries=list     build only a particular set of libraries,describing using either a comma-separated list oflibrary names or "all"[all]--with-toolset=TOOLSET    use specific TOOLSET to build B2 and as defaultfor building Boost[automatically detected]--prefix=PREFIX           install Boost into the given PREFIX[/usr/local]

执行

./bootstrap.sh --with-libraries=all --with-toolset=gcc --prefix=/home/xxx/xxx/xxx

执行完成会在当前目录下看到一个生成的可执行文件:b2,这个可执行程序是用来编译Boost的,也有一些配置选项

./b2 --help

主要注意选择编译静/动态库这一项,一般选择是动态库

link=static|shared      Whether to build static or shared libraries

执行

./b2 link=shared

安装

sudo ./b2 install

这样Boost就安装到你的指定目录下了。

2. vsomeIP安装

下载vsomeIP源码:https://github.com/GENIVI/vsomeip.git

进入到vsomeIP源码根目录

mkdir build && cd build
cmake -DENABLE_SIGNAL_HANDLING=1 -DDIAGNOSIS_ADDRESS=0x10 -DCMAKE_INSTALL_PREFIX=/home/xxx/xxx/vsomeip -DBOOST_ROOT=/home/xxx/xxx/boost ..
make -j32
sudo make install

一些参数解释

参数作用
ENABLE_SIGNAL_HANDLING开启信号处理
DIAGNOSIS_ADDRESS指定some/ip client id的第一个字节
CMAKE_INSTALL_PREFIX指定安装位置
BOOST_ROOT指定调用Boost库的位置

前两条网上也找到如下诠释

1、vsomeip接收SIGINT/SIGTERM信号,用ctro+c可以成功退出程序。
2、指定some/ip client id的第一个字节,如果在网络上多机通信,有必要区分不同的client,这个时候这个参数很有用。

cmake时如有报错或警告

– Found Doxygen: /usr/bin/doxygen

sudo apt-get install doxygen

– Checking for module ‘libsystemd’

sudo apt-get install libsystemd-dev

asciidoc is not installed. Readme can not be built.

sudo apt-get install asciidoc

– No package ‘automotive-dlt’ found

下载dlt-daemon:https://github.com/COVESA/dlt-daemon

cd /path/to/workspace/dlt-daemon
mkdir build
cd build
cmake ..
make -j32
sudo make install
sudo ldconfig # in case you executed make install

如果不是报错,警告尝试解决不了可先忽略。install完成后即可在指定目录下找到vsomeIP库。

3. CommonAPI Core Runtime安装

下载CommonAPI Core Runtime源码:https://github.com/COVESA/capicxx-core-runtime

进入到capicxx-core-runtime源码根目录

mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/xxx/xxx ..
make -j32
make install

4. CommonAPI SomeIP Runtime安装

下载CommonAPI SomeIP Runtime源码:https://github.com/COVESA/capicxx-someip-runtime

进入到CommonAPI SomeIP Runtime源码根目录

mkdir build
cmake -DUSE_INSTALLED_COMMONAPI=ON -DCMAKE_INSTALL_PREFIX=/xxx/xxx ..
make -j32
sudo make install

5. CommonAPI Core Runtime代码生成工具

这个不建议自己编译,本人尝试编译各种稀奇古怪的问题,直接使用官方提供的release就行。

想要尝试编译的下载:https://github.com/COVESA/capicxx-core-tools

直接下载release: https://github.com/COVESA/capicxx-core-tools/releases
下这个:commonapi_core_generator.zip不要下载source的

6. CommonAPI SomeIP Runtime代码生成工具

这个也不建议编译,直接下载官方release。

想要尝试编译的下载:https://github.com/COVESA/capicxx-someip-tools

直接下载release:https://github.com/COVESA/capicxx-someip-tools/releases
下这个:commonapi_someip_generator.zip不要下载source的

至此SomeIP/CommonAPI环境搭建完毕,基础使用见下回分解。

如需联系,请加QQ:918619587

http://www.lryc.cn/news/263504.html

相关文章:

  • maven 项目导入异常问题
  • 在 VMware 虚拟机上安装黑苹果(Hackintosh):免费 macOS ISO 镜像下载及安装教程
  • 国产ToolLLM的课代表---OpenBMB机构(清华NLP)旗下ToolBench的安装部署与运行(附各种填坑说明)
  • 串口通信(5)-C#串口通信数据接收不完整解决方案
  • 大数据分析岗是干什么的?
  • hadoop运行jar遇到的一个报错
  • 长短期记忆(LSTM)神经网络-多输入分类
  • 开启创意之旅:免费、开源的噪波贴图(noise texture)生成网站——noisecreater.com详细介绍
  • Android Studio问题解决:Gradle Download 下载超时 Connect reset
  • 【Python百宝箱】云上翱翔:Python编程者的AWS奇妙之旅
  • 抖音直播间websocket礼物和弹幕消息推送可能出现重复的情况,解决办法
  • 【设计模式--行为型--访问者模式】
  • [最后一个月征稿、ACM独立出版】第三届密码学、网络安全和通信技术国际会议(CNSCT 2024)
  • android —— PopupWindow
  • mysql部署 --(docker)
  • 基于多智能体系统一致性算法的电力系统分布式经济调度策略MATLAB程序
  • Android : SensorManager 传感器入门 简单应用
  • 《点云处理》 点云去噪
  • npm login报错:Public registration is not allowed
  • OpenHarmony 启动流程优化
  • 解决腾讯云CentOS 6硬盘空间不足问题:从快照到数据迁移
  • org.slf4j日志组件实现日志功能
  • 3D小球跑酷
  • PyQt6 QInputDialog输入对话框控件
  • ASP.NET Core MVC依赖注入理解(极简个人版)
  • 基于SpringBoot+Vue实现的企业级微服务多租户多系统架构
  • 美光将于 2025 年推出 1γ DRAM,并在日本生产HBM
  • 【Docker】以service形式离线安装卸载的docker、compose服务
  • Dubbo RPC-Redis协议
  • 展开说说:Android之常用的延时执行策略