[solved] [(stack_size = 4) overflow the heap] error.
Posted:
Wed Dec 17, 2014 8:34 am
by alonewolfx2
i am getting this error message on rtos sdk but i am checking heapsize every command and its always same.(free heap: 38904)
What is the stack_size and how can clear this.
Help is Welcome
Re: [(stack_size = 4) overflow the heap] error.
Posted:
Wed Dec 17, 2014 9:42 am
by Tomer
alonewolfx2 wrote:i am getting this error message on rtos sdk but i am checking heapsize every command and its always same.(free heap: 38904)
What is the stack_size and how can clear this.
Help is Welcome
Are you using a recursive function? Or calling a chain of functions (function a calls b which calls c...)?
Re: [(stack_size = 4) overflow the heap] error.
Posted:
Wed Dec 17, 2014 9:55 am
by alonewolfx2
Tomer wrote:alonewolfx2 wrote:i am getting this error message on rtos sdk but i am checking heapsize every command and its always same.(free heap: 38904)
What is the stack_size and how can clear this.
Help is Welcome
Are you using a recursive function? Or calling a chain of functions (function a calls b which calls c...)?
i was added just this lines after line133 in while loop( in user_main.c freertos sdk).here is sdk github link
user_main.cCode: Select allif(strstr(recv_buf, "ledac") != NULL)
{
gpio_output_set(BIT2, 0, BIT2, 0);
char *pbuf2 = (char *)zalloc(128);
sprintf(pbuf2, "led is on");
if (write(client_sock, pbuf2, strlen(pbuf2) + 1) < 0)
{
printf("Sc > len is on\n");
}free(pbuf2);
}
if(strstr(recv_buf, "ledkapat") != NULL)
{
gpio_output_set(0,BIT2,BIT2,0);
char *pbuf2 = (char *)zalloc(128);
sprintf(pbuf2, "led is off");
if (write(client_sock, pbuf2, strlen(pbuf2) + 1) < 0) {
printf("Sc > len is off\n");
}free(pbuf2);
}
Re: [(stack_size = 4) overflow the heap] error.
Posted:
Thu Dec 18, 2014 8:13 am
by nnylyj
Are you using FreeRTOS SDK?