Debug over serial

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Adam
Posts: 18
Joined: Thu Sep 05, 2013 1:53 pm

Debug over serial

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Debug over serial

Post 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
Adam
Posts: 18
Joined: Thu Sep 05, 2013 1:53 pm

Re: Debug over serial

Post by Adam »

I am using debugger from STM32F4-discovery board (wired to my board) + OpenOCD + Eclipse. How can I print debug messages on screen?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Debug over serial

Post 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
Adam
Posts: 18
Joined: Thu Sep 05, 2013 1:53 pm

Re: Debug over serial

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Debug over serial

Post 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
Post Reply