Malloc size change frdm-64 using Mcuxpresso

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Malloc size change frdm-64 using Mcuxpresso

1,314 次查看
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 项奖励
回复
2 回复数

1,267 次查看
ErichStyger
Specialist I

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 项奖励
回复

1,267 次查看
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 项奖励
回复