解决方法:Keil提示错误信息error: L6235E: More than one section matches selector - cannot all be ...
时间:2023-05-18 01:37:00
一、问题
编译 GD32F103 自建工程时,报告以下错误:
.\Objects\template.sct(7): error: L6235E: More than one section matches selector - cannot all be FIRST/LAST. Not enough information to list image symbols. Not enough information to list the image map. ".\Objects\template.axf" - 1 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:01
二、原因
因为项目中不止一个启动文件。
以下启动文件同时包含在项目中,
startup_gd32f10x_md.s
startup_gd32f10x_hd.s
startup_gd32f10x_ld.s
startup_gd32f10x_cl.s
…
应该针对不同的CPU选择不同的启动文件。
三、解决方案
-
方法1:从项目中删除不相关的启动文件,只留下一个
-
方法2:右击不相关启动文件,点击 Options for File ‘startup_gd32f10x_md.s’… 在弹出的对话框中的 Properties 页面,勾去灰化
Include in Target Build
和Always Build
两项。
? 由 Leung 写于 2022 年 4 月 2 日
? 参考:error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.