cmake编译stm项目提示“selected processor does not support `isb 0xF' in ARM mode”
使用cmake编译stm32f4项目时报错:
/tmp/ccPlYrhB.s: Assembler messages:
/tmp/ccPlYrhB.s:1014: Error: selected processor does not support `isb 0xF' in ARM mode
原因是cmake没有合理配置编译器,使用了系统自带的x86架构的gcc,没有使用gcc-arm-none-eabi,导致汇编器无法识别指令。
在CMakeLists.txt的set(CMAKE_PROJECT_NAME your_project_name)下面添加语句:
# Include toolchain file
include("cmake/gcc-arm-none-eabi.cmake")
即可解决。在build文件夹使用make编译项目,没有报错,问题解决。
也欢迎来我的自建博客站看看哦:lvxy.xin
本文来自博客园,作者:是流光呀,转载请注明原文链接:https://www.cnblogs.com/lvxylvxy/p/19284427

浙公网安备 33010602011771号