新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > keil錯誤ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

keil錯誤ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

作者: 時間:2016-11-09 來源:網(wǎng)絡 收藏
在利用Keil C51編程時,發(fā)現(xiàn)程序邏輯上沒有錯誤,但在連接時卻出現(xiàn)了錯誤,如下:

*** ERROR L107: ADDRESS SPACE OVERFLOW

本文引用地址:http://butianyuan.cn/article/201611/317804.htm

SPACE: DATA

SEGMENT: ?DT?GMNS_3V4

LENGTH: 0014H

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: RECEIVE_TIMER

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: DUAL_REC_BUF

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: LAST_SEND_TIME_COUNT

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: POW_STATUS

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: POW_STATE

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: GROUP_TEST

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: S_COUNT_P

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: R_COUNT_P

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: RING_JUDGE_STATEB1

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: RING_JUDGE_STATEB0

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAOXIN_CHECK_STATUS4

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAOXIN_CHECK_STATUS3

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAOXIN_CHECK_STATUS2

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAOXIN_CHECK_STATUS1

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAOXIN_CHECK_STATUS0

SEGMENT: ?DT?GMNS_3V4

*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

SYMBOL: YAO_XIN_COUNT

SEGMENT: ?DT?GMNS_3V4

出現(xiàn)以上錯誤的原因主要是第一個原因,第一個原因導致了它下面所有錯誤,第一個原因是:

ERROR L107: ADDRESS SPACE OVERFLOW

SPACE: DATA

SEGMENT: ?DT?GMNS_3V4

LENGTH: 0014H

說明data空間已經(jīng)不夠用,原因是你可能有好多函數(shù),而函數(shù)內部的局部變量又沒有定義其空間,這種情況下,系統(tǒng)會將變量分配到你在Otions for Target 對話框里的設置的空間。如果你在下圖所示中的 Memory Model 里設置成 Small:variables in DATA,則DATA空間很快便用完,導致data空間不夠用。解決的辦法有兩種,一是通過更改Memory Model設置,可以設置成pdata或xdata,以便有足夠大的空間,但這又帶來新的問題,程序運行速度減慢,而且code代碼也會加大,因為如果一個局部變量被存放在了xdata空間,匯編語言訪問xdata空間的代碼大小要比訪問data空間的代碼大,變量一旦很多,程序的代碼也會逐漸增大;二是根據(jù)自己的要求設置變量的空間。所以這涉及到代碼優(yōu)化的問題,遇到具體問題時,在運行速度和代碼大小之間取得適合自己的情況。



關鍵詞: keil錯誤ERRO

評論


技術專區(qū)

關閉