I have a C project, which supports many platforms. Its generator has Borland Makefiles, NMake Makefiles, MSVC 6, 7, 8, 9, 11, Eclipse CDT4 ‐ Unix Makefiles etc. I have generated MSVC 9 solution with cmake on Windows 7. It is OK.
Now, I would like to generate ARM Cortex A8 project on TI Sitara SDK, of the above C project. The TI Sitara SDK is installed on Ubuntu 14.04 OS host computer. There is a cross-compiling tool chain: Linaro on Ubuntu PC.
From the original C project document, it looks like below selection is appropriate for Sitara SDK because it uses Eclipse (but it has 8.1.1 on its help window, higher than CDT4)
Eclipse CDT4 ‐ Unix Makefiles
= Generates Eclipse CDT 4.0 project files.
I have set compiler path:
export CMAKE_C_COMPILER=/home/u64rj/ti-processor-sdk-linux-am335x-evm-01.00.00.03/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
export CMAKE_ECLIPSE_VERSION=4.2
When I run cmake, there are still such errors:
u64rj@u64rj-MS-7696:~/u64rj-Fixed/sdk-2-src$ cmake -G "Eclipse CDT4 - Unix Makefiles" -DBUILD=LINUX-ARMv7a -DCFG=Debug -DMATH=I32
-- CMAKE SCRIPTS VERSION 1.1.1.0
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home/u64rj-Fixed/sdk-2-src/CMakeFiles/2.8.12.2/CompilerIdC/CMakeCCompilerId.c
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home/u64rj-Fixed/sdk-2-src/CMakeFiles/2.8.12.2/CompilerIdC/CMakeCCompilerId.c
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home/u64rj-Fixed/sdk-2-src/CMakeFiles/2.8.12.2/CompilerIdC/CMakeCCompilerId.c
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
-- The C compiler identification is unknown
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home/u64rj-Fixed/sdk-2-src/CMakeFiles/2.8.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:90 (file):
file Internal CMake error when trying to open file:
/home/u64rj-Fixed/sdk-2-src/CMakeFiles/2.8.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
for writing.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:100 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
/usr/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
/usr/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127 (CMAKE_DETERMINE_COMPILER_ID)
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
-- The CXX compiler identification is unknown
-- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Check for working C compiler: /home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc
CMake Error: your C compiler: "/home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: /home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler
"/home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc"
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
common-build/cmake/sdk-project-include.cmake:1189 (project)
CMakeLists.txt:4 (SDK_PROJECT)
CMake Error: your C compiler: "/home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "/home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-g++" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
See also "/home/u64rj-Fixed/sdk-2-src/CMakeFiles/CMakeOutput.log".
See also "/home/u64rj-Fixed/sdk-2-src/CMakeFiles/CMakeError.log".
u64rj@u64rj-MS-7696:~/u64rj-Fixed/sdk-2-src$
ARMv7a is the architecture in the build of chip TI Sitara AM3358.
I don't know why it searches cross-compiler at the C project path: CMake Error: your C compiler: "/home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name. CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Check for working C compiler: /home/u64rj-Fixed/sdk-2-src/arm-linux-gnueabihf-gcc -- broken
even though the cross-compiler of the tool chain is given by export CMAKE_C_COMPILER=/home/u64rj/ti-processor-sdk-linux-am335x-evm-01.00.00.03/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
Thanks,