Electronic Design

Finding The Right Solution

<b>Write once with no bugs. That's every programmer's dream.</b>
<pre>Unfortunately, it doesn't usually work in practice. Fixing a problem requires finding the problem, then applying an appropriate fix. In many cases, there's more than one solution. Searching for these solutions and knowing when to do this separates the novices from the pros.

I was reminded of this the other day when an HTML question arose. There was a need to post a page of text that contained preformatted information. The tools were a Web page interface and a document editor. The problem was that the Web page interface tried to be HTML-friendly and would remove spaces and blank lines that threw off the formatting. In this situation, the kinds of tools used and the procedure caused the problem.

This is similar to the problem of hardware and software debugging. A variety of tools and methodologies exists. The variations in capabilities and how well they're applied can make the difference between finding and not finding a problem and a solution. It can also make the difference between locating the root problem in minutes or days.

ICE (in-circuit emulation) is invaluable, but ICE hardware tends to be expensive. It also requires a chip design amenable to ICE. The speed and complexity of today's microcontrollers also makes dealing with ICE rather difficult.

JTAG (IEEE 1149.1) is one approach. But its throughput becomes a limitation, and there's the need to stop the processor to utilize the debugging features. Vendor-specific advances like ARM's ETM (Embedded Trace Macrocell) provide real-time features that bypass these limitations. However, it may be standards like Nexus 5001 that deliver the debugging goods as JTAG has done thus far (see "Next Nexus Delivers Debug Data," p. 50).

The HTML problem turned out to have a number of solutions like passing the original document into an HTML editor and then grabbing HTML output. This was an improvement over the manual editing that was originally used. After a little more digging I found the <pre> HTML tag description. Adding it to the start of the document solved the problem. The 10-second solution beat the other alternatives in speed and simplicity. Best of all, there was no need to check the original copy for changes. Hopefully all your debugging problems will turn out as well.</pre>

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.