Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack overflow on esp32-c3 #7

Closed
netmonk opened this issue Jul 31, 2022 · 2 comments
Closed

stack overflow on esp32-c3 #7

netmonk opened this issue Jul 31, 2022 · 2 comments

Comments

@netmonk
Copy link
Contributor

netmonk commented Jul 31, 2022

creating task with 1024*2 stack size is too small and therefore lead to carsh loop with stack overflow when lauching either task_rx or task_tx in basic exemple.

#if CONFIG_SENDER                                                                                                                                                                                          
         xTaskCreate(&task_tx, "task_tx", 1024*4, NULL, 5, NULL);                                                                                                                                           
#endif                                                                                                                                                                                                     
#if CONFIG_RECEIVER                                                                                                                                                                                                  
         xTaskCreate(&task_rx, "task_rx", 1024*4, NULL, 5, NULL);                

Solution is to increase stack size at task creation.

@nopnop2002
Copy link
Owner

nopnop2002 commented Aug 1, 2022

creating task with 1024*2 stack size is too small

I don't have such code in my repository.

$ find . -name *.c | xargs grep xTaskCreate
./ping-pong/main/main.c:        xTaskCreate(&task_primary, "task_primary", 1024*3, NULL, 5, NULL);
./ping-pong/main/main.c:        xTaskCreate(&task_seconfary, "task_secondary", 1024*3, NULL, 5, NULL);
./basic/main/main.c:    xTaskCreate(&task_tx, "task_tx", 1024*3, NULL, 5, NULL);
./basic/main/main.c:    xTaskCreate(&task_rx, "task_rx", 1024*3, NULL, 5, NULL);

Perhaps you cloned an older repo.

Plz try latest.

@netmonk
Copy link
Contributor Author

netmonk commented Aug 1, 2022

Exact, it was on basic.c and I didn’t pull since 3 of may. All apologise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants