libftdi下载地址
Libftdi 依赖 libusb libconfuse gettext-0.19
首先安装依赖文件
sudo apt-get install libboost-all-dev

一、 交叉编译 libusb

1. git clone https://github.com/libusb/libusb.

2. autogen.sh

报错 configure: error: udev support requested but libudev header not installed 报错 error: Libtool library used but ‘LIBTOOL’ is undefined libusb/Makefile.am:5: The usual way to define ‘LIBTOOL’ is to add ‘LT_INIT’ libusb/Makefile.am:5: to ‘configure.ac’ and run ‘aclocal’ and ‘autoconf’ again. libusb/Makefile.am:5: If ‘LT_INIT’ is in ‘configure.ac’, make sure libusb/Makefile.am:5: its definition is in acloc

3. 安装 sudo apt-get install libtool

4. 再次执行 autogen.sh

rm: invalid option – ‘l’
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm ./-libtoolT’ to remove the file ‘-libtoolT’.
Try ‘rm –help’ for more information.config.status: WARNING: Unable to substitute extended shell functions in -libtool
mv: invalid option – ‘l’
Try ‘mv –help’ for more information.
rm: invalid option – ‘l’
Try ‘rm –help’ for more information.
chmod: invalid option – ‘l’
Try ‘chmod –help’ for more information.

5. 加上 sudo 再次执行 sudo autogen.sh

6. sudo chown picohood:picohood libusb/ -R

7. 安装 sudo apt-get install libudev-dev

8. 在配置的时候加上–disable-udev,如下

./configure –build=i686-linux –host=arm-linux-gnueabihf –target=arm-linux-gnueabihf
–prefix=/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++ –disable-udev

9. Make

10. make install

–build=i686-linux 表示该软件在 x86 平台被编译
–host=arm-linux 表示该软件编译完成后在 arm 平台上运行
–prefix 后面为软件安装目录。
CC=,CXX 等于指定了交叉编译使用的 C, C++交叉编译器

二、 交叉编译 libconfuse

1. Git clone https://github.com/martinh/libconfuse.git

2. autogen.sh

3. 在配置的时候加上–disable-udev,如下

./configure –build=i686-linux –host=arm-linux-gnueabihf –target=arm-linux-gnueabihf
–prefix=/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++ –disable-udev
报错/home/picohood/gitrepo/tisdk/tools/libconfuse/support/missing: line 81: flex: command not foundWARNING: ‘flex’ is missing on your system.
You should only need it if you modified a ‘.l’ file.
You may want to install the Fast Lexical Analyzer package:
http://flex.sourceforge.net/

4. sudo apt-get install flex.

5. 再次 configure 成功

6. Make

7. Make install

–build=i686-linux 表示该软件在 x86 平台被编译
–host=arm-linux 表示该软件编译完成后在 arm 平台上运行
–prefix 后面为软件安装目录。
CC=,CXX 等于指定了交叉编译使用的 C, C++交叉编译器

三、 交叉编译 gettext-0.19

1. 下载地址 http://ftp.gnu.org/pub/gnu/gettext/

(1) sudo tar zxvf gettext-0.19.tar.gz

(2) sudo chown picohood:picohood gettext-0.19 -R

2. 在配置的时候加上–disable-udev,如下

./configure –build=i686-linux –host=arm-linux-gnueabihf –target=arm-linux-gnueabihf
–prefix=/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++ –disable-udev

3. Make

4. Make install

–build=i686-linux 表示该软件在 x86 平台被编译
–host=arm-linux 表示该软件编译完成后在 arm 平台上运行
–prefix 后面为软件安装目录。
CC=,CXX 等于指定了交叉编译使用的 C, C++交叉编译器

四、 交叉编译 libftdi

1. 安装 cmake 工具

Sudo apt-get install cmake

2. 进入 libftdi/cmake

3. cp Toolchain-mingw32.cmake Toolchain-am3358.cmake

4. 编辑里面为如下代码


下面的配置经过解决编译各种问题的最终配置, 为了节省时间可以直接写入该
配置

the name of the target operating system

SET(CMAKE_SYSTEM_NAME Linux)

which compilers to use for C and C++

SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
SET(LIBUSB_LIBRARIES
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/lib/libusb-1.0.so.0
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/librt.so)
SET(LIBUSB_INCLUDE_DIR
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/include/libusb-1.0)
SET(CMAKE_C_FLAGS -g -O2 -fPIC)
SET(CMAKE_CXX_FLAGS -g -O2 -fPIC)
SET(CMAKE_INSTALL_PREFIX
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi)
SET(CONFUSE_LIBRARY
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/lib/libconfuse.so.2)
SET(CONFUSE_INCLUDE_DIR/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/include/)
SET(LIBINTL_INCLUDE_DIR
/home/picohood/projects/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/lib)

adjust the default behaviour of the FIND_XXX() commands:

search headers and libraries in the target environment, search

programs in the host environment

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

5. 进入 libftdi 目录

6. 创建 bulid 目录 mkdir build

7. 进入 build 目录 并执行编译命令如下

