• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問這個名詞 psects (program sections or blocks) 的意思是什麼?
#3
資深會員
資深會員


查看用戶資訊
C_H_M大大 您好:

我的編譯器所顯示的訊息為 ........ segment CODE
由於我的程式只佔用 ROM 的一半空間而已,
所以比較可能的原因是其中有一個副程式太龐大超過了一個程式頁的空間。這下麻煩大了,首先我不知道是哪一個副程式太龐大,當然我也可以挑一個比較大的來假定,其次程式頁的安排是編譯器做的,我有辦法加以改變嗎?

最後,請問 HI-TECH 在乎叫副程式時,是不是也像組合語言一樣,不能跨頁呼叫。

還好,編譯器還沒有顯示過........ segment BANKx. 這個表示 BANKx 空間不夠用的訊息。

謝謝。

發表於: 2008/7/7 11:48
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問這個名詞 psects (program sections or blocks) 的意思是什麼?
#2
中級會員
中級會員


查看用戶資訊
你好!
引用 HI-TECH 的官網 FAQs 內容, 如下:

I get the error: Cant find XXX words/bytes in psect XXX
> I get the error: Can't find XXX words/bytes in psect XXX
> What does this mean??

This error message simply means that the linker could not find enough
space in ROM or RAM to fit your program.

If you are using the PICC compiler and the error says that it can't find
space in segment CODE, then this can mean one of two things.
Either your program is simply too big to fit into the available ROM space
of the processor you are compiling for; OR
You have a large function which won't fit into a single ROM page. There is
a restriction that functions must be able to fit within a ROM page. To overcome
this, split the large function into two or more smaller functions. You can
determine which function is causing the problem by generating an assembler
listing file (-asmlist), and locating the psect that was given in the error
message.

If the error message says that it was segment BANKx that it couldn't find space,
then this means you have run out of RAM in that particular bank. FAQ number 29
has details of this.
----------------------------------------------------------------------

大致上是說:
很單純的就是 linker 找不出足夠的空間以符合你程式的使用,
這個空間呢! 或許是 ROM 區域 或許是 RAM 區域.

如果, 編譯器所顯示的訊息為 ........ segment CODE.
這表示你的程式目的碼有可能超過了總程式空間,
或是你其中有一個副程式太龐大超過了一個程式頁的空間.

如果, 編譯器所顯示的訊息為 ........ segment BANKx.
那就表示 BANKx 空間已經被使用完了不夠用.

若是程式空間不夠, 可能需要考慮改用程式空間較大的 IC,
刪減程式, 精簡程式等等...

若是 BANKx 不敷使用, 可以使用 bank1, bank2, bank3 指令
指定到尚還有 RAM 空間的 BANK 中,
如果全部空間還不夠, 那就需要考慮改用 RAM 較多的 IC 了.

發表於: 2008/7/6 12:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問這個名詞 psects (program sections or blocks) 的意思是什麼?
#1
資深會員
資深會員


查看用戶資訊
大家好:

我在 Hi-Tech C 的 User Manual 中不斷看到一個名詞:
psects (program sections or blocks)

請問其意思為何,指的是程式記憶體 ROM 還是 隨機存取記憶體 RAM?

謝謝。

發表於: 2008/7/2 14:10
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... ]

教育訓練中心

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