New open-source logging/tracing toolkit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New open-source logging/tracing toolkit

90 Views
BrankoP
Contributor I

Hello to C / C++ embedded system firmware developers,

A new data logging and tracing toolkit for code instrumentation has been released on Github. Code is instrumented to enable thorough testing, to provide good insight into real-time systems or history in unattended systems (e.g., IoT remote diagnostics), and for many other reasons. Real-time systems cannot be stopped because restarting the system changes the conditions, leading to different results, or loss of control could cause damage. 

The new toolkit is suitable for everything from large RTOS-based systems to small, resource-constrained systems. The toolkit is not a replacement for existing event-oriented solutions such as SystemView or Tracealyzer, as it is based on a different concept. It provides minimally intrusive data logging and flexible data decoding. The code is optimized for 32-bit devices – about 35 CPU cycles and 4 bytes of stack are required to log a simple event on a device with a Cortex-M4 core. Nearly 200 CPU cycles and a maximum of 150 to 510 bytes of stack are required to log an event with Segger SystemView

The solution is essentially a reentrant timestamped fprintf() function running on the host instead of the embedded system. There is no data encoding and no printf-style functions/strings in the embedded system. The memory footprint of the logging library is only 1 kB when all functions are used. The small number of logging functions and the familiar printf syntax make the solution easy to use and learn. Any data type can be logged and printed (decoded on the host), including structures and bitfields. Print output can be redirected to any number of custom files, such as CSV or event log files. This allows the use of existing log and event viewers and graphing tools. The solution is ready to use for devices with an ARM Cortex-M core. Any debug probe, communication channel, or media can be used to transfer data to the host.

The new toolkit is intended for developers of various embedded systems from real-time control to IoT.  See the RTEdbg toolkit presentation. The toolkit distribution file also includes demo code for LPC micros, including setup for MCUXpresso, Keil MDK, and IAR EWARM.

Best regards,

Branko

0 Kudos
1 Reply

43 Views
HangZhang
NXP Employee
NXP Employee

Hi @BrankoP 

Thank you for providing the information.

BR

Hang

0 Kudos