I seem to be having a stack overflow. I've increased some of my stacks to 1280 bytes from the original "one step up from 128" (=256). But still I'm getting stack overflows. Sometimes the stack trace from gdb shows me what thread I must be in. But this time...
Code: Select all
(gdb) where
#0 0x08002bd2 in port_halt ()
at ../ChibiOS_2.6.6/os/ports/GCC/ARMCMx/chcore.c:48
#1 0x0800312a in chDbgPanic (msg=msg@entry=0x800b824 "stack overflow")
at ../ChibiOS_2.6.6/os/kernel/src/chdebug.c:274
#2 0x0800340a in chSchDoRescheduleBehind ()
at ../ChibiOS_2.6.6/os/kernel/src/chschd.c:315
#3 0x080034b8 in chSchDoReschedule ()
at ../ChibiOS_2.6.6/os/kernel/src/chschd.c:370
#4 0x08002be8 in _port_switch_from_isr ()
at ../ChibiOS_2.6.6/os/ports/GCC/ARMCMx/chcore_v6m.c:144
Backtrace stopped: previous frame identical to this frame (corrupt stack?)Anyway, I did: print waLoggerThread and I get: somewhere in the middle:
Code: Select all
6148914691236517205 <repeats 74 times>,Any suggestions?
Where is the main thread stack size set? For now I have put main to "sleep", and run what previously ran in main now in a separate thread where I can control the stack size.