This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: realtime data logging with colored output


On Fri, Jun 09, 2006 at 04:43:21PM +0200, Thomas H?henleitner wrote:
> Thanks for your reply Andrew,
> 
> just a few questions:
> 
> Sorry for this stupid one: What stands CYG for? And CYGSEM?

eCos was origionally designed and implemented by Cygnus Solution. So
all eCos functions start with cyg_ so as not to polute the name space.

CDL prefixes are described in:
http://ecos.sourceware.org/docs-latest/cdl-guide/language.naming.html
 
> I did not notice CYG_TRACE before. It seems to be s.th. similar. From the
> first look into the source it has more overhead on the side where speed
> counts. And it uses diag_printf or diag_write_* instead of printf.

It has to use diag_printf. You cannot assume printf() exists since
often it does not.

> I see no
> big sense in the *XY* macros. 

What do you mean by *XY*?

> I personally like the tag feature and the colors but it is a question of
> taste. 

I'm not so keen on the colour feature. You are making assumptions
about the host. My old clunky ADM11 is not going to like the control
sequencies.
 
> If you ask me, I do not know what to recommend to use after I know
> CYG_PRINT now. I see nothing new in my trial.
> 
> In case that there is a real chance for this code to be a part of eCos,
> could you please give me an explanation why? Otherwise I would not make the
> effort adapting it.

I don't see any advantage over the existing tracing. So i would not go
further.
 
> If there is sense including this code some more questions:
> 
> I never created sgml files, so I asked Google and downloaded a test license
> of ecpEdit - a sgml editor. So when I try to load any of the eCos sgml
> files it pleasures me with several error messages. A further quick search
> was not right away successful - so I better ask: Could you please recommend
> me a tool for sgml editing and point, if there is, to a sgml template for
> eCos doc?

I've only ever used emacs to generate sgml text. I just copy an
existing document that has the correct structure and edit it. The SGML
we use is very simple, so it is easy to learn.

> In general the out fn could just send the log buffer (string pointers and
> values) to the host and the printf would be done there. For this the .const
> segment is needed there (it could be separated during the build process)
> and a special terminal is needed, may be kind of a filter and a standard
> terminal. This way the stings in the target not needed, we get rid of the
> appropriate code there and we have better performance.

What you suggest is technically possible, but it is very fragile. Use
the wrong elf image and you get junk out. If you loose the elf you are
completely blocked from doing any tracing. You have to recompile and
upload the new binary.

I much prefer robust solutions.

  Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]