'The conditions of memory (heap size) of each blocks that should be met in harmony v3

I have tried to run TCPIP stack of harmony v3 default library in PIC32MX170F256B, but Memory allocation errors has occurred and that cause exceptions or freezing all threads.

Default TCPIP library of harmony v3 has lots of parameters that seems to be related to memory as below.

1.XC32_HEAP_SIZE of system block.

enter image description here

2.FREERTOS_MINIMAL_STACL_SIZE, FREERTOS_ISR_STACK_SIZE, FREERTOS_TOTAL_HEAP_SIZE of FreeRTOS block.

enter image description here

3.TCPIP_RTOS_TASK_STACK_SIZE, TCPIP_STACK_DRAM_SIZE, TCPIP_STACK_DRAM_RUN_LIMIT, TCPIP_STACK_HEAP_SIZE_RECOMMENDED of TCPIP Core block.

enter image description here

4.DRV_ENC28J60_CLIENT_INSTANCES_IDX0, DRV_ENC28J60_MAC_TX_DESCRIPTORS_IDX0, DRV_ENC28J60_MAC_RX_DESCRIPTORS_IDX0, DRV_ENC28J60_MAX_RX_BUFFER_IDX0, DRV_ENC28J60_RX_BUFFER_SIZE_IDX0 of ENC28J60 block.

enter image description here

5.TCPIP_TCP_MAX_SEG_SIZE_TX, TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE, TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE of TCP block.

enter image description here

6.GEN_APP_RTOS_TASK_X_SIZE of CORE block.

enter image description here

My question is how to decide the value of these parameters. Thank you for any help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source