3
votes

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?

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

I tried to create one for VxWorks 6.x with GNU and DIAB compiler, but there is no support for it in 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.

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.

I'm using the gui version of CMake 3.14.

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

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.

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.

1
Using toolchain in CMake doesn't require CMake rebuilding. As you have read examples about toolchain, you may start to write it: set compiler, sysroot, flags and so on. Then try to build you example with toolchain and check actual options, which CMake (that is, Makefile generated by CMake) passes to the compiler and linker. If you got error while using you toolchain and cannot resolve it, ask specifically about that error.Tsyvarev
The toolchain is not require recompilation of CMake, but what about the Platform/VxWorks that it ask me to create?Shtirlic81

1 Answers

0
votes

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 ."