• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: Link Error 是否是超過容量所造成,因為無法編譯成功,請求協助?
#5
版主
版主


查看用戶資訊
在const所宣告的資料會佔用一個 Instruction word 的 b0~b16 , 最高的 MSB b16~b23 是沒有用到的。所以設 16KB 的 ROM Data 會佔掉 24KB 的 Flash,這是對的。
沒見過超過 32KB 的data所以沒遇到這個問題,會請美國澄清的。不過為什麼要移到外部的 EEPROM 呢? 就算一個 Table 有 32Kb 的限制,那用兩個、三個 Table 應該是可以的,再說使用 Table Read 指令就沒有 PSV 32KB 的限制。

發表於: 2007/11/5 13:45
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: Link Error 是否是超過容量所造成,因為無法編譯成功,請求協助?
#4
高級會員
高級會員


查看用戶資訊
這的確很奇怪,你還得多花錢去買一顆24LCxxx
EEPROM去存CONST DATA。不太合成本,基本上MCU能包就盡量全包。

發表於: 2007/11/1 10:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: Link Error 是否是超過容量所造成,因為無法編譯成功,請求協助?
#3
新會員
新會員


查看用戶資訊
這次看到公告才想到要告知

不好意思上個月
經過多次的測試
發現 PIC24F 系列的 const 資料
(PIC24H PIC30F PIC33F 應該也會有此問題)
容量如果超過 32KB Flash ROM 容量
(實際資料量僅原來 Flash ROM 容量的 3 分之 2 即 21.x KB)
就會發生 Link Error 的情況

就算有沒有關閉 PSV 都ㄧ樣
且亦有關閉中斷中的 auto psv 功能
而且 const 的資料量越大
實際浪費的資料空間就越多
比方我 const 的資料量約 16KB
但實際佔 Flash ROM 的空間卻是 24KB
如果我的資料量超過 22KB
實際佔 Flash ROM 的空間超過 32KB
就會出現 Link Error 的情形



因為我碰 Microchip 的 MCU 時間也不是很長

所以不知道是否是我哪裡設定錯誤所造成的
若有錯誤煩請告知
在下才疏學淺一時之間也想不到什麼更好的方法

只好將 const 的資料大量的移往外部的 24LCxxx
將 PIC24FJ128GA008 內 const 的資料維持在 32KB 以下
才 Link 成功\r

以上方式僅供參考


如果是我哪些設定沒設定好所造成的
煩請告知
以糾正我的錯誤



發表於: 2007/11/1 9:50
《佛說人有二十難》
貧窮布施難 豪貴學道難 棄命必死難 得睹佛經難
生值佛世難 忍色忍欲難 見好不求難 被辱不瞋難
有勢不臨難 觸事無心難 廣學博究難 除滅我慢難
不輕未學難 心行平等難
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: Link Error 是否是超過容量所造成,因為無法編譯成功,請求協助?
#2
新會員
新會員


查看用戶資訊
不好意思
忘記提供相關晶片資訊
所使用的晶片是PIC24FJ128GA008

多有打擾,煩請見諒

發表於: 2007/9/21 15:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Link Error 是否是超過容量所造成,因為無法編譯成功,請求協助?
#1
新會員
新會員


查看用戶資訊
Program Memory Usage

section address length (PC units) length (bytes) (dec)
------- ------- ----------------- --------------------
.reset 0 0x4 0x6 (6)
.ivt 0x4 0xfc 0x17a (378)
.aivt 0x104 0xfc 0x17a (378)
.text 0x200 0xd852 0x1447b (83067)
.const 0xda52 0x5570 0x8028 (32808)
.dinit 0x12fc2 0xc8 0x12c (300)
.init 0x1308a 0x80 0xc0 (192)
.isr 0x1310a 0x2 0x3 (3)
__CONFIG2 0x157fc 0x2 0x3 (3)
__CONFIG1 0x157fe 0x2 0x3 (3)

Total program memory used (bytes): 0x1c992 (117138) 88%


Data Memory Usage

section address alignment gaps total length (dec)
------- ------- -------------- -------------------
.nbss 0x800 0 0x2ec (748)
.nbss 0xaec 0 0xec (236)
.ndata 0xbd8 0 0x78 (120)
.ndata 0xc50 0 0x20 (32)
.nbss 0xc70 0 0x1e (30)
.nbss 0xc8e 0 0x1e (30)
.nbss 0xcac 0 0x18 (24)
.ndata 0xcc4 0 0x14 (20)
.nbss 0xcd8 0 0x12 (18)
.nbss 0xcea 0 0xa (10)
.nbss 0xcf4 0 0xa (10)
.ndata 0xcfe 0 0x4 (4)
.nbss 0xd02 0 0x2 (2)

Total data memory used (bytes): 0x504 (1284) 15%


c:\program files\microchip\mplab c30\bin\pic30-coff-ld.exe: Error: Not enough contiguous memory for section .const.
D:\Product\SetupMode.o(.text+0x13e4): In function `FUN_Parameter_Adjust_INC_Range':
D:\Product\SetupMode.C:1365: Link Error: relocation truncated to fit: WORD CST_uchr_4KHz
D:\Product\SetupMode.o(.text+0x1418):D:\Product\SetupMode.C:1378: Link Error: relocation truncated to fit: WORD CST_uchr_Hz

....
....
....
以上一大串相同類型錯誤

Link step failed.
BUILD FAILED: Fri Sep 21 15:01:29 2007



導致程式無法編譯完成

發表於: 2007/9/21 15:16
《佛說人有二十難》
貧窮布施難 豪貴學道難 棄命必死難 得睹佛經難
生值佛世難 忍色忍欲難 見好不求難 被辱不瞋難
有勢不臨難 觸事無心難 廣學博究難 除滅我慢難
不輕未學難 心行平等難
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... ]

教育訓練中心

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