Re: Debugging: Am I a dreamer. . . ?



In message <m1d4o7remo.fsf@xxxxxxxxx>, Hao Wang <doitmy@xxxxxxxxx> writes
Tomás Ó hÉilidhe <toe@xxxxxxxxxxx> writes:

I've been programming in C for the best part of a decade now but it's
only within the last year that I've really started doing embedded
systems programming.

When I did C programming for a personal computer, I commonly debugged
my code simply by putting in printf statements around the place to
check variable values, and also by using the instrument that lets you
check the values of variables at runtime when you're stepping through
the code.


If you really programming in C for years, you know that using printf
or debugger to remove bugs, only gives the design more bugs. Embedded
solutions stay away bugs by careful design (in both IC/HW/BSP/SW).

I wasn't going to mention that as it usually causes a bun fight bit since you have...

You should never debug using printf.

This is why there are simulators, debuggers and Emulators. Even for PC's I can recall Borland had a system where you could debug one PC from another. For embedded using printf should have dies out over a decade ago.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



.



Relevant Pages

  • Re: mnemonic
    ... I'd say that about half of my bugs I find with printf. ... I find with a traditional debugger. ... hardly ever orders of magnitude faster. ...
    (comp.lang.c)
  • Re: mnemonic
    ... I'd say that about half of my bugs I find with printf. ... I find with a traditional debugger. ...
    (comp.lang.c)
  • Re: Debugging: Am I a dreamer. . . ?
    ... systems programming. ... or debugger to remove bugs, only gives the design more bugs. ... You should never debug using printf. ... runs is a very useful debugging technique. ...
    (comp.arch.embedded)
  • Re: Debugging: Am I a dreamer. . . ?
    ... systems programming. ... You know the PIC16F684 chip that costs less than a dollar, ... Many chips have in-circuit debugging features, ... debugging that you can twiddle with in software instead of a printf is ...
    (comp.arch.embedded)