Tag Archives: embedded systems

Debugging (David Agans)

I recently saw David Agans’ book Debugging mentioned in one of the many trade journals I receive (I can’t remember which one).  After seeing how much praise it received on amazon.com, I decided to pick up a copy.

Debugging really spoke to me because a large portion of my career has been devoted to finding and fixing hardware bugs.  I finished it in just two or three evenings (it’s a quick, fun and engaging read).  The examples are particularly interesting and relevant to me because many involve issues with embedded systems.  Admittedly, perhaps most fascinating is the one about a living room lamp that turned on anytime the author vacuumed the room.

I highly recommend this book to anyone who regularly  troubleshoots issues with any kind of system, software or hardware, mechanical or electrical.  This includes engineers of all discplines, circuit designers, computer programmers, helpdesk operators, web developers, auto mechanics, etc.

David’s nine rules of debugging are (with my notes):

  1. Understand the system – Knowing how your circuit, code, or widget is supposed to work will help you fix it.  Read the manual!
  2. Make it fail – Knowing how to reproduce the failure is critical to being able to fix it.  Also, stimulate the failure, don’t simulate it.
  3. Quit thinking and look – Don’t jump to conclusions and just fix what you think might be the problem.  This wastes time when you inevitably guess wrong.  Keep an open mind as to what the failure mechanisms could be.
  4. Divide and conquer -Eliminate what is definitely not part of the problem and focus on what’s left.
  5. Change one thing at a time – If you change ten things at once, how will you know which one actually solved the problem?
  6. Keep an audit trail – Being able to reproduce the fix is crucial.  Even if you don’t fix the problem, you might discover a pattern or something you overlooked by looking at your notes.
  7. Check the plug – When all else fails, check the obvious stuff that you probably should have looked at first.
  8. Get a fresh view – Someone else may have more experience with the problem than you do or might see the one thing you’re missing.
  9. If you didn’t fix it, it ain’t fixed. –  Don’t stop when the problem just disappears.  It will surely come back later at the most inconvenient time possible.  We’ve all been bitten by this one before.  Never again!

There’s even a free poster available on the book’s website to help you remember these rules during your next debugging crisis.

ESC Beagle Board Class Wrapup

This week I attended the Build Your Own Embedded System (BYOES) classes at ESC 2009.

The BYOES classes were primarily focused on the Beagle Board, an ARM Cortex-A8 based single board computer developed by engineers at Texas Instruments.

When I picked up my conference registration on-site, I also received a Beagle Board dev kit which included a 2GB SD card, a Class 1 Bluetooth USB adapter, and a tiny box containing a brand new Rev C2 Beagle Board.  This was pretty exciting, given that the C2 boards haven’t even hit Digikey yet, making me one of a select group to have a C2 board!

Here’s a photo of the kit as provided by ESC.

Rev C2 Beagle Board

The classroom was full of LCD monitors, keyboards, mice, and USB hubs – but no computers.  This is where the Beagle Board comes in.

ESC Beagle Board Class

The first step was to plug the peripherals into the board, as shown below.  The HDMI interface for the LCD is at the upper right of the board, while the SD card and USB host port is on the left.  The bottom of the board has a DC power jack and the USB OTG port which we used later.  The whole board is actually powered via USB – the other end of the cable with the DC plug goes into the USB hub, and the hub powers everything.  Pretty cool.

Rev C2 Beagle Board running Android

The classes were fantastic.  I saw lots of really impressive demos, including some really neat 3D graphics using the onboard OMAP35x SGX 2D/3D graphics accelerator.

I particularly enjoyed the Monday morning class, led by Beagle Board designers Jason Kridner and Gerald Coley.  Jason gave an overview of both the impressive feature list of the board and the large development community behind beagleboard.org.  Gerald talked about the hardware development process, including some of the difficulties with the OMAP3 processor, which uses PoP technology.  The system memory chip is soldered to pads on top of the CPU, which is then soldered to the PCB.  Not surprisingly, this process took some optimization to get right.

Some observations:

  • While the Beagle Board was developed by engineers at Texas Instruments, TI does not officially support the board, which is more of a technology demonstration.  Instead, people using the board can go to the beagleboard.org community for support, where there is a vibrant community of volunteer developers.
  • The philosophy behind the hardware is “Bring your own”.  The board contains a minimum set of peripherals and you attach what you want.  Apparently most eval boards contain a lot of features people never use (cameras, wireless interfaces, etc.) and tend to force desigers into using only the “supported devices”.
  • The hardware is open source.  You can download gerbers, Allegro files, schematics, etc from their site.  (Sadly, no Eagle files, although the 6 layer PCB wouldn’t be supported by the cheap/free versions of the Eagle anyway.)    You can develop products based on the Eagle board and just stick copies of the design into your own PCB, or develop your own design.
  • The Beagle Board is not recommended/supported for use in production hardware.  It’s for evaluation only.  If you develop a product, you’re supposed to handle your own PCB builds, etc.  The good news is, you can call up their contract manufacturer (CircuitCo) directly and get a batch of Beagle Boards made if you want to use the hardware as-is.
  • The communiy is very good about having mutliple avenues for discussion and collaboration.  They are leveraging lots of old and new technologies: IRC, a wiki, a mailing list, delicio.us social bookmarking, RSS, etc etc etc.  All of these are accessible from beagleboard.org.

You can download the class slides and an SD card image at http://beagleboard.org/esc

Lastly, the Beagle Board runs Android.  It also runs Linux distros like Angstrom and MontaVista, among others!

Rev C2 Beagle Board running Android

ESC Silicon Valley 2009

ESC blasts off next week at the McEnery Convention Center in San Jose.

This year, ESC features the Build your own Embedded System course, where a $595 registration gets you a Rev C Beagle Board (with working USB host mode!) and two days of classes about developing applications with the board.  I have heard a lot of buzz about this (even on local radio here in SF!) so I expect the classes with be jam packed.  If you haven’t heard of it before, the Beagle Board is a 3″ square 600Mhz ARM Cortex A8-based computer with a lot of fancy features such as DVI-D output.

Online registration closes today, so hurry up and register if you plan on attending!

You can keep up to date with the conference by following @esc_events on twitter.

Update: Screaming Circuits has a 50% discount code on their website!  Thank you, Screaming Circuits!