Page 1 of 1

Debug over serial

Posted: Tue Jan 14, 2014 1:10 pm
by Adam
Hi all!

Is possible debug ChibiOS over serial? I mean - every assert, exception or warning write on serial link?If it is possible, can you tell me how to enable this feature? I found only Eclipse plugin, which I´am already using.

And second question - Can I watch states of memories? How much the memory of heap/RAM/pools is full? After some time, when tcpip allocates mempool for incomming packet, I get NULL, and I get assert MEMPOOL OVERFLOW. I need find the reason why this happening.

Thank you for your answers.

Adam

Re: Debug over serial

Posted: Tue Jan 14, 2014 1:23 pm
by Giovanni
Hi,

Debugging over serial is not possible but barthess made something like this in the past, you should search in the forum. Anyway, the best way is to use a real debugger.

The second question is specific of lwIP, probably you need to look at its configuration file and see if there are parameters related to the memory pools.

Giovanni

Re: Debug over serial

Posted: Tue Jan 14, 2014 1:28 pm
by Adam
I am using debugger from STM32F4-discovery board (wired to my board) + OpenOCD + Eclipse. How can I print debug messages on screen?

Re: Debug over serial

Posted: Tue Jan 14, 2014 1:49 pm
by Giovanni
Hi,

You can't but after stopping the system the global variable dbg_panic_msg points to the error message, you just need to inspect the variable using the debugger.

Note that the ChibiOS Eclipse plugin does that for you.

Giovanni

Re: Debug over serial

Posted: Tue Jan 14, 2014 1:59 pm
by Adam
Ok, so when I enable option of debug checking of any subsystem to TRUE, system is automatically halted although it is only a warning?

Re: Debug over serial

Posted: Tue Jan 14, 2014 4:27 pm
by Giovanni
Correct, after the halt you can suspend the application and inspect the message.

BTW, those are no warning, everything is an error, a correct application should never trigger any check.

Giovanni