Wednesday, December 31, 2008

Scilab for Embedded

 Scilab is an open-source mathematical package similar to Matlab. These applications are commonly used in embedded development to prototype DSP or control algorithms on a PC before porting them to the target hardware. There are several embedded projects using scilab.
"hArtes aims to lay the foundation for a new holistic (end-to-end) approach for complex real-time embedded system design, with the latest algorithm exploration tools and reconfigurable hardware technologies."
The Evidence Scilab/Scicos code generator uses a graphical interface to program a Microchip dsPIC DSC micro-controller board.

Monday, October 13, 2008

New FPGA Processor Embedded Linux Kit

This new evaluation kit from Altera includes a color LCD screen with touch panel and development tools for the NIOS II processor for only $449. Multiple demos can be run from an SD card including uCLinux and graphic GUIs for NIOS.

Thursday, April 3, 2008

Intel's New Embedded Processor

Intel launched a new processor for targeting high-end embedded products called the Intel Atom processor. This will be Intel's smallest and lowest power processor, but not a direct competitor to ARM processors which have lower power and cost. Intel's primary market for the new Intel Atom processor is mobile Internet devices (MIDS) and a new class of low end Internet computers and laptops. The Z5xx Series Atom processors are designed for embedded applications in markets such as automotive, medical, point-of-sale kiosks, industrial and gaming.

Tuesday, March 4, 2008

FTP Bounce Attacks in Embedded Servers

A potential security risk in the FTP protocol can complicate embedded systems designs. If your device implements an FTP server that strictly conforms to the FTP protocol (RFC 959), your system could be used to attack other hosts on the network. Strict FTP conformance in your product can also generate a security alert like this one for Canon multifunction printers.

The security vulnerability in FTP is known as the FTP bounce attack. If successful, it allows unauthorized access to a third party host using an intermediate FTP server (by misusing the PORT command). The attack will only occur if the intermediate server is configured to allow anonymous FTP access. There were valid reasons to allow third party access in the FTP protocol, such as sending a file from a server to a printer (FTP print server), or transferring between two servers remotely, so this security vulnerability will be present in any conforming FTP implementation.

The Canon printers in the alert already allowed you to disable anonymous ftp, or disable ftp altogether, but Canon still decided to provide a firmware upgrade through service centers that will implement a safer, but non-conforming FTP implementation. This is similar to what the OS vendors and open-source projects chose to do when the FTP bounce attack was first discovered in 1997. They still allow strict FTP conformance with a change in configuration, but the default is to prevent third party access.

Tuesday, February 26, 2008

Engineering Blunder Compromises Computer Security

It is well known that data stored in RAM is lost when the power is turned off. But unfortunately it was not well known how long it takes the RAM to be completely erased by power loss. A Princeton University study was able to read security keys out of memory from computers even after a reboot. You need to have physical access to a powered computer to attack in this way, but laptops that are locked or in sleep mode are vulnerable if stolen or left unattended.

There was no mention of the implication for embedded systems, but it is obvious that cell phones and PDA security needs to be re-evaluated. The embedded space may be ahead of the curve with security technology like ARM's TrustZone already available.

Thursday, February 21, 2008

Microsoft's New Portable Game Platform


Microsoft announced support for gaming on its portable music player, Zune, yesterday at GDC 08. You won't be able to start developing games for the device until the next version of Microsoft's game SDK is released in Spring 2008. With XNA Game Studio 3.0, you will be able to develop games targeted to a PC, Xbox 360, and now Zune. There has been speculation about gaming on Zune for some time because of its powerful processor and origins in the Microsoft Xbox team. A few caveats are that Zune will have a reduced API (reminds me of flash-lite), it will be some time before we see actual games released for Zune and according to a Zune team member at Microsoft, 'Zune is a wireless music and video player first and foremost.'

Tuesday, February 19, 2008

New Toy Touts ARM9

Leapfrog Enterprises is coming out with a new handheld gaming/learning platform called Didj. What is interesting to me is the detailed specifications they have published for the handheld. These are usually kept secret, but I think they are betting no one will come close this year for $89.99 list price.

  • ARM9 at 393MHz with 32MB 131MHz DDR RAM and 256MB NAND Flash
  • USB 2.0 PC connection
  • 320x240 16.7 million color TFT display
  • OpenGL ES 1.1 graphics API for embedded systems
  • Ogg vorbis audio codec (open source royalty-free alternative to mp3)
  • Theora video codec (same idea as Ogg Vorbis)
  • 16 Channel MIDI software synth
  • Multi-layer graphics controller
  • Proprietary Leapfrog OS called Brio

Update: The Didj is using embedded Linux according to embedded software consulting firm Cozybit. The San Francisco company was contracted to port embedded Linux to the Didj and perform system integration.

Interface Connects Real Guitars to Video Games


The popularity of video games like Guitar Hero and Rock Band should create a lot of demand for systems like Ediface that interface games to musical instruments. Although the MIDI interface can do this, and has been around for years, so far it has not been used in popular games. The best possible solution would be to use an an unmodified instrument like an electric guitar and connect that to the gaming system. Learning to play a real instrument while playing video games would be a great benefit. That is what the Ediface claims to deliver in a small wallet-sized unit. No word on processor or technology being utilized to do the signal processing.

Update: A new PC/MAC game called Guitar Rising is scheduled for release in late 2008 that will use only the computer mic input for an interface to any electric guitar. Not much detail on the web site, but some early prototype demos at game conferences look promising. We will have to see how the mic input compares to a dedicated hardware interface.

Wednesday, February 6, 2008

Embedded Systems Conference 2008

The 2008 Embedded Systems Conference Silicon Valley is coming up April 14. Early bird registration ends Feb 18th, but you can get a free pass to the exhibits, keynotes and sponsored sessions until April 9.

