Re: 請問這個名詞 psects (program sections or blocks) 的意思是什麼?
|
||||
---|---|---|---|---|
中級會員
|
你好!
引用 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
|
|||
|
請問這個名詞 psects (program sections or blocks) 的意思是什麼?
|
||||
---|---|---|---|---|
資深會員
|
大家好:
我在 Hi-Tech C 的 User Manual 中不斷看到一個名詞: psects (program sections or blocks) 請問其意思為何,指的是程式記憶體 ROM 還是 隨機存取記憶體 RAM? 謝謝。
發表於: 2008/7/2 14:10
|
|||
|