clion 开发stm32 报错

吃草的哈士奇 2020-06-17 01:23:16
错误信息:
[ 4%] Linking C executable Jcy_Clion.elf
c:/progra~2/gnuarm~1/92020-~1/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file W:/Study/C_Language/stm32/JCY_CLION/Jcy_Clion/: Invalid argument
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[3]: *** [CMakeFiles\Jcy_Clion.elf.dir\build.make:390: Jcy_Clion.elf] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:75: CMakeFiles/Jcy_Clion.elf.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/Jcy_Clion.elf.dir/rule] Error 2
...全文
18789 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
江瀚林 2021-01-14
  • 打赏
  • 举报
回复
感谢楼主,成功了,配置一天了,网上炸了好多的方法,终于解决了,配置得我都快哭了
吃草的哈士奇 2020-11-27
  • 打赏
  • 举报
回复
引用 6 楼 慕小白か 的回复:
哎,找到原因了。不是编译链的问题,是STM32CUBE设置的问题引起。 这个地方设置成这个编译就不会报错了!
可以
  • 打赏
  • 举报
回复
哎,找到原因了。不是编译链的问题,是STM32CUBE设置的问题引起。
这个地方设置成这个编译就不会报错了!
吃草的哈士奇 2020-11-25
  • 打赏
  • 举报
回复
引用 4 楼 慕小白か的回复:
怀疑是arm-none-eabi-gcc的问题,打算换个版本低一点的试一下。好像评论区里面的交叉编译工具链版本都是比较高的。
不行直接上stm32自己的开发工具吧
  • 打赏
  • 举报
回复
怀疑是arm-none-eabi-gcc的问题,打算换个版本低一点的试一下。好像评论区里面的交叉编译工具链版本都是比较高的。
  • 打赏
  • 举报
回复
我在MAC下用clion的时候也遇到了这个提示。找不到解决办法。 ====================[ 构建 | fmq.elf | Debug ]==================================== /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/wq/Desktop/fmq/fmq/cmake-build-debug --target fmq.elf -- -j 3 [ 4%] Linking C executable fmq.elf /usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: read in flex scanner failed collect2: error: ld returned 1 exit status make[3]: *** [fmq.elf] Error 1 make[2]: *** [CMakeFiles/fmq.elf.dir/all] Error 2 make[1]: *** [CMakeFiles/fmq.elf.dir/rule] Error 2 make: *** [fmq.elf] Error 2
吃草的哈士奇 2020-11-14
  • 打赏
  • 举报
回复
没有解决如果你开虚拟机,在Linux下使用clion开发是可行的
Wade_Gao 2020-11-13
  • 打赏
  • 举报
回复
引用 楼主 奋发的小草 的回复:
错误信息: [ 4%] Linking C executable Jcy_Clion.elf c:/progra~2/gnuarm~1/92020-~1/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file W:/Study/C_Language/stm32/JCY_CLION/Jcy_Clion/: Invalid argument collect2.exe: error: ld returned 1 exit status mingw32-make.exe[3]: *** [CMakeFiles\Jcy_Clion.elf.dir\build.make:390: Jcy_Clion.elf] Error 1 mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:75: CMakeFiles/Jcy_Clion.elf.dir/all] Error 2 mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/Jcy_Clion.elf.dir/rule] Error 2
请问楼主解决了吗? [ 4%] Linking C executable STM32CLionTest.elf /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: read in flex scanner failed collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/STM32CLionTest.elf.dir/build.make:411: STM32CLionTest.elf] Error 1 make[2]: *** [CMakeFiles/Makefile2:96: CMakeFiles/STM32CLionTest.elf.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:103: CMakeFiles/STM32CLionTest.elf.dir/rule] Error 2 make: *** [Makefile:138: STM32CLionTest.elf] Error 2

27,521

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 单片机/工控
社区管理员
  • 单片机/工控社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