What I Wish I’d Known When I Was an Embedded Linux Newbie

This article is sponsored by Technologic Systems.

Here are some tips compiled from our seasoned engineers on what they wish they'd known about embedded Linux back when they were "newbs". Newcomers and seasoned veterans alike should get some good nuggets of information and possibly a fun perspective looking back at our own humble beginnings. We'll try not to overwhelm you as we make our way through the list. We're not here to rewrite the books, but we do want to provide a personal perspective. If you're in the camp of people who've been using desktop Linux, just be aware that embedded Linux is a different animal, especially when it comes to space constraints, different CPU architecture (ARM), resilience to sudden power outages and inability to install any mainline Linux kernel or distribution you please. Or, maybe you're in the microprocessor camp moving toward a more generalized and capable embedded Linux system. Either way, we'll assume you have at least some knowledge of Linux as we walk through this guide.

Getting Around

One of the first things you've probably already come to notice in an embedded Linux product is the lack of a nice desktop environment. No GUI here, my friend! Here, the command line is king. Just as you're probably very proficient with a mouse, you'll come to develop muscle memory to make you as proficient if not more using a keyboard. Right now, you're probably feeling more like this finger-typer here, and that's okay! We're here to tell you things are going to get better.

Serial Console (RS-232)

One of the first things you'll use is a serial console. Yes, "serial console" as in the archaic Microsoft Hyperterminal program to connect to your board to get a command prompt, or shell in Linux-speak. The serial console is the most trusted method of communicating with the board since it's not prone to network failure as is SSH and Telnet, plus you'll be able to see both startup and shutdown messages. For connecting via serial console, take a look at minicom (Linux/Mac/Cygwin) or PuTTY (Windows). A serial console must be configured to talk at the same rate of speed as the board you're connecting to. It seems the most common is 115200 Bps with no parity bit and no hardware or software flow control. This is what minicom setup (minicom -s) looks like on a Mac:

You'll need some parts for this: a null modem cable and a serial port on your computer. If you don't have one, you can get a USB to Serial converter.

Pro tip: resize (if available) is amazing for serial consoles that don't auto-grab the terminal size.

Understanding UARTS like RS-232, RS-485

It's advisable to brush up on your UART communication skills, since connecting to RS-232 serial console is much the same as connecting to a standard TTL-level UART or RS-485. The following are some resources that may help your understanding:

______________________