STM32
直播中

djelje

8年用户 1029经验值
擅长:光电显示
私信 关注
[问答]

MDK5编译警告如何处理?

警告信息如下:

.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_task_core.o(.conststring), unsupported relocation R_ARM_REL32 from app_task_core.o(i.App_Core_Work)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_task_proc.o(.conststring), unsupported relocation R_ARM_REL32 from app_task_proc.o(i.App_Proc_ParamesChecked)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_gui_sysset.o(.conststring), unsupported relocation R_ARM_REL32 from app_gui_sysset.o(i.App_Gui_SysSet_Menu_OnMenuEntry)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_gui_devset.o(.conststring), unsupported relocation R_ARM_REL32 from app_gui_devset.o(i.App_Gui_DevSet_Menu_OnMenuEntry)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_gui_memory.o(.conststring), unsupported relocation R_ARM_REL32 from app_gui_memory.o(i.Memory_SubMenu_Record_MenuEntry)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for app_gui_procset.o(.conststring), unsupported relocation R_ARM_REL32 from app_gui_procset.o(i.App_Gui_ProcSet_CacheLoad)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for wfs_nandfs.o(.conststring), unsupported relocation R_ARM_REL32 from wfs_nandfs.o(i.Wfs_NandFAT_PrintDir)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for proc_sl651.o(.conststring), unsupported relocation R_ARM_REL32 from proc_sl651.o(i.Sl651_SendPacketToServer)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for proc_scsw.o(.conststring), unsupported relocation R_ARM_REL32 from proc_scsw.o(i.ScswProc_DailCmdFromHost)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for proc_cqsw.o(.conststring), unsupported relocation R_ARM_REL32 from proc_cqsw.o(i.CqswProc_SendPacketToServer)
.objYLN_S106_II.axf: Warning: L6412W: Disabling merging for comm_ec20_driver.o(.conststring), unsupported relocation R_ARM_REL32 from comm_ec20_driver.o(i.EC20_WriteData)

MDK版本信息:
IDE-Version:
μVision V5.21.1.0
Copyright (C) 2016 ARM Ltd and ARM Germany GmbH. All rights reserved.

License Information:
Capes Microsoft
Microsoft
LIC=8VR63-ABEHM-SYFVA-1BBJF-T85HC-WUFJC

Tool Version Numbers:
Toolchain:        MDK-ARM Plus  Version: 5.21a
Toolchain Path:    D:MDK5ARMARMCCBin
C Compiler:         Armcc.exe        V5.06 update 3 (build 300)
Assembler:          Armasm.exe        V5.06 update 3 (build 300)
Linker/Locator:     ArmLink.exe        V5.06 update 3 (build 300)
Library Manager:    ArmAr.exe        V5.06 update 3 (build 300)
Hex Converter:      FromElf.exe        V5.06 update 3 (build 300)
CPU DLL:               SARMCM3.DLL          V5.21a
Dialog DLL:         DCM.DLL              V1.13.8.0
Target DLL:             SeggerJL2CM3.dll      V2.99.23.0
Dialog DLL:         TCM.DLL              V1.14.14.0

之前用的是MDK4,编译这个工程没有警告信息;
迁移到MDK5之后就多出来了这么一个警告信息,但是程序是可以正常运行的,就是不知道如何解决这个警告,或者是屏蔽这个警告???

回帖(1)

chumowei

2024-4-12 16:04:21
这些警告是由于MDK5编译器不支持某些特殊的重定位类型而导致的。要处理这些警告,可以尝试以下几种方法:

1. 禁用警告:在编译选项中添加"-Wno-error"参数,禁用警告并将其视为非错误。这样可以让编译通过,但需要注意警告信息可能会影响代码的正确性。

2. 修改代码:针对警告信息所指示的文件和行号,检查代码中与警告相关的部分,并尝试修改代码以避免使用不支持的重定位类型。可以尝试使用其他可接受的重定位类型代替。

3. 升级编译器:如果可能的话,尝试升级MDK编译器版本。新版本的编译器可能支持更多的重定位类型,从而避免警告。


举报

更多回帖

发帖
×
20
完善资料,
赚取积分