• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 使用18f8722編譯時出現Error: can not fit the section
#6
高級會員
高級會員


查看用戶資訊
太感謝了!! 我馬上來試試看!! Thanks!!!

發表於: 2009/8/29 21:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用18f8722編譯時出現Error: can not fit the section
#5
中級會員
中級會員


查看用戶資訊
我之前也有遇到過,你要不要在宣告變數的前面加static

如:

static unsigned char abc[128];

試試看吧

發表於: 2009/8/28 16:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用18f8722編譯時出現Error: can not fit the section
#4
版主
版主


查看用戶資訊
程式下載用MPLAB IDE 跑一下。問題已找出,是 RAM 的規劃。請修改 lkr 檔如下所示:
ACCESSBANK NAME=accessram  START=0x0            END=0x5F
[color=ff0000DATABANK   NAME=gpr0       START=0x60           END=0x5FF [/color]
//DATABANK   NAME=gpr1       START=0x100          END=0x1FF
//DATABANK   NAME=gpr2       START=0x200          END=0x2FF
//DATABANK   NAME=gpr3       START=0x300          END=0x3FF
//DATABANK   NAME=gpr4       START=0x400          END=0x4FF
//DATABANK   NAME=gpr5       START=0x500          END=0x5FF
DATABANK   NAME=gpr6       START=0x600          END=0x6FF

發表於: 2009/8/28 16:07
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用18f8722編譯時出現Error: can not fit the section
#3
高級會員
高級會員


查看用戶資訊
你好:

我有爬過文和在網路上搜尋相關的資料,
也有試過改變ram的空間, 但是後面的length都不會變少,可不可以麻煩你幫我編譯看看,拜託拜託,我還蠻急的!! 謝謝!!

Attach file:


Link only for registered users

發表於: 2009/8/28 8:07
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 使用18f8722編譯時出現Error: can not fit the section
#2
版主
版主


查看用戶資訊
idata 是屬於 RAM 的部份,該節區超過 0x100 單一BANK 的最大範圍,要解決此問題須將相連的RAM BANK 何擯使用,可以參考一下 W401 第四章後面的Large RAM Array 的使用方式。
之前也有很多網友也爬文過,找一下就會有的。

發表於: 2009/8/27 13:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


使用18f8722編譯時出現Error: can not fit the section
#1
高級會員
高級會員


查看用戶資訊
各位前輩:

小弟使用18f8722和128x64 lcd, 編譯時遇到一個問題:
Error - section '.idata_TensMeter.o' can not fit the section. Section '.idata_TensMeter.o' length=0x0000011d
Errors : 1

小弟在程式內用了很多:
const rom unsigned char Font_Calibrate[] = {42,2,
0x00,0x00,0x00,0x04,0x05,0x3F,0x05,0x08,0x09,0x0E...
這些東西來放一些字或圖型.

另外也用了:
void (*Set_Proc[])(void) = {
Set_Pr00,
Set_Pr01,
Set_Pr02...

很多以上這種寫法..

我本來以為是RAM用太多, 所以刪一些掉後, 但是後面的length沒有變少, 所以應該是 const rom用太多造成的.
我刪了一些 const rom 後, length 有變少.

請問我要如何增加 const rom 的空間呢? (我的資料量應該沒有用超過rom size)

(我查了C compiler getting started, 裡面有講到, 但是裡面講的是ram, 而不是const rom的關係)


麻煩各位前輩解答, 謝謝

發表於: 2009/8/26 23:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------