Inexpensive Ethernet JTAG Adapter with Raspberry Pi and OpenOCD

I recently wanted an ethernet JTAG adapter for a project I was working on. Unfortunately ethernet JTAG adapters can cost upwards of $300, and even then they can be specific to particular chipset and toolchains. However, were already using OpenOCD with ST-LINK/V2 programmers to communicate with out hardware, and it turns out that it’s very […]

Getting Started with MQTT

As more and more things around us become networked, the communication protocols tying them together need careful rethinking. This network of devices, sometimes called the “Internet of Things” or “Machine-to-Machine” network (though it could also just be called “the Internet”), includes many embedded devices with very limited resources. Protocols designed for typical ethernet networks, such […]

Shorten Board Bring-up with a Well-Designed Alpha Board

The board bring-up phase can be quite a challenge for embedded developers because it involves the first interaction between code and the physical components on the board. It’s the phase where you take an expensive paper-weight (the circuit running no application) and start to bring it to life. Challenges during board bring-up include: working with components […]

Affordable CAN Bus Tools that Won’t Break the Bank

The CAN bus is a simplistic, cheap, and robust interface that’s widely used for communications between microcontrollers but is a viable and cost-effective communications network for systems that are physically wired together. Vector Informatik GmbH has long dominated the space of CAN bus development/analysis tools, but the hardware and software offerings they provide are extremely pricey. This […]

High-Quality Font Rendering for Embedded Systems

Setting up high-quality font rendering in a memory-constrained embedded system sounds like it would be hard. However, like many other problems in embedded systems, this one has pretty much already been solved by game developers. It turns out that getting proper font rendering, with kerning and all, can easily be done in a day’s work. […]

Lightweight Indexing for Small Strings

Lately, I have been investigating performance improvements for heatshrink, my data compression library for embedded systems. Since it may be processing sensor data in real-time, or compressing data as it transfers over a network, compression can directly impact overall throughput. After experiments with string search and indexing algorithms, I’ve settled on a particularly effective method, […]

Comparing the Cost of Different Multiple-return Techniques in C

C’s design limits functions to directly returning at most one value. Unfortunately, there are many cases where returning more than one makes sense — returning a data buffer and its size, returning either a success code and data requested or an error code, splitting a tree node into two, etc. Making returning multiple values awkward […]

Tackle Your Bootloader First!!

Every embedded product I’ve worked on has required field update capabilities in order to deploy firmware upgrades. Unfortunately, the pressure to get a product to market can lead to bad practices like deferring non-customer-facing features, even if they are critical. It’s important to get key product features done — and sales, marketing, and management will […]