libiio

Ubuntu 16.04.4 LTS使用cmake编译,禁用AIO、DNS_SD。git clone https://github.com/analogdevicesinc/libiio.gitcd libiiomkdir buildcd buildcmake ../ -DWITH_AIO=OFF -DHAVE_DNS_SD=OFF-- cmake version: 3.5.1-- The C compiler identification is GNU 5.4.0-- Check.
摘要由CSDN通过智能技术生成

目录

参考资料

Ubuntu台机编译

交叉编译

libxml

libiio

CMakeLists.txt修改

编译

测试程序

iiod

iio_info

local方式

 IP方式

iio_attr

显示可用上下文

显示可用设备 

显示设备属性

 显示可用通道

显示通道属性

 IP方式显示可用设备

iio_readdev

local方式读取数据

IP方式显示读取数据

于libiio开发


参考资料

libiio

Ubuntu台机编译

Ubuntu 16.04.4 LTS系统, 使用cmake编译,禁用AIO、DNS_SD。

$ git clone https://github.com/analogdevicesinc/libiio.git
$ cd libiio
$ git log -1
commit 1e9e1647809bc0bdeab22753d7e61a22e4030d07
Author: Michael Hennerich <michael.hennerich@analog.com>
Date:   Thu Jul 22 13:37:57 2021 +0200

    bindings: python iio.py: find_device() also use label

    When multiple devices with the same name exist, label is used to
    differentiate them. Update find_device to also support labels.

    Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
$ mkdir build
$ cd build
$ cmake ../ -DWITH_AIO=OFF -DHAVE_DNS_SD=OFF
-- cmake version: 3.5.1
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAS_WPEDANTIC
-- Performing Test HAS_WPEDANTIC - Success
-- Performing Test HAS_WSHADOW
-- Performing Test HAS_WSHADOW - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for newlocale
-- Looking for newlocale - found
-- Looking for in6addr_any
-- Looking for in6addr_any - found
-- Looking for libusb-1.0 : Found
-- Looking for libusb_get_version
-- Looking for libusb_get_version - found
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Building with Network back end support
-- Performing Test WITH_NETWORK_EVENTFD
-- Performing Test WITH_NETWORK_EVENTFD - Success
-- Building without DNS-SD (ZeroConf) support
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/work/libiio/build
$ make
Scanning dependencies of target iio
[  2%] Building C object CMakeFiles/iio.dir/backend.c.o
[  4%] Building C object CMakeFiles/iio.dir/channel.c.o
[  6%] Building C object CMakeFiles/iio.dir/device.c.o
[  9%] Building C object CMakeFiles/iio.dir/context.c.o
[ 11%] Building C object CMakeFiles/iio.dir/buffer.c.o
[ 13%] Building C object CMakeFiles/iio.dir/utilities.c.o
[ 15%] Building C object CMakeFiles/iio.dir/scan.c.o
[ 18%] Building C object CMakeFiles/iio.dir/sort.c.o
[ 20%] Building C object CMakeFiles/iio.dir/usb.c.o
[ 22%] Building C object CMakeFiles/iio.dir/local.c.o
[ 25%] Building C object CMakeFiles/iio.dir/libini/libini.c.o
[ 27%] Building C object CMakeFiles/iio.dir/network.c.o
[ 29%] Building C object CMakeFiles/iio.dir/network-unix.c.o
[ 31%] Building C object CMakeFiles/iio.dir/xml.c.o
[ 34%] Building C object CMakeFiles/iio.dir/lock.c.o
[ 36%] Building C object CMakeFiles/iio.dir/iiod-client.c.o
[ 38%] Linking C shared library libiio.so
[ 38%] Built target iio
Scanning dependencies of target iio_tests_helper
[ 40%] Building C object tests/CMakeFiles/iio_tests_helper.dir/iio_common.c.o
[ 43%] Building C object tests/CMakeFiles/iio_tests_helper.dir/gen_code.c.o
[ 45%] Linking C static library libiio_tests_helper.a
[ 45%] Built target iio_tests_helper
Scanning dependencies of target iio_attr
[ 47%] Building C object tests/CMakeFiles/iio_attr.dir/iio_attr.c.o
[ 50%] Linking C executable iio_attr
[ 50%] Built target iio_attr
Scanning dependencies of target iio_genxml
[ 52%] Building C object tests/CMakeFiles/iio
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值