region `m_data_2' overflowed by 0 bytes problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

region `m_data_2' overflowed by 0 bytes problem

2,720件の閲覧回数
bcelikte
Contributor III

Hi,

I am using S32K144 EVB with MC33771B and using your Battery Management System Example.

I have just modify calculations according to my algorithms which are more complex than example ( nearly all states calculating with complex observers)

Anyway, I am using for each block for my serie connected cells ( for now I am using emulator), and when I select cell count 8, flashing code is no problem. But when I tried to select cell count 14 which I need, it is giving me this error.

 

1.PNG2.PNG3.PNG

 

When I look at the web, it seems an memory issue, can you help me to fix this issue?

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

2,700件の閲覧回数
bcelikte
Contributor III

Hi @mariuslucianand ,

BCC config is 14 all the time. I am using "For Each" block to calculate every cell's SOC seperately and when I select For Each count (series cell count) 8, it is flashed with no problem but when I select 14 it is giving me this one. So, I thought For Each writes arrays to memory for every individual one and subtract arrays from For Each but it is again same problem. I made arrays shorter and tried, again same problem. What is your suggestions?

 
 

 

0 件の賞賛
返信

2,707件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @bcelikte ,

Indeed there is a memory issue there. The m_data_2 section keeps the initialized global variables, stack and heap. Do you only change the numbers of the cells in the BCC config block and get this error? or do you also enable the processing blocks for the other 6 cells?

Simulink can optimize the memory for minimizing RAM. This might be a solution for you with not changing anything in the code. This is available under Configuration parameters -> Code generation -> Optimization. 

Also, please check the arrays that you are using in your model.

 

Hope this helps,

Marius

 

 

0 件の賞賛
返信