Malloc size change frdm-64 using Mcuxpresso

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

Malloc size change frdm-64 using Mcuxpresso

505 Views
josrennies
Contributor I

Hello,
I am using an FRDM-K64F board with the MCUXPRESSO IDE.
My application uses a lot of memory by malloc, so I need +-128K Ram size using malloc. When using the standard settings (see below for more details), there is no way to go above 64K that I can ask, using malloc.
Question : how do I instruct the compiler/system to give me more memory from malloc (physically there should be plenty). My application uses some 16K of ram by declaration in the main, and works fine, the problem comes from the limit on malloc  during run time, which limits to 64K.
Some useful tips or solution would be appreciated.

Here some information:

Product: MCUXpresso IDE
Version: MCUXpresso IDE v11.0.0 [Build 2516] [2019-06-05]
Operating system: Windows 7
VM: Java HotSpot(TM) 64-Bit Server VM (64 bit)

pastedImage_1.png

pastedImage_2.png

pastedImage_3.pngwbr.

0 Kudos
2 Replies

458 Views
ErichStyger
Senior Contributor V

I'm using FreeRTOS which has a memory manager which allows to allocate in multiple memory regions (see Using Multiple Memory Regions with the FreeRTOS Heap | MCU on Eclipse). You actually could use this without running the RTOS, because the memory allocation works without the scheduler started.

I hope this helps,

Erich

0 Kudos

458 Views
josrennies
Contributor I

Hello Erich,

Thanks for your prompt response!Let me first inform you what I need to

develop : I am doing a thermal object detection software, which is almost

done and which was running fine when the declaration of arrays and other

variables was done in the main program and was using the extern reference

from module to module. Because we have customers that want to use very

cheap microcontrollers (as less as possible ram and flash and as cheap as

possible!), they want to have the application running (=read lib, or source

code) that is easy and fast portable! I only need a chunk of ram that is

let's say has the biggest size (the 192K one will do).

I figured out, just by changing the heap size (that is the region where

malloc acts), my problem was solved.

Anyway, many thanks for your help.

wbr,

jos Rennies

0 Kudos