keil中常见error与warning

error:

Summary
Error L104

Multiple Public Definitions
Symbol: symbol
Module: filename (module-name)
Defined: filename (module-name)

Description

symbol is defined more than once as public symbol in several modules.

Cause

You have defined the symbol in several modules. The linker lists the modules that contain the definition of the symbol.

Resolution

Change the definition of the symbol or the symbol name. If you want to refer to just one symbol, you need to use the extern attribute at sub-sequent definitions of the symbol. If you do not want that the symbol is available in different modules, use the static symbol attribute.

Summary
Error L105

Public Refers to Ignored Segment
Symbol: symbol-name
Segment: segment-name

Description

The specified public symbol is defined in the specified segment. It cannot be processed on account of an error. The public symbol is therefore ignored.

Summary
 Error L107

Address Space Overflow
Space: memory-space
Segment: segment-name

Description

The specified segment cannot be located at the specified address space. The segment is ignored.

             

                

warning:

               

Summary
Warning L16

Uncalled Segment, Ignored for Overlay Process
Segment: segment-name

Description

This warning occurs when segments, which were not used previously, are contained in a program (e.g., for test purposes). The segment specified is excluded from the overlay process in this case.

Cause

When you use function pointers and code banking, the linker needs exact information about the call tree of your program. This information is required to determine the function calls that require an entry in the INTER-BANK CALL TABLE. Without this information, the linker cannot ensure that the correct code bank is selected for a function that is indirectly called from a different code bank. Therefore, it is also essential that you supply correct call tree information for a code banking application.

Resolution

If you fix the uncalled warning, then Error 107 is often cleared as well.

There are two ways to solve this problem.

  1. Call the uncalled function from somewhere in your program.
  2. Remove or #if out the function that is not called. You can do that using #if 0 in front of and #endif after the uncalled function. For example:
    #if 0
    void uncalled_function (void)
    {
    }
    #endif
Summary
Error/Warning C245

Unknown Pragma, Line Ignored

Description

The #pragma statement is unknown. The entire pragma line is ignored.

参考网站: Cx51 User's Guide: 8051 Device Support

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值