Chat freely about anything...

User avatar
By alonewolfx2
#5004 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
User avatar
By Tomer
#5008
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...)?
User avatar
By alonewolfx2
#5009
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.c

Code: 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);

                     }