cmake -DCMAKE_TOOLCHAIN_FILE=/home/picohood/gitrepo/tisdk/tools/libftdi/cmake/Toolchain-am3358.cmake ../

8. make

9. 成功, 拷贝动态库和执行文件到开发板即可

交叉编译 FT4232 eeprom 开源工具 libftdi 记录相关推荐

  1. 10个必备的机器学习开源工具

    机器学习十大开源工具 机器学习是未来.但机器会灭绝人类吗? 这应该是一个牵强附会的想法. 作为机器学习开发人员,您一定希望成功实现目标.这就是用于机器学习的开源工具的用武之地. 机器学习开源社区是活跃 ...

  2. 10款人气暴涨的PHP开源工具

    若想创建动态而又新颖的Web应用程序,PHP便是理想的选择.不用说,在Web开发世界里,PHP是最流行的语言之一.一些非常好用的PHP开源工具着实拯救了不少开发任务繁重的PHP开发人员,减轻他们的开发 ...

  3. 60款与DevOps相关的开源工具

    原文地址:https://elasticbox.com/blog/de ... ools/ 你喜欢免费的东西吗?获得开发者社区支持的自动化,开源的工具是大家梦寐以求的.这里列举了 60+ 款最棒的开源 ...

  4. MySQL数据库学习笔记(十二)----开源工具DbUtils的使用(数据库的增删改查)

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/4 ...

  5. 开源工具高效分析Java应用

    开源工具高效分析Java应用 不止一次,我们都萌发过想对运行中程序的底层状况一探究竟的念头.产生这种需求的原因可能是运行缓慢的服务.Java虚拟机(JVM)崩溃.挂起.死锁.频繁的JVM暂停.突然或持 ...

  6. 谷歌年度AI技术总结来了!Jeff Dean执笔,附赠27个开源工具和数据大礼包

    杨净 梦晨 发自 凹非寺 量子位 报道 | 公众号 QbitAI Jeff Dean亲笔盘点谷歌AI研究成果,已经成了一年一度的保留节目. 今年也不例外,还是他抽出一部分假期时间完成的. 过去一年,谷 ...

  7. 借助开源工具高效完成Java应用的运行分析

    不止一次,我们都萌发过想对运行中程序的底层状况一探究竟的念头.产生这种需求的原因可能是运行缓慢的服务.Java虚拟机(JVM)崩溃.挂起.死锁.频繁的JVM暂停.突然或持续的高CPU使用率.甚至于可怕 ...

  8. .NET开源工具类库:Masuit.Tools

    [开源框架]| 通用工具类库 这是恰童鞋骚年的第223篇原创文章 本文介绍一个我的同事[懒得勤快](人称勤快哥,我们叫他骚哥)写的一个.NET开源工具类库项目,包含一些常用的操作类,大都是静态类,加密 ...

  9. 开源java性能分析工具_Java性能监控:您应该知道的5个开源工具

    开源java性能分析工具 鲜为人知但有用:开源应用程序性能监视的状态 对于任何应用程序来说,最重要的事情之一就是性能. 我们要确保用户获得他们能获得的最佳体验,并想知道我们的应用已启动并正在运行. 这 ...

最新文章

  1. jquery的attr和prop区别之实例
  2. memcached安装、使用
  3. c 正则表达式替换html,正则表达式替换html元素属性的方法
  4. 洛谷 P2596 [ZJOI2006]书架 (splay)
  5. java 抽象类与接口区别是什么_JAVA中抽象类与接口的区别,分别在什么情况下使用它们...
  6. leetcode 1. 两数之和(map)
  7. 前端学习(2041)vue之电商管理系统电商系统之只是在发布阶段生效
  8. Bing Maps进阶系列六:使用Silverlight剪切(Clip)特性实现Bing Maps的迷你小地图
  9. java加密算法之JWT篇
  10. 神策分析 iOS SDK 代码埋点解析 | 数据采集
  11. mysql驱动加载失败怎么办_为什么mysql加载驱动会报错呢输出的结果是加载驱动失败...
  12. php求圆的周长面积,圆的周长怎么算?面积公式
  13. 结构化数据 VS 半结构化数据 VS 非结构化数据
  14. #码神心得_03# 浮点类型、char类型
  15. 雷达图人格php源码,061 实例15-霍兰德人格分析雷达图
  16. selenium python 简书_通过python+selenium3实现浏览器刷简书文章阅读量
  17. MySQL系统库之mysql
  18. 计组 | 算数移位及其移位后的空位添补规则
  19. 免费计算机实习周记word,计算机类实习周记
  20. Linux命令之远程登录服务器--ssh

热门文章

  1. 简易MP3播放器实现
  2. SpringBoot实现OA自动化办公管理系统
  3. 手机联系人头像包_苹果液态硅胶手机壳,官网同品质新颜色全型号!!
  4. 机会总是给有准备的人
  5. Jetson Nano 关机、重启命令
  6. System.Net.Sockets.SocketException: 不知道这样的主机
  7. matmul和mul的区别
  8. 非规范商品项是什么?商标注册规范项和非规范项区别?
  9. 【quote】free HRTF Databases available on-line
  10. IOT云平台 simple(0)IOT云平台简介