K22 RAM分配问题

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K22 RAM分配问题

Jump to solution
717 Views
liubinc
Contributor I

MCU:MK22FN512

RAM大小:两个64K组成128KB

问题:

程序中开辟了很多全局数组,如:

static double total_tem_data_y[128*8];
static double total_tem_data_z[128*8];

IAR编译链接OK后,出来的RAM空间6K readony data memory;70K readwrite data memory;

然后我再开辟一个全局数据 static double total_tem_data_x[128];128个double也才1K,加上之前的6K和70K也才77K的总大小。

编译链接后就报错了

1.jpg

Labels (2)
0 Kudos
1 Solution
605 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Liubin,

You can try to declare  the SRAM as one "single" area instead two parts.

Please refer to this thread :

Help me out of this IAR compile Error : cannot fit "Block .bss"   

Hope it helps


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
606 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Liubin,

You can try to declare  the SRAM as one "single" area instead two parts.

Please refer to this thread :

Help me out of this IAR compile Error : cannot fit "Block .bss"   

Hope it helps


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

605 Views
liubinc
Contributor I

Thank you very much sir, it worked.

0 Kudos