Creating the Ultimate Embedded Software Workbench

By Jacob Beningo

Contributed By Digi-Key's North American Editors

Building an embedded system in a timely and efficient manner requires that software developers have the right tools on their workbench to get the job done. While budgets are typically limited, there are tools that every embedded software engineer needs to greatly reduce the time needed to build, debug and verify their designs.

The good news is that the ultimate embedded software workbench that includes all the tools necessary to get the job done right doesn’t require tens of thousands of dollars. However, there are several fundamental tools that every developer should have. These range from professional debug probes and logic analyzers to simple hand tools. Let’s look at what tools are needed and how to select them.

Selecting a debugger

The first and most important tool that a developer needs in their workbench is a debugger. A debugger behaves like a bridge between the host development machine, that contains application code, and the target embedded processor that will run that application code. The debugger serves several critical functions:

  • It takes the compiled and linked application and loads it into target memory.
  • It communicates to the target processor that it is connected and configures any on-board hardware debugging modules and capabilities.
  • It is responsible for setting both software and hardware break points.
  • It can be used to read registers and on-chip memory during the debugging process.
  • It receives real-time application trace information that can be used to debug an application.

In many instances, a developer simply chooses the lowest cost debugger they can find, or the default on-board (OB) debuggers that come with many development kits. The problem with this approach is that the OB debugger is very feature limited.

A great way to compare the differences between debuggers is to examine the debugging tools available from SEGGER. SEGGER J-Link-based OB debuggers can be found on numerous development kits from many different microcontroller vendors. The feature sets typical of the different J-Link OB devices for various targets are shown (Figure 1).

Image of sample feature sets of various SEGGER J-Link OBs

Figure 1: Sample feature sets of various SEGGER J-Link OBs that come with low-cost development boards. (Image source: SEGGER)

Note the three key speed characteristics on the far right end of the table: SWO speed, interface speed, and download performance. For the most part, these speeds are not more than 4 MHz, with most of the characteristics being significantly less.

At first glance these J-Link OB numbers may not seem so bad, given that they are free. However, that perspective changes when the features are compared to a fully featured debugger such as the J-Link Ultra+ or the J-Trace (Figure 2).

Table of Segger J-Link series of debuggers

Figure 2: The J-Link series of debuggers provides professional-grade debugging capabilities with speeds of up to 100 MHz. (Image source: SEGGER)

Notice that the minimum SWO speed is 30 MHz and goes up as high as 100 MHz. The SWO interface is used for debugging and also to receive some trace data. This speed increase, in addition to extra features such as unlimited break points and options for Ethernet and embedded trace buffer (ETB) tracing, make these debuggers extremely efficient tools. They are dramatically more powerful and feature-rich than the basic debuggers found on a development kit, and can help improve not just the programming speed but the time spent actually debugging a system.

Take the J-Link Ultra+. This is a fully-featured professional debugger that includes unlimited break points and extremely fast SWO and interface clock rates (Figure 3).

Image of Segger J-Link Ultra+ fully-featured professional debugger

Figure 3: The J-Link Ultra+ is a fully-featured professional debugger that includes unlimited break points and extremely fast SWO and interface clock rates. (Image source: SEGGER)

Developers who are looking to take their embedded workbench to the next level should consider the SEGGER J-Trace (Figure 4). The J-Trace not only supports the same capabilities as the J-Link Ultra+, but also can connect to target devices using the Arm Embedded Trace Macrocell (ETM) interface.

The ETM contains additional data communication channels that allow a developer to retrieve far more information about their application and how their microcontroller is operating. For example, a developer can use the ETM to perform code branch analysis and even perform instruction tracing.

Image of Segger J-Trace Pro

Figure 4: The J-Trace supports the ETM interface, which allows developers to perform instruction tracing on their application in addition performing code coverage analysis. (Image source: SEGGER)

Embedded system analysis tools

Once a developer has acquired a capable debugger, they will want to identify and select several tools that will assist in debugging and analyzing their system. On average, developers spend up to 50% of their development cycle debugging software. The more efficiently they can debug their system, the better.

