Extending the Default Memory Pool via _mem_extend

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

Extending the Default Memory Pool via _mem_extend

ソリューションへジャンプ
1,269件の閲覧回数
miket
Contributor II

Hello,

MQX Version: 4.0

CodeWarrior Version: 10.5

Processor: MK70FN1M0VMJ12

I am attempting to extend the default memory pool for my application which based off the mk70 tower kit originally.  The actual call in my application that I am using is:

_mqx_uint ret_val = mem_extend((void *)0x71000000,5000000);

This will cause my application to not work correctly in that I receive unhandled Interrupts later in my application which should have interrupt handlers assigned.  If I only extended the memory by 3 MB (i.e. _mem_extend((void *) 0x71000000, 3000000)), everything works as it should and i do not get the unhandled ISRs.

Does anyone know why this would happen?  Any other guidance on documentation, Application Notes, etc. would be appreciated.  I am open to any means of increasing the default RAM size.  I have tried creating other system memory pools as well, but receive the same type of observation of unhandled Interrupts.

Thank you!

-Mike T

タグ(3)
0 件の賞賛
返信
1 解決策
882件の閲覧回数
miket
Contributor II

I have answered this thread in another thread I started; all being symptoms of the same issue:

D4D eGUI External Memory Bitmap Images

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
883件の閲覧回数
miket
Contributor II

I have answered this thread in another thread I started; all being symptoms of the same issue:

D4D eGUI External Memory Bitmap Images

0 件の賞賛
返信
882件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi Michael,

Please notice _mem_extend() function works as follows:

- When you create a new task, MQX kernell uses some space in RAM for the internal task stack.

- If you run out of RAM memory you will not be able to create new tasks.

- You can use _mem_extend() to tell the MQX kernell that he can use external RAM if internl RM is not enough.

Please find attached the files of the complete example using _mem_extend() function.

In addition please edit the user_config.h in a text editor to add the followig lines:

#define MQX_USE_MEM 1 //Enable to use _mem_extend #define MQX_USE_LWMEM 0

#define MQX_USE_LWMEM_ALLOCATOR 0

Then re-build the BSP and PSP

I hope this helps,


Have a great day,
Sol

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

0 件の賞賛
返信