交叉编译opencv以移植到TI DM6446

发布于 2024-12-27 08:54:42 字数 604 浏览 2 评论 0原文

我已经在 GCC 上设置了目标文件系统

/home/myself/filesys/bin..etc//


编译:

host $ arm_v5t_le-gcc hello.c -o hello

运行:

target $ cd /opt/hello
target $./hello

我已经在主机ubuntu机器上安装了opencv2.3,现在我想将opencv移植到DM6446 所以我按照

  1. uncompress opencv2.3 tarball
  2. sudo cmake OpenCV-2.3.1
  3. sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le-

但是当我运行bin 中的示例测试,它在专为 ARM 制作的 x86 机器上运行 我认为我没有遵循正确的程序来制作 opencv。

我需要做什么才能为 ARM 架构制作 opencv, 交叉编译的步骤是什么?

I have set up target fs on

/home/myself/filesys/bin..etc//

GCC
compile:

host $ arm_v5t_le-gcc hello.c -o hello

run:

target $ cd /opt/hello
target $./hello

I have installed opencv2.3 on host ubuntu machine now I want opencv to be ported to DM6446
so i follow

  1. uncompress opencv2.3 tarball
  2. sudo cmake OpenCV-2.3.1
  3. sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le-

but when I run the sample test from bin it runs on x86 machine which was made for ARM
I think I am not following the correct procedure to make opencv.

Is there anything I have to do to make opencv for ARM architecture,
what are the steps to follow in cross compiling?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心凉怎暖 2025-01-03 08:54:42

您执行的第二个命令应该提供有关您是否正在交叉编译的线索。如果您仔细观察,就会发现它是为 i686 而不是为 ARM 平台构建的。

本博客讨论如何使用 cmake 进行交叉编译。
cmake 使用与标准 make 不同的环境变量(因此不要使用 ARCH 和 CROSS-COMPILE)。

The 2nd command you executed should provide a clue as to whether you are cross-compiling or not. If you look closely it would have shown that it was building for the i686 and not for the ARM platform.

This blog discusses how to Cross Compile using cmake.
cmake uses different environment variables from standard make (so don't use ARCH, and CROSS-COMPILE).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文