## Review: Modern Software Engineering

December 27, 20211 comment

This is actually a review of 3 books by Dave Farley, because they really form a set:

## VolksEEG: Rust Development On Adafruit nRF52840 Feather Express

December 13, 2021
Contents:

## Working With ESP-C3-32S-Kit Dev Board

November 24, 20211 comment
Contents:

## Learning Rust For Embedded Systems

November 12, 2021
The Motivational Portion

Based on recommendations from Kevin Nause, the VolksEEG project is considering using Rust as the embedded system programming language. So I've been off on a tear skimming books and e-books and watching videos at 2x to evaluate it.

My conclusion? Do it!

Most of the rest of us participants are primarily C/C++ embedded developers. I had previously been sensitized to Rust for embedded systems by

## Six Software Design Tools

November 5, 20211 comment
Contents: Introduction

Here are six tools to help you with software design. The first two are very simple, almost deceptively trivial, while the last four are more involved. They apply universally, to all types of software, all types of systems, and all languages. This is part of good engineering discipline.

At face value, this is just a bunch of acronyms,...

## Introducing The VolksEEG Project

October 31, 2021
Introduction

The VolksEEG project is an open-source project with the goal of creating an electroenchephalogram (EEG) machine, fully cleared by the FDA for standard clinical use. All designs will be freely available for others to manufacture.

The project was founded by Alan Cohen, a medical device systems engineer with an electrical engineering/software (EE/SW) background in Boston, USA, and Dr. Bryan Glezerson

## Video-Based STEM Embedded Systems Curriculum, Part 2

October 25, 2021
Contents: Introduction

This post continues from part 1. It contains the first three lesson plans.

Lesson Plan 1: Introducing Arduino

This lesson is first because Arduino is the simplest programming environment, yet allows lots of interaction with hardware. In...

October 24, 2021
Contents:

## Review: Prototype to Product

October 16, 2021

Prototype to Product: A Practical Guide for Getting to Market, by Alan Cohen, is a must-read for anyone involved in product development, whether in a technical, management, or executive role.

I was reminded of it by Cohen's recent episode on Embedded.fm, 388: Brains Generate EMF, which is worth listening to a couple times through, especially if you're interested in medical device development. And in fact his first episode there,

Contents

## Analyzing the Linker Map file with a little help from the ELF and the DWARF

When you're writing firmware, there always comes a time when you need to check the resources consumed by your efforts - perhaps because you're running out of RAM or Flash or you want to optimize something. The map file generated by your linker is a useful tool to aid in the resource analysis. I wanted to filter and sort the data generated in an interactive way so I wrote a C# WinForms application that reads the data from the map and presents it in a list view (using the awesome

## Understanding and Preventing Overflow (I Had Too Much to Add Last Night)

December 4, 2013

Happy Thanksgiving! Maybe the memory of eating too much turkey is fresh in your mind. If so, this would be a good time to talk about overflow.

In the world of floating-point arithmetic, overflow is possible but not particularly common. You can get it when numbers become too large; IEEE double-precision floating-point numbers support a range of just under 21024, and if you go beyond that you have problems:

for k in [10, 100, 1000, 1020, 1023, 1023.9, 1023.9999, 1024]: try: ...

## Chebyshev Approximation and How It Can Help You Save Money, Win Friends, and Influence People

Well... maybe that's a stretch. I don't think I can recommend anything to help you win friends. Not my forte.

But I am going to try to convince you why you should know about Chebyshev approximation, which is a technique for figuring out how you can come as close as possible to computing the result of a mathematical function, with a minimal amount of design effort and CPU power. Let's explore two use cases:

• Amy has a low-power 8-bit microcontroller and needs to compute $\sqrt{x}$...

## Using the Beaglebone PRU to achieve realtime at low cost

Introduction

I work as an engineer in a synchrotron facility. A few weeks ago, I helped the people in charge of the power supply developments to integrate a realtime control algorithm on a prototype platform: a BeagleBone Black (BBB) running Linux. I had already worked with this board in the past, and I found it very interesting given its excellent resources versus price ratio (around 40 euros). This time, I was impressed by its realtime capabilities. I thought it would be a good idea to...

## Coroutines in one page of C

A coroutine is a function that you can jump back into after returning from it - and it remembers where it was in the code, and all the variables. This is very useful at times.

One use is generating a sequence of values. Here's how you can generate all the x,y pairs in a 2D range in Python:

def iterate(max_x, max_y): for x in range(max_x): for y in range(max_y): yield x,y for x,y in iterate(2,2): print x,y

This prints:

0 0 0 1 1 0 1 1

The yield keyword is like...

## Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence

There are literally hundreds, if not thousands, of subtle concepts that contribute to high quality software design. Many of them are well-known, and can be found in books or the Internet. I’m going to highlight a few of the ones I think are important and often overlooked.

But first let’s start with a short diversion. I’m going to make a bold statement: unless you’re a novice, there’s at least one thing in computer programming about which you’ve picked up...

## C++ on microcontrollers 1 - introduction, and an output pin class

This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers.  Reader input is very much appreciated, you might even steer me in the direction you find most interesting.

I am lazy. I am also a programmer. Luckily, being a lazy...

## 10 Software Tools You Should Know

Unless you're designing small analog electronic circuits, it's pretty hard these days to get things done in embedded systems design without the help of computers. I thought I'd share a list of software tools that help me get my job done. Most of these are free or inexpensive. Most of them are also for working with software. If you never have to design, read, or edit any software, then you're one of a few people that won't benefit from reading this.

Disclaimer: the "best" software...

## Using the C language to program the am335x PRU

Introduction

Some weeks ago, I published an article on how we used the PRU to implement a power supply control loop having hard realtime constraints:

//www.embeddedrelated.com/showarticle/586.php

Writing this kind of logic in assembly language is not easy. First the assembly language itself may be difficult to learn depending on your background. Then, fixed and floating point arithmetics require lot of code. While macros help to handle the complexity, they still are error prone as you...

## Zebras Hate You For No Reason: Why Amdahl's Law is Misleading in a World of Cats (And Maybe in Ours Too)

February 27, 20171 comment

I’ve been wasting far too much of my free time lately on this stupid addicting game called the Kittens Game. It starts so innocently. You are a kitten in a catnip forest. Gather catnip.

And you click on Gather catnip and off you go. Soon you’re hunting unicorns and building Huts and studying Mathematics and Theology and so on. AND IT’S JUST A TEXT GAME! HTML and Javascript, that’s it, no pictures. It’s an example of an