51编译通不过,求原因

2019-07-15 16:04发布

  1. compiling caiping.c...
  2. linking...
  3. *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
  4.     SEGMENT: ?PR?_H_LINE?CAIPING
  5. *** ERROR L107: ADDRESS SPACE OVERFLOW
  6.     SPACE:   DATA   
  7.     SEGMENT: _DATA_GROUP_
  8.     LENGTH:  0034H
  9. Program Size: data=127.4 xdata=0 code=6507
  10. Target not created
复制代码
我选的是AT89C52,按理来说128B的RAM是够得啊,为什么编译不了。直到我把其中一个数组的长度从9改为5,变成如下才能通过编译:
  1. Build target 'Target 1'
  2. compiling caiping.c...
  3. linking...
  4. *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
  5.     SEGMENT: ?PR?_H_LINE?CAIPING
  6. Program Size: data=111.4 xdata=0 code=6491
  7. creating hex file from "caiping"...
  8. "caiping" - 0 Error(s), 1 Warning(s).
复制代码
数组改为长度6也是不行的:
  1. Build target 'Target 1'
  2. compiling caiping.c...
  3. linking...
  4. *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
  5.     SEGMENT: ?PR?_H_LINE?CAIPING
  6. *** ERROR L107: ADDRESS SPACE OVERFLOW
  7.     SPACE:   DATA   
  8.     SEGMENT: ?DT?CAIPING
  9.     LENGTH:  002CH
  10. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  11.     SYMBOL:  COUNT_TIME0
  12.     SEGMENT: ?DT?CAIPING
  13. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  14.     SYMBOL:  SNAKE_W
  15.     SEGMENT: ?DT?CAIPING
  16. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  17.     SYMBOL:  PY
  18.     SEGMENT: ?DT?CAIPING
  19. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  20.     SYMBOL:  PX
  21.     SEGMENT: ?DT?CAIPING
  22. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  23.     SYMBOL:  I
  24.     SEGMENT: ?DT?CAIPING
  25. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  26.     SYMBOL:  PX_BUF
  27.     SEGMENT: ?DT?CAIPING
  28. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  29.     SYMBOL:  SNAKE_L
  30.     SEGMENT: ?DT?CAIPING
  31. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  32.     SYMBOL:  KEYNUM2
  33.     SEGMENT: ?DT?CAIPING
  34. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  35.     SYMBOL:  NRAND2
  36.     SEGMENT: ?DT?CAIPING
  37. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  38.     SYMBOL:  NRAND1
  39.     SEGMENT: ?DT?CAIPING
  40. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  41.     SYMBOL:  SCORE
  42.     SEGMENT: ?DT?CAIPING
  43. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  44.     SYMBOL:  KEYNUM
  45.     SEGMENT: ?DT?CAIPING
  46. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  47.     SYMBOL:  STAGE
  48.     SEGMENT: ?DT?CAIPING
  49. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  50.     SYMBOL:  SHIWU_Y
  51.     SEGMENT: ?DT?CAIPING
  52. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  53.     SYMBOL:  SHIWU_X
  54.     SEGMENT: ?DT?CAIPING
  55. *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT
  56.     SYMBOL:  PY_BUF
  57.     SEGMENT: ?DT?CAIPING
  58. Program Size: data=115.4 xdata=0 code=6495
  59. Target not created
复制代码
求教原因

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。