Increasing the Heap memory for TWR-K60N512

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

Increasing the Heap memory for TWR-K60N512

1,139 Views
Akshaya_Mukund
Contributor I

I wanted to know if there is a way to increase the HEAP memory for an application running on MQX. My heap requirements are on the higher side and I require another 30kb or so of heap memory for my application.

 

I am guessing these changes would have to be made in the MQX libraries (bsp, psp etc..). Could anyone point out where these changes would have to be made. Also what is the default size and maximum size of heap.

 

As of now in the twrk60n512.h the BSP_EXTERNAL_MRAM_RAM_SIZE is commented out. Could the MRAM be used to increase heap size ? I understand that removing the IrDA receiver i.e. R14 allows MRAM usage and the board I am using has this modification (R14 removed) will this be of any help.

0 Kudos
5 Replies

462 Views
BielikM
Contributor III

Your possible choices are:

  1. optimize code( disable unused components, change linkercomand file, change static data to dynamic ...)
  2. change target to mram target (a litle slower memory but bigger)
  3. create memory pool at mram (_lwmem_create_pool(...)) and alloc your staff there (  _mem_alloc_from(...),...),
0 Kudos

462 Views
Akshaya_Mukund
Contributor I

Could disabling the the lwmem option (what i mean here is disabling the MQX_USE_LWMEM_ALLOCATOR macro) help.

 

As of now my _mem_alloc and _mem_free are typdef'ed to the respective lwmem functions.

 

 

0 Kudos

462 Views
Akshaya_Mukund
Contributor I

I noticed that the available heap memory for mallocs was fixed at ~84.5 KB. Is this the maximum available RAM on the TWR-K60. Can this be increased by changing some macros or is the only way to increase this available memory implemented by physically adding memory via a TWR-MEM (or some MRAM). Also I wasn't able to find any documentation to successfully integrate the TWR-MEM into the MQX/TWR-k60 setup.

 

Please do let me know if you could give me some pointers on this.

 

Regards

0 Kudos

462 Views
Ardoster
Contributor III

Hi

Did you get any conclusion about the heap memory? I'm having right now problems with the pool memory and I need to know how could I fix these problems.

Thanks you in advance. Regards,

Eduardo

0 Kudos

462 Views
DavidS
NXP Employee
NXP Employee

Hi,

I recently played with adding a memory pool using the TWR-K60N512 kit with TWR-MEM Rev B card.

Please look at the following post for more details:

https://community.freescale.com/message/301229

Regards,

David

0 Kudos