Re: ATSAME54P20A--定址

作者 Gordon0010 於 2020年05月22日 15:01:15
感謝 Libra及Adam 。
我另外多加的了一些Module,確實可以用的位址確實往後移了。

1.    RAM Data
-Memory Usage
2.    section                    address  length
[bytes]      (dec)  Description
3.    
-------                 ----------  -------------------------  -----------
4.    .bss                    0x20000000         0x5460       21600  Uninitialized data
5.    
.data.impure_data       0x20005460          0x418        1048
6.    
.data.__malloc_av_      0x20005878          0x408        1032
7.    
.data.InitBMSInParamSet 0x20005c80          0x170         368
8.    
.data.__global_locale   0x20005df0          0x16c         364
9.    
.bss.can1Obj            0x20005f5c           0x28          40
10.    
.bss.sercom7I2CObj      0x20005f84           0x28          40
11.    
.bss.can0Obj            0x20005fac           0x28          40
12.    
.bss.sercom4I2CObj      0x20005fd4           0x28          40
13.    
.bss.__malloc_current_m 0x20005ffc           0x28          40
14.    
.data.messageError      0x20006024           0x21          33
15.    
.bss.writeStatus        0x20006045            0x1           1
16.    
.bss.readStatus         0x20006046            0x1           1
17.    
.bss.writeStatus5       0x20006047            0x1           1
18.    
.bss.can1RxMsg          0x20006048           0x20          32
19.    
.bss.can1CallbackObj    0x20006068           0x20          32
20.    
.bss.can0RxMsg          0x20006088           0x20          32
21.    
.bss.can0CallbackObj    0x200060a8           0x20          32
22.    
.bss                    0x200060c8           0x1c          28  Uninitialized data
23.    
.bss.receiveBuffer      0x200060e4            0xa          10
24.    
.bss.messageMarker.8529 0x200060ee            0x1           1
25.    
.bss.errorStatus        0x200060ef            0x1           1
26.    
.bss.message1ID         0x200060f0            0x4           4
27.    
.bss.status0            0x200060f4            0x4           4
28.    
.bss.status1            0x200060f8            0x4           4
29.    
.bss.messageID          0x200060fc            0x4           4
30.    
.bss.rx_message0ID      0x20006100            0x4           4
31.    
.bss.rx_message1ID      0x20006104            0x4           4
32.    
.bss.xfer0Context       0x20006108            0x4           4
33.    
.bss.xfer1Context       0x2000610c            0x4           4
34.    
.data._impure_ptr       0x20006110            0x4           4
35.    
.bss.__malloc_max_sbrke 0x20006114            0x4           4
36.    
.bss.__malloc_max_total 0x20006118            0x4           4
37.    
.bss.__malloc_top_pad   0x2000611c            0x4           4
38.    
.data.__malloc_sbrk_bas 0x20006120            0x4           4
39.    
.data.__malloc_trim_thr 0x20006124            0x4           4
40.    
.bss                    0x20006128            0x4           4  Uninitialized data
41.    
.bss.retStatus          0x2000612c            0x1           1
42.    
.bss.message0Length     0x2000612d            0x1           1
43.    
.bss.message1Length     0x2000612e            0x1           1
44.    
.bss.rx_message0Length  0x2000612f            0x1           1
45.    
.bss.rx_message1Length  0x20006130            0x1           1
46.    
.data.state0            0x20006131            0x1           1
47.    
.data.state1            0x20006132            0x1           1
48.    
.bss.messageMarker.8529 0x20006133            0x1           1
49.    _0cfed8405ec77515       0x20010000           0x44          68
50.    
.data.messageStart      0x20010044           0x48          72
51.    
.bss.echoBuffer         0x2001008c            0xe          14
52.    
.bss.timestamp          0x2001009a            0x2           2
53.    
.bss.message0ID         0x2001009c            0x4           4
54.    _0cfed8985ec77515       0x200100a0           0x44          68
55.    Total RAM used  
:      0x6218       25112  9.6% of 0x40000
56.    
--------------------------------------------------------------------------
57.    Total Data Memory used  :      0x6218       25112  9.6% of 0x40000
58.    
--------------------------------------------------------------------------

_0cfed8405ec77515 Can0MessageRAM
_0cfed8985ec77515 Can1MessageRAM
也將定址位址往後移,但是通訊還是有問題,data傳送內容一樣為0x00,ID也是為0x00。

假如,修改linker script是否可以將.bss的位址調整,
空出SRAM一部分專用。
要如何修改linker script(我知道這很麻煩,拜託幫幫忙!)
修改後的linker檔案(*.ld)要如何加入編輯,
我按照文件的方式後,看起來還是使用原本的script。

來自: http://www.microchip.com.tw/newbb/viewtopic.php?forum=11&topic_id=22894&post_id=80681