Hi,
When I using the vsprintf to implement printf to the uart.
I find some issue when I call the printf %f for float.
It will cause the "Stack overflow (context area not valid)"
Hi,
When I using the vsprintf to implement printf to the uart.
I find some issue when I call the printf %f for float.
It will cause the "Stack overflow (context area not valid)"
Hi,
The crash log suggests you have a stack overflow in your Shell thread. Probably because float support requires more memory. Please try to increase the stack size through CONFIG_SHELL_STACK_SIZE and see if it helps.
Best regards,
Vidar
Hi Vidar,
Thanks for share the solution, It can work now.
Now I meet the other overflow
Due to we porting some driver that using posix pthread, now the overflow happen in Current thread: 0x20006838 (unknown).
And I check the *.map file as below:
.bss.posix_thread_pool
0x0000000020006608 0x578 zephyr/lib/posix/liblib__posix.a(pthread.c.obj)
It seems like the posix library stack overflow, is there any soultion can resolve it?
Thanks.
Ian
Hi Ian,
Good to hear. The error you are getting now is a "kernel oops", and it is likely related to the "buffer overflow detected" message printed before the crashlog. Can you look up the faulting instruction address (0x1589c) to see where the error is being raised?
Looking up the faulting address with 'addr2line':
arm-zephyr-eabi-addr2line -e build/zephyr/zephyr.elf 0x1589c
Hi Vidar,
I find the error come from the printf buffer is overflow.
I modify it there's no more stack overflow.
Thanks.