Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #27093

Re: Efficient debug log

From Chris <xxx.syseng.yyy@gfsys.co.uk>
Newsgroups comp.arch.embedded
Subject Re: Efficient debug log
Date 2017-07-31 16:44 +0000
Organization Aioe.org NNTP Server
Message-ID <olnmpf$1hvl$1@gioia.aioe.org> (permalink)
References <okpt2m$sok$1@dont-email.me> <oli059$kqe$1@gioia.aioe.org> <olmqff$7mr$1@dont-email.me>

Show all headers | View raw


On 07/31/17 08:45, pozz wrote:
On 07/31/17 08:45, pozz wrote:

 >
 > Do you have a facility to disable (not present in the final binary)
 > syslog messages from single modules?

Typically, no, since it can be useful for finding faults and form
the basis of a diagnostic for production and in field testing. If
you work it right, the overhead is minimal. If you want selective
reporting, define another member of the structure for each item to
enable or disable that or define the level, say from none to verbose.
Typically, the structure just carries a U32 count, but can be changed
to include strings etc. if i'm bringing a board up from cold, the
syslog stuff is the first to be built. That then provides built in
diagnostics as you bring up the hal layer for the other hardware and
peripherals.

 >
 > Do you create messages in textual form (i.e. do you use printf-like
 > functions)?

Depends on the system, but typically use as little of the C library as
possible. All the types are wrong etc. Instead, have a well proven
library of simple functions that print strings, convert between number
bases, read input etc. It gets added to over the years to provide
functionality. Of course, text output assumes a uart or other means
of accessing the messages, but the same ideas can be used to
provide flashing led sequences, whatever.

I guess what i'm saying is that I try to build some level of on board
diagnostics into every project from the start, whether or not it's in
the spec. It just makes life so much easier...

Chris

Back to comp.arch.embedded | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Efficient debug log pozz <pozzugno@gmail.com> - 2017-07-20 11:31 +0200
  Re: Efficient debug log Anders.Montonen@kapsi.spam.stop.fi.invalid - 2017-07-20 10:35 +0000
  Re: Efficient debug log Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2017-07-20 23:14 +0200
    Re: Efficient debug log David Brown <david.brown@hesbynett.no> - 2017-07-24 09:40 +0200
      Re: Efficient debug log pozz <pozzugno@gmail.com> - 2017-07-26 11:15 +0200
        Re: Efficient debug log David Brown <david.brown@hesbynett.no> - 2017-07-26 14:24 +0200
        Re: Efficient debug log Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2017-07-27 10:23 +0200
          Re: Efficient debug log David Brown <david.brown@hesbynett.no> - 2017-07-27 11:14 +0200
      Re: Efficient debug log Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2017-07-27 10:06 +0200
        Re: Efficient debug log David Brown <david.brown@hesbynett.no> - 2017-07-27 11:35 +0200
  Re: Efficient debug log Clifford Heath <no.spam@please.net> - 2017-07-21 12:57 +1000
  Re: Efficient debug log Jack <jack4747@gmail.com> - 2017-07-20 23:17 -0700
  Re: Efficient debug log Chris <xxx.syseng.yyy@gfsys.co.uk> - 2017-07-29 12:47 +0000
    Re: Efficient debug log pozz <pozzugno@gmail.com> - 2017-07-31 10:45 +0200
      Re: Efficient debug log Chris <xxx.syseng.yyy@gfsys.co.uk> - 2017-07-31 16:44 +0000

csiph-web