2 Replies Latest reply on Apr 21, 2016 6:59 AM by tt.sun

    How to increase the RTOS HEAP AREA

    tt.sun
              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   
        • 1. Re: How to increase the RTOS HEAP AREA
          robert.kliemann

          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