This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dynamic Memory allocation in RTX / CMSIS-RTOS2

Hi,

I used to work with Keil / CMSIS-RTOSv2 and FREERTOS down there. 

With FreeRTOS i've got the ability to choose from where to get HEAP. for example heap3 just surrounds Standard C-Library malloc/free functions with RTOS task switch blockers. Then in my application i was able to get some memory with for ecample: "x = pvPortMalloc(size)".

Now i want to switch to RTX and i'm trying to find out how to get some memory.  

So i see  RTC_Config.h has a 

OS_DYNAMIC_MEM_SIZE 
 define which gets allocated at kernel initilize. Then i guess i should be able to get a piece from that with:
osRtxMemoryAlloc(osRtxInfo.mem.common, 10, 1U);

but then i have to include #include <rtx_os.h> and #include "pathto/rtx_lib.h>, I think this can't be the intention of the developer to use it that way in combilnation with cmsis_rtos_v2.  So i guess i'^m missing somehting.

How can i get some memory without specific memory pools and so on... ? 

Cheers