Monday, February 4, 2008

Google Code Search

Google has a new search engine for public or open source software, Google /* Code Search */. It has some nice features like regular expressions, programming language filters and license-type filters. I have used cross reference sites for code searches in the past, but those are only available for a few projects. For example, the Linux Cross Reference and the FreeBSD and Linux Kernel Cross-Reference.

Thursday, January 31, 2008

Check Your Math

How well do you trust the basic mathematical operations of your processor? Subtle math errors in code can allow access secure data. Even if you are not implementing a security algorithm, potential problems from basic mathematical errors can cause results that would seem impossible. There are methods to help prevent these problems:

  • Use asserts before any critical operations.
  • Test important (security) results for consistency.
  • Use a watchdog timer.
  • Check processor errata sheets (both for development and production versions).
  • Use mature, well tested math libraries.
  • Write unit tests for the mathematical sections of the code.
This all adds another layer of complexity to embedded system design, but that cannot be avoided with the increasing complexity and security of modern systems. So make sure to check your math.

Adding Math to List of Security Threats - NY Times Math Error Could Compromise Cryptographic Systems - Information Week

Wednesday, January 30, 2008

Using Google SketchUp for Electronics Projects

You might find Google's free 3D software, Google SketchUp, useful for your next hardware project. Here are a few examples from Google's 3D Warehouse design repository.
This single board computer model was created by special computing for an embedded computer board.

This Calao Systems Single Board Computer has a 200Mhz Atmel AT91SAM9263 ARM926EJ-S, 256MB flash, 64MB SDRAM, EEPROM, U-Boot, Linux 2.6, 4 USB ports, 1 programming/debug, 2 stacked host, 1 mini device, and an expansion connector (for I2C, Audio and Video).

It was pretty easy to for me to use SketchUp to manipulate the 3D model to see all of the components. You can also export any view as a 2D image or an animation to show customers your designs. It didn't take me long to create an animation once I learned the basic controls.

Here is another example of a 3D model created for a PCB layout.

Benford's Law

While updating my page of DSP links, I noticed a new chapter to The Scientist and Engineer's Guide to Digital Signal Processing about the solution to Benford's law. This phenomenon was first noticed in 1881 by Simon Newcomb, but the rediscovery by Frank Benford in 1938 gives it its name. Both noticed something odd about books containing tables of logarithms, pages with data with 1 as the first digit were worn more than pages with other digits. Benford found this type of pattern in a wide variety of data sets such as numbers in magazine articles and baseball statistics. It seemed that the data should be random and the first number would have an equal probability to be any digit between 1 and 9, or 11.1% for each. In fact, the pattern of leading digits fits a logarithmic distribution, with 1 having a 30.1% probability.

This phenomenon was observed but not understood until recently, and that gives it the connection with DSP. A proof can be constructed using signal analysis techniques, in particular convolution, the Fourier transform and homomorphic processing. See Steven Smith's new chapter for details, but you might not need mathematics to understand the mystery. According to Smith, the key is to realize that we are transforming the data when we extract the first digit. Since it so easy to see the first digit, we do not realize that we are performing any operation on the data. This operation is taking the anti-logarithm of the data, and that gives the logarithmic pattern to the leading digits. Wikipedia has a few other explanations as well, but I think there is a counterexample that is much easier to understand:

If we assume that a random event has a random leading digit, then we are saying that a number with a leading 1 has an 11% probability. That would be true if we had a single die with 9 sides. Any of the sides would correspond to a different leading digit, but what about a die with 20 sides? There are 11 digits that would start with 1 out of the 20 for a 55% probability of a 1. For an average 7 sided die, it would be 14%. In fact, I think you will find it would never be less than 11% for any number of sides, but we find many cases where it is greater than 11%. So for data that can have any value between 1 and N, the probability of a 1 must be greater than 11%.

This is not a complete proof, and even if true, the counter-example does not address events like the roll of two or more die, or fractional data, but it is enough to remove my initial disbelief in Bedford's law. If books with tables of numbers are worn the most on pages with data that has a leading 1, it could just be that the type of data being analyzed follows this 1 to N pattern. I would imagine that many types of data sets have this property.

For more information about Bedford's law I recommend the pages on Mathworld and Wikipedia. It was also featured in the episodeThe Running Man, of the TV show NUMB3RS.

Friday, January 11, 2008


Welcome to my blog about embedded systems development. In this first post I would like to tell you a little about myself and what I plan on writing about in the future. I encourage your comments on this blog and hope that I can use it to collaborate with my embedded systems colleagues.

I have been developing embedded systems since 1995, at a number of companies, both small and large, and on a variety of products. These include consumer, defense, and industrial products such as toys, computer peripherals, networking hardware and communication equipment. I really enjoy designing new products and bringing them to fruition. I am now practicing as an independent consultant, continuing to work on innovative and challenging product development.

In my career I have worked with many great people, and been part of some terrific development teams. I hope some of my former coworkers get a chance to visit and possibly contribute to this site. I have learned a lot from them and I'm sure others could benefit from their insight as well.

In the past I have worked mostly on the embedded software side of the engineering team, but I always worked very closely with the hardware developers in design reviews and system debugging. More recently, I have been developing my own hardware designs. I think hardware/software co-design is extremely important in embedded systems development and I plan on covering this topic. I would also like to explore development team structures and project management.

In summary, I would like the embedded coding blog to be a place to share my development experiences and knowledge, keep up with new technologies and discover some best-practices with the help of my readers. Some of the topics I would like to discuss include embedded microprocessors, development tools, network programming, system architecture, test equipment, system testing, and version control. Please feel free to e-mail me at with any suggestions to improve this site.