Error - section 'InterruptVectorLow' can not fit the absolute section. Section 'InterruptVectorLow'
生活随笔
收集整理的這篇文章主要介紹了
Error - section 'InterruptVectorLow' can not fit the absolute section. Section 'InterruptVectorLow'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在寫PIC單片機中斷或中斷嵌套時,如果沒有注意,寫好以后編譯會報錯,報錯信息如下:
Error - section 'InterruptVectorLow' can not fit the absolute section. Section 'InterruptVectorLow' start=0x00000018, length=0x00000006
以下是問題的解決:
定位代碼:
在 #pragma code偽指令后生成的所有代碼將被分配到指定的代碼段,直到遇到下一
個 #pragma code 偽指令。絕對代碼段允許將代碼分配到一個特定的地址。
例如:#pragma code my_code=0x2000
將把代碼段 my_code分配到程序存儲器地址 0x2000。
鏈接器會強制將代碼段放入程序存儲區;然而,代碼段也可以位于指定的存儲區。可
以用鏈接器描述文件中的 SECTION 偽指令把一個段分配到特定的存儲區。
總結
以上是生活随笔為你收集整理的Error - section 'InterruptVectorLow' can not fit the absolute section. Section 'InterruptVectorLow'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无线网卡掉线解决办法
- 下一篇: 结构对齐--__packed与#prag