How to increase the RTOS HEAP AREA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hi, I'd like to know how to increase the RTOS HEAP SIZE on CYUSB3014. The FX3.ld saids (Update cyfxtx.c to change this.) If I want to double the RTOS HEAP SIZE do I only need to modify this parameter? ------------------------------------------------------------------------------------------ Original #define CY_U3P_MEM_HEAP_SIZE (0x8000) ------------------------------------------------------------------------------------------ Modified #define CY_U3P_MEM_HEAP_SIZE (0x10000) Thanks   
0 Likes
2 Replies
RoKl_290166
Level 4
Level 4
Welcome!

Hi,

   

in principle, this is correct.

   

But if you increase the CY_U3P_MEM_HEAP_SIZE the CY_U3P_BUFFER_HEAP_SIZE will be reduced since this is defined as CY_U3P_SYS_MEM_TOP - (CY_U3P_MEM_HEAP_BASE + CY_U3P_MEM_HEAP_SIZE) (see macros in cyfxtx.c).

   

CY_U3P_BUFFER_HEAP_SIZE contains all the DMA-buffers you are creating in your firmware so if it becomes too small you maybe won't be able to create all your DMA-buffers anymore. Hence, if you need more MEM_HEAP or BUFFER_HEAP you can also decrease the LENGTH (and ORIGIN) of the DATA and/or SYS_MEM-memory in the linker-script file.

   

 

   

Regards,

   

Rob

0 Likes
Anonymous
Not applicable

Thank you

0 Likes