KeilC51警告疑惑:BL51: WARNING 15 (MULTIPLE CALL TO SEGMENT)

2020-01-18 18:41发布

本帖最后由 Alimy 于 2013-2-22 13:02 编辑

根据官方文档,
http://www.keil.com/support/docs/805.htm

里面提供的第二种方法,

Method 2
If there is physical memory used by the function, you should use the linker OVERLAY directive to remove the function from overlay analysis. For example:

OVERLAY (?PR?_WRITE_GMVLX1_REG?D_GMVLX1 ! *)

This prevents memory used by this function from being overlaid. If this function calls other functions that are also used elsewhere in your program, you may need to exclude those functions from overlay analysis as well. This overlay command makes the linker happy and removes the Warning 15 for this function.

The function is not reentrant. However, it may be called from multiple threads without corrupting other function memory. Nonetheless, you must ensure that the function is not called simultaneously by multiple threads.


利用连接器的 OVERLAY指令可以避免这个函数使用的内存被覆盖。。


我的警告信息是:

*** WARNING L15: MULTIPLE CALL TO SEGMENT
    SEGMENT: ?PR?USB_TRANSFERKEYSHIFTTABLE?MP0100X_USB
    CALLER1: ?PR?USB_IRQHANDLER?MP0100X_USB
    CALLER2: ?C_C51STARTUP

keil版本号是:

IDE-Version:
μVision V4.60.0.0
Copyright (C) 2012 ARM Ltd and ARM Germany GmbH. All rights reserved.

Tool Version Numbers:
Toolchain:        PK51 Prof. Developers Kit  Version: 9.50a
Toolchain Path:    d:WorkProgramKeilC51BIN
C Compiler:         C51.Exe       V9.50a
Assembler:          A51.Exe       V8.02b
Linker/Locator:     BL51.Exe       V6.22
Librarian:             LIB51.Exe       V4.29
Hex Converter:      OH51.Exe       V2.6
CPU DLL:               S8051.DLL       V3.84.0.1
Dialog DLL:         DP51.DLL       V2.62.0.1



这个 OVERLAY指令到底如何使用(在IDE的什么地方用,如何用),才能去掉这个警告。
希望各位前辈不吝赐教,小弟感激不尽!
===========================================================

问题解决:
感谢 @flor   @zpxa001  @NemoGu 的帮助!!收获匪浅!


再编辑原因: 结贴!

0条回答

一周热门 更多>