新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > keil錯(cuò)誤ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

keil錯(cuò)誤ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

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

*** ERROR L107: ADDRESS SPACE OVERFLOW

本文引用地址:http://m.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)以上錯(cuò)誤的原因主要是第一個(gè)原因,第一個(gè)原因?qū)е铝怂旅嫠绣e(cuò)誤,第一個(gè)原因是:

ERROR L107: ADDRESS SPACE OVERFLOW

SPACE: DATA

SEGMENT: ?DT?GMNS_3V4

LENGTH: 0014H

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



關(guān)鍵詞: keil錯(cuò)誤ERRO

評(píng)論


技術(shù)專(zhuān)區(qū)

關(guān)閉