Author Topic: Embedded C++ general purpose "Debug" class?  (Read 1856 times)

0 Members and 1 Guest are viewing this topic.

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Embedded C++ general purpose "Debug" class?
« on: February 09, 2021, 07:11:35 pm »
Hi,
Through the years I have been writing my own debug code when needed but I have been wondering whether there are some general-purpose "debug" classes which implement common debug functionality including things like logging?

Just so I can get some ideas of how other people do it and even functionality I might have not thought of.

Thank you :)
« Last Edit: February 09, 2021, 08:21:59 pm by ricko_uk »
 

Offline dkonigs

  • Regular Contributor
  • *
  • Posts: 171
  • Country: us
Re: Embedded C++ general purpose "Debug" class?
« Reply #1 on: February 14, 2021, 10:50:29 pm »
I mostly do embedded work in C, but the needs are likely similar.

I tried asking about the logging functionality part once, only to get a lot of people completely misunderstanding the question and offering advice that wasn't entirely helpful:
https://www.eevblog.com/forum/microcontrollers/stm32-logging-library-choices/

The best choices I've come across there were to port the logging code from the ESP32 ESP-IDF framework:
https://github.com/espressif/esp-idf/tree/master/components/log

Or this other small project called EasyLogger:
https://github.com/armink/EasyLogger

I'm curious about the other items you're thinking of, even if I'm not entirely sure what they are.  I love some of the debugging features built into the ESP-IDF framework (such as useful crash messages that often include a backtrace and possibly even core dumps). It would be very useful to port such things to other platforms.
 
The following users thanked this post: photovore

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1233
  • Country: fr
Re: Embedded C++ general purpose "Debug" class?
« Reply #2 on: February 17, 2021, 12:56:17 am »
Thank you dkonigs, very useful! :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->