IAR iccarm Cmake

时间:2017-03-30 13:55:09

标签: cmake iar cortex-m

我在从IAR IDE迁移到Cmake / IAR编译器for arm时遇到了一些麻烦:

根据我的理解,使用正确的CMakeList.txt,我尝试:

/c/CMake/bin/cmake.exe -G"MSYS Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:\CMake\bin\Modules\Compiler\iar.cmake" -DCMAKE_C_COMPILER="C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe" -DCMAKE_ASM_COMPILER="C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe" ..

我明白了:

-- The C compiler identification is IAR
-- The ASM compiler identification is IAR
-- Found assembler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe
-- Check for working C compiler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe
CMake Error at C:/CMake/bin/Modules/Compiler/IAR.cmake:41 (message):
  The IAR compiler for this architecture is not yet supported by CMake.
  Please go to https://gitlab.kitware.com/cmake/cmake/issues and enter a
  feature request there.
Call Stack (most recent call first):
  C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/3.7.2/CMakeSystem.cmake:6 (include)
  C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeOutput.log".
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeError.log".

这听起来很奇怪,因为如果我读IAR.cmake,这个致命错误上升的情况是编译器与“arm”不匹配时的情况。 所以我使用CMAKE_C_COMPILER参数放置了一个消息输出,我得到:

-- CMAKE_C_COMPILER={C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe}
-- The C compiler identification is IAR
-- The ASM compiler identification is IAR
-- Found assembler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe
-- Check for working C compiler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe
CMake Error at C:/CMake/bin/Modules/Compiler/IAR.cmake:41 (message):
  The IAR compiler for this architecture is not yet supported by CMake.
  Please go to https://gitlab.kitware.com/cmake/cmake/issues and enter a
  feature request there.
Call Stack (most recent call first):
  C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/3.7.2/CMakeSystem.cmake:6 (include)
  C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeOutput.log".
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeError.log".

所以我得到了CMAKE_C_COMPILER的跟踪,它与我输入的值匹配得很好,但MATCH告诉它与“arm”不匹配......

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我得到了Cmake问题跟踪器的一些支持: 我的误解,这是因为我作为arg提供的文件不是工具链文件