There are several tools a developer should consider for analyzing their systems. These include a traditional oscilloscope like the B&K Precision BK2190E, which is a two-channel, 100 MHz scope, or the SparkFun Electronics Logic Pro 8 USB logic analyzer.  The Logic Pro 8 is good for analyzing general purpose input/output behavior, along with communication protocols. The analyzer can monitor up to eight channels simultaneously, with trigger capabilities for capturing on level, rising, or falling edges.

Image of SparkFun Logic Pro 8 USB logic analyzer

Figure 5: The Logic Pro 8 USB logic analyzer is a great tool for analyzing general-purpose input/output behavior along with communication protocols. (Image source: SparkFun Electronics)

General prototyping tools every bench needs

Even though software developers are not hardware engineers, it is still useful to keep a few tools around that can help review and manipulate hardware. The first indispensable tool is a set of jumper wires. Jumper wires always seem to be in short supply, and yet are necessary to connect external sensors or devices to development kits. A set of Bud Industries female-to-female jumpers and male-to-male jumpers are enough to cover all of the necessary combinations.

Image of Bud Industries female-to-female jumpers

Figure 6: Female-to-female jumpers (shown) and male-to-male jumpers are critical to rapid prototyping efforts and troubleshooting embedded systems. (Image source: Bud Industries)

In addition to the jumpers, it’s also useful to keep around a good pair of Aven Tools needle nose pliers and Apex Tool Group MS54V 4 inch semi-flush oval head wire cutters that can be used to place those jumpers into tight spaces, or cut them to create easy connects on a prototype board. Purchasing a high quality pair of tools will ensure they will be usable when you need them.

Finally, every developer should also have a magnifying lamp such as Aven’s 5 inch ProVue SuperSlim LED lamp to make it easier to read the silkscreen on a pc board. Software developers will use a magnifying lamp far less than a hardware engineer, but there are times when a quick modification needs to be made or extra small silkscreen on the board requires some magnification or extra illumination.

Tips and tricks for building your workbench

Putting together a workbench can at times seem obvious, but it is amazing how many teams don’t have the most basic supplies. Below are a few tips to help put together the “ultimate” embedded workbench:

  • Identify major bottlenecks in the development process and determine whether there is a tool that exists to alleviate it.
  • Purchase quality tools. Poor quality tools are replaced often as they wear out or are easily damaged. A good tool can last 20 years or more.
  • Don’t let price be the primary determining factor. A bit extra for a good tool is worth it in the long run.
  • Perform a cost/benefit analysis along with an ROI. When a tool will last five years or more, or shave months off a development cycle, it’s much easier to justify cost.
  • For low-cost tools that could be damaged, buy two so there is a backup on hand.
  • Build the workbench over time and in stages. Creating a professional workbench can cost thousands of dollars. Buying a few tools here and there can help spread out budgetary constraints.
  • Don’t be afraid to purchase used tools as long as they are from a known source that took good care of them.
  • For software debugging, a logic analyzer can do the job instead of an oscilloscope.

Conclusion

Building a productive and efficient workbench is not about going cheap. It’s about identifying and purchasing the right tools for job: the tools that will improve efficiency and remove roadblocks. Tools that will help improve the overall product quality and can even decrease developer stress (or at least the problems they encounter).

Evaluate carefully what tools will make the development process easier and determine whether those tools can be used for the long haul. If they can, don’t skimp out to make the bean counter happy. Buy the right tool and reap the rewards that come with a fully stocked and properly outfitted workbench.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Jacob Beningo

Jacob Beningo is an embedded software consultant who currently works with clients in more than a dozen countries to dramatically transform their businesses by improving product quality, cost and time to market. He has published more than 200 articles on embedded software development techniques, is a sought-after speaker and technical trainer and holds three degrees which include a Masters of Engineering from the University of Michigan. Feel free to contact him at jacob@beningo.com, at his website www.beningo.com, and sign-up for his monthly Embedded Bytes Newsletter.

About this publisher

Digi-Key's North American Editors