Re: ChibiOS OpenOCD support
Posted: Wed Oct 10, 2012 10:09 am
Hi saraben,
most of your outputs look great. What is really interesting, is that your backtrace goes further back than then _port_thread_start functions:
This should not be. For me it looks like this:
I have no idea though how gdb figures out that the PC was not saved. Maybe it is a toolchain error. Maybe we need to clean the lr register on _port_thread_start? Giovanni, do you have any idea what could cause this? I also tried with -O3 and it still worked for me.
saraben: You could also try to set a break point into one of those threads, so that it is the current thread. Check if the backtrace still contains these function calls before _port_thread_start.
most of your outputs look great. What is really interesting, is that your backtrace goes further back than then _port_thread_start functions:
Code: Select all
Thread [4] 536877952 (shell : : WTQUEUE) (Suspended : Container)
chSchGoSleepS() at chschd.c:122 0x8001664
chSchGoSleepTimeoutS() at chschd.c:195 0x8001768
qwait() at chqueues.c:69 0x8003c40
chIQReadTimeout() at chqueues.c:232 0x8003e6c
read() at serial.c:63 0x800574e
shellGetLine() at shell.c:261 0x80134c6
shell_thread() at shell.c:155 0x801328a
_port_thread_start() at chcore_v7m.c:255 0x8000d32
chSchGoSleepS() at chschd.c:121 0x8001664
0xaa52432a
This should not be. For me it looks like this:
Code: Select all
Thread 8 (Thread 536901664):
#0 0x080009f2 in chSchGoSleepTimeoutS (newstate=<value optimized out>, time=<value optimized out>) at ../../os/kernel/src/chschd.c:195
#1 0x08001b3e in chMBFetchS (mbp=0x20008c28, msgp=0x20007c94, time=<value optimized out>) at ../../os/kernel/src/chmboxes.c:335
#2 0x0800a480 in sys_arch_mbox_fetch (mbox=<value optimized out>, msg=<value optimized out>, timeout=<value optimized out>) at ../../os/various/lwip_bindings/arch/sys_arch.c:169
#3 0x080110ea in netconn_accept (conn=0x20004d48, new_conn=0x20007cb0) at ../../ext/lwip/src/api/api_lib.c:304
#4 0x08014876 in http_server (p=<value optimized out>) at web/web.c:115
#5 0x0800068a in _port_thread_start () at ../../os/ports/GCC/ARMCMx/chcore_v7m.c:255
Backtrace stopped: frame did not save the PC
I have no idea though how gdb figures out that the PC was not saved. Maybe it is a toolchain error. Maybe we need to clean the lr register on _port_thread_start? Giovanni, do you have any idea what could cause this? I also tried with -O3 and it still worked for me.
saraben: You could also try to set a break point into one of those threads, so that it is the current thread. Check if the backtrace still contains these function calls before _port_thread_start.
