如何为VxWorks创建CMake交叉编译工具链? [英] How to create CMake cross-compiling toolchain for VxWorks?

查看:220
本文介绍了如何为VxWorks创建CMake交叉编译工具链?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过CMake生成vxworks 6.x生成文件和工作区,并且在CMake中不支持VxWroks.如何为平台和正确的工具链创建相关的生成器?

I want to generate vxworks 6.x makefiles and workspace via CMake, and there is no support for VxWroks in CMake. How do I create a relevant generator for my platform anf the correct toolchain?

我是CMake的新手.我设法创建了一些针对Windows VS 2015和Ubuntu生成的测试项目.

I'm new to CMake. I managed to create some test project that generate for windows VS 2015 and Ubuntu.

我尝试使用GNU和DIAB编译器为VxWorks 6.x创建一个,但是CMake不支持它.

I tried to create one for VxWorks 6.x with GNU and DIAB compiler, but there is no support for it in CMake.

我了解了一些称为工具链,交叉编译和平台文件(.cmake)的信息,但我不知道该如何编写以及将其放置在何处.

I read about something called toolchain, cross-compiling and platform files (.cmake) but I don't understand how to write it and where to put it.

我在Internet上看到了许多示例,但不知道我是否需要使用新的平台文件来重建CMake,还是仅通过工具链或从CMakeLists引用它们.

I saw many examples in the internet but didn't understand if I need to rebuild the CMake with the new platform files or just reference to them form the toolchain or from CMakeLists.

我正在使用CMake 3.14的gui版本.

I'm using the gui version of CMake 3.14.

我将生成器设置为:Eclipse CDT4-Unix Makefiles.

I setting the generator as: Eclipse CDT4 - Unix Makefiles.

当我选择交叉编译的选项并提供名称VxWorks,版本,c ++编译器(gnu/4.1.2-vxworks-6.6/x86-win32/bin/c ++ ppc.exe)时,它写道编译器是未知的,我需要创建Platform/VxWroks.它无法构建简单的测试程序.

When I choosing the option of cross-compiling and provide name VxWorks, version, c++ compiler (gnu/4.1.2-vxworks-6.6/x86-win32/bin/c++ppc.exe), it write that the compiler is unknown and that I need to create Platform/VxWroks. It cannot build a simple test program.

我看到一些成功创建所有必需文件的人的帖子:(交叉编译)平台文件是否需要包含保护?

I saw some post of someone who succeeded to create all required files : Do (Cross-compile) platform files require an include guard?

但是我无法下载一些示例来对其进行测试以及如何进行操作的教程.

But I couldn't download some examples to test it and a tutorial of how to do it.

我希望能够使用CMake for VxWorks 6.x生成一个生成器来压缩库和可执行文件(.vxe),但不知道该怎么做.

I would like to be able to cgreate a generator with CMake for VxWorks 6.x to cimpile libraries and exacutable (.vxe) but don't know what to do.

推荐答案

在VxWorks 6中未很好地支持CMake,但在VxWorks 7中的Workbench/Eclipse GUI环境中支持CMake.这两个版本都不支持命令行cmake,例如."cmake."

CMake is not well supported in VxWorks 6, but CMake is supported from the Workbench/Eclipse GUI environment in VxWorks 7. Neither version supports command line cmake, e.g. "cmake ."

这篇关于如何为VxWorks创建CMake交叉编译工具链?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