about RW data segment in K64 Linker script file

取消
显示结果 
搜索替代 
您的意思是: 

about RW data segment in K64 Linker script file

493 次查看
ninesun
Contributor II

Hello 

      I have question about .bss segment in file MK64FN1M0xxx12_flash.ld, The R/W memory data area was divided among m_data and m_data_2.  but these two segment is continuous. why not  not take it as whole segment? if it can be taken as union segment. Then all data are use such memory area. for example. the .bss segment in my program is too large, i had to assign the .bss segment to m_data_2. Then some memory of m_data are to be wasted. Is there any reason to divided into two separated segment?

标签 (1)
标记 (1)
0 项奖励
2 回复数

300 次查看
BlackNight
NXP Employee
NXP Employee

Hi nine,

The reason is that the Kinetis K series has two memory controllers, one for each segment. So indeed there are two RAM ranges/segments, even if they are close together. You might face a hard fault if you place a variable/object over that 0x2000'0000 boundary depending on how you access it. More details about this you can find in https://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/  (make sure you check the discussion area).

So you *could* have the two areas in one piece, but you need to be careful about what you do with your memory allocation.

I hope this helps,

Erich

301 次查看
ninesun
Contributor II

Ok I see .Thanks

0 项奖励