• 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: [PIC24EP512GU814] RAM變數宣告問題
#3
管理員
管理員


查看用戶資訊
16 Bits, PIC24E, dsPIC33E, 的SRAM規劃, 大致分成幾塊,
1. 0~2K的SFR,
2. 2K~32K的一般區,
3. 32K以上的特殊存取區,

1, 2 (0~32K)用法很簡單, 沒啥好說的
3. 比較複雜, 分為真的有配置SARM跟沒有SRAM的兩種
沒有配置SRAM的, 該位址是透過PSV映射到program memony的某個32K的bit0-16 (Bytes)
沒有配置SRAM的, 該位址是透過EDS來存取, 當然也可透過PSV映射到program memony.

附上多年前在dsPIC33EP上面用C30寫的EDS範例, 希望有幫助

void EDSStrCopychar to __eds__ char *from )
{
    do
    {
        *
to++ = *from++;
    }
    while (*
from != 0x00);
    *
to 0x00;
}

Attach file:


Link only for registered users

發表於: 2020/11/19 16:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: [PIC24EP512GU814] RAM變數宣告問題
#2
中級會員
中級會員


查看用戶資訊
抱歉我有看到 10.7 EXTENDED DATA SPACE ACCESS這章節的宣告方法, 我再試一下看看, 謝謝

發表於: 2020/11/19 11:30
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


[PIC24EP512GU814] RAM變數宣告問題
#1
中級會員
中級會員


查看用戶資訊
各位前輩好, 小弟有一個MCU RAM變數使用的問題, 資訊如下,
MCU型號資訊如下圖:
縮圖

Data Model有設定 Large
縮圖

目前Data Memory使用率是53%
縮圖
(還有其他宣告, 只是先用這個補到53%)
縮圖

我之後再增加一個array宣告就build fail了, 如下
縮圖

Fail Log:
build/default/production/main.o: Link Error: Could not allocate section .bss, size = 29706 bytes, attributes = bss
build/default/production/main.o: Link Error: Could not allocate section .data, size = 500 bytes, attributes = data
xlitob.EP_eo: Link Error: Could not allocate section .data, size = 34 bytes, attributes = data
xprintf_cdnopuxX.EPeo: Link Error: Could not allocate section .data, size = 26 bytes, attributes = data
umodsi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
umodsi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
udivsi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
udivsi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
divsi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
divsi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
xvacopy.EP_eo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
xvacopy.EP_eo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
xputtxt.EP_eo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
xputtxt.EP_eo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
xlitob.EP_eo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
strchr.EP_eo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
strchr.EP_eo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
xputfld_cdnopuxX.EPeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
xputfld_cdnopuxX.EPeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
xprintf_cdnopuxX.EPeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
sprintf_cdnopuxX.EPeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
sprintf_cdnopuxX.EPeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
memcpy.EP_eo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
memcpy.EP_eo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
umuldi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
umuldi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
muldi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
muldi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
divmoddi3.epeo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
divmoddi3.epeo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
delay32ep.Leo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
delay32ep.Leo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
crt_start_mode_normalep.Leo: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
crt_start_mode_normalep.Leo: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
data_init_extended.o: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
data_init_extended.o: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
crt0_extendedep.o: Link Error: Could not allocate section .bss, size = 0 bytes, attributes = bss
crt0_extendedep.o: Link Error: Could not allocate section .data, size = 0 bytes, attributes = data
Link Error: Could not allocate data memory
make[2]: *** [dist/default/production/MCB-A2.0.0.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


我有參考XC16 guide嘗試宣告如下
縮圖

但是增加的區域卻是Program memory
縮圖

想請問各位前輩, 變數要如何宣告才能夠使用到完整的Data Memory呢?
誠如以上, 感激不盡

發表於: 2020/11/19 11: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... ]

教育訓練中心

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