Error (continually updated) Keil5 occur when using [Keil]

table of Contents

1, common compilation errors

2, common logic errors

3, common simulation error


 

1, common compilation errors

  • error C141: `syntax error near 'extern', expected 'hdata'`

(Error C141: near the "extern" syntax error, should be "hdata")

There are many possible causes of this error, the more common and is difficult to find the time to call in the header file header file is called to write the imperfection causes the compiler to perform under a confusing error.

  • *** WARNING : UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS

*** Warning: No call segment, covering process ignored

There is a defined function is not called, very common warning

  • *** WARNING : MULTIPLE CALL TO SEGMENT

*** WARNING: Multiple calls segmentation

Usually appear simultaneously in the interrupt and calls the main function, the compiler prompt logic errors may occur.

  •  error C247: non-address/-constant initializer

You can not use a variable to the variable initial value.

  •  error: L6236E: No section matches selector - no section to be FIRST/LAST.

Error: L6236E: not match the selector's Day - not the first / last section.

No startup files 

  • Automatic memory allocation setup
*** ERROR L107: ADDRESS SPACE OVERFLOW

    SPACE:   DATA    
    SEGMENT: ?DT?SYS
    LENGTH:  0004H
*** ERROR L107: ADDRESS SPACE OVERFLOW
    SPACE:   DATA    
    SEGMENT: ?DT?_DS1302BURSTREAD?DS1302
    LENGTH:  0003H

This is the area keil at compile time you will be automatically stored in the local variables Memory Model set, once too many local variables will generate an error. This time can be set variables stored in PDATA or XDATA, but this will slow down the speed of execution to a certain extent.


 

2, common logic errors

  • In the use of the DAC to be noted that whether the variable will overflow , the output voltage are usually with a decimal point, if 8-bit precision DAC to be noted that it not take a variable type of conversion, in the calculation of recommended or double float type variable type is judged to be cast int type, output type converted to char.

TIPS: cast low security can not be maintained high.


3, common simulation error

  • Connecting to target system lost!please reset your target system and try again.

Here stamp

Published 88 original articles · won praise 39 · views 20000 +

Guess you like

Origin blog.csdn.net/weixin_43444989/article/details/89524358