
Lightweight hardware abstraction
Some lessons are tougher than others to master. You would think that hard fought battles would be easier to remember, but sometimes it just does not work that way. Recently, I was asked to pick-up a project that had been managed by another employee. The project was yet another cost reduction project. The hardware group was tasked with updating a currently shipping product, to reduce the existing failure rate, while at the same time to remove cost from the...
Embedded Software Creation II - European Normative & Legislation
In this post I will explain the European Normative. I will answer the main questions and I will be open to answer all the doubts any of you could have. Please leave a comment and I will answer if i could.
Why I need to look and accomplish some standards?The main reason is if you want to comercialize the product in the European Union, if exists any European Directive that cover the product, the product must be marked with the CE mark. For USA it work in the same way by the...
C++ on microcontrollers 4 – input pins, and decoding a rotary switch
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.
So far I...
Modulation Alternatives for the Software Engineer
Before I get to talking about modulation, here's a brief diversion.
A long time ago -- 1993, to be precise -- I took my first course on digital electronics and processors. In that class, we had to buy a copy of the TTL Data Book* from Texas Instruments.
If you have any experience in digital logic design you probably know that TTL stands for Transistor-transistor logic (thereby making the phrase "TTL Logic" an example of RAS...
C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins
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.
In the first part of...
A true pioneer passes away... A farewell to Ritchie.
We all have our heroes. We all have people who were important to our professional developments. For me, Dennis Ritchie was one of those people. I was an early adopter of the C programming language. Back in the very early 80's a friend and neighbor had excitedly shared with me his copy of "The C Programming Language" by Kernighan and Ritchie. At first I was a non-believer. I had for several years been a happy and productive assembly language...
Using XML to describe embedded devices (and speak to them)
This article discusses one of the typical development cycles in embedded device and communication design and presents a possible, light weight solution using the free DClib/netpp framework.
The challengeAssume we're faced with the design of an embedded device, be it a simple SoC unit or a more complex, uC controlled engine with various attached peripherals. From first prototype to the market, the following development cycle is typically walked through:
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...
Kind of Buggy! The state machine fantastic//
Over the years, I have had the opportunity to experience a lot of different kinds of coding mistakes. There were many that most programmers are familiar with, counting errors, indexing errors (the infamous 'off by one' bug), memory space sharing errors (A threading issue) as well as numerous others. I ran into one recently that I wound up using an old trick to help find.
My current project is a Pan/Tilt camera that was, upon occasion, not homing properly in one axis. The camera is a...
Get your microcontroller and PC to talk
(and get it done free ‘n’ easy!)
The Need
Specifications can dynamically change during the product development cycle. Bosses/clients suddenly approach us with additional requirements, which, however simple, can put us in a fix. One such requirement could be to have a PC based design interface for a standalone microcontroller project.
On many occasions, the required PC software has to just behave like a slave...
“Smarter” cars, unintended acceleration – and unintended consequences
In this article, I consider some recent press reports relating to embedded software in the automotive sector.
In The Times newspaper (London, 2015-10-16) the imminent arrival of Tesla cars that “use autopilot technology to park themselves and change lane without intervention from the driver” was noted.
By most definitions, the Tesla design incorporates what is sometimes called “Artificial Intelligence” (AI).Others might label it a “Smart” (or at least “Smarter”)...
Introduction to Deep Insight Analysis for RTOS Based Applications
Over the past several years, embedded systems have become extremely complex. As systems become more complex, they become harder and more time consuming to debug. It isn’t uncommon for development teams to spend more than 40% development cycle time just debugging their systems. This is where deep insight analysis has the potential to dramatically decrease costs and time to market.
Defining Deep Insight Analysis
Deep insight analysis is a set of tools and techniques that can be...
Review: Prototype to Product
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,
Software is free and can right any wrong
Software changes are so much easier than hardware modifications, so the temptation is always to take this approach to fixing bugs. This may not always be a good idea.
Short Circuit Execution vs. Unit Testing
The key to effective communication is to say what you mean and avoid ambiguity. Words and phrases with multiple meanings can confuse your audience and hinder communication. That’s why so many programmers prefer writing code to writing specifications: written human language introduces ambiguity and subsequently, confusion. Code only has one interpretation, period. This doesn’t, however, ensure that the right message is getting through. Code can, indeed, only do one thing,...
Vala applications on Embedded Linux: maybe a clever choice [part 1]
Vala is a sexy, open source, high level programming language that appeared in 2006, it counts with a modern typing system, is object oriented, compiled and statically typed, it has a almost identical syntax to C# and is maintained by GNOME. The language was created as a power abstraction of the GLib and GTK libraries, two considerably lightweight and powerful libraries written in C, and it is used in projects such as GNOME Clocks, Shotwell, GXml and Elementary OS.
namespace...Building Linux Kernel for Desktops
Linux Development has made an amazing process in last decade. Different Linux Distributions come with specific tools which greatly ease down the build process for Linux Kernel.
Here is a good introduction to these build tools and build procedure for different Linux Distributions:
Favorite Tools: C++11 User-defined literals
In many software domains units of measurement are frequently critical to the software's data processing requirements. Those same units, or rather the use of the wrong units, are often the source of bugs and disastrous mistakes. Although useful for other purposes, user-defined literals are an excellent addition to the C++11 standard and handy when working with units of measurement.
Suppose a device measures velocity. To help prevent errors, the software specification requires...
Coding Step 2 - Source Control
Articles in this series:
- Coding Step 0 - Development Environments
- Coding Step 1 - Hello World and Makefiles
- Coding Step 2 - Source Control
- Coding Step 3 - High-Level Requirements
- Coding Step 4 - Design
When I first started out in programming, version control was not an introductory topic. Not in the least because it required a 'server' (ie, a computer which a teenaged me couldn't afford) but because it seemed difficult and only useful to teams rather than...
The Hardest Bug I Never Solved
I agreed to four hours.
Four hours to help hunt down and kill a bug. A terrible malicious bug that was eating away at this project, wreaking havoc upon the foundations of a critical feature, and draining time randomly from every one of eight firmware engineers on this project. Quite honestly, I can’t remember the last time it took more than an hour or two for me to locate, isolate, and fix a firmware bug. Surely I could help find and solve this issue within four...
Assembly language is best - except when it isn’t
A look at why writing in C often produces more efficient code than hand-written assembly language.
Building Linux Kernel for Desktops
Linux Development has made an amazing process in last decade. Different Linux Distributions come with specific tools which greatly ease down the build process for Linux Kernel.
Here is a good introduction to these build tools and build procedure for different Linux Distributions:
Parlez vous Fortran?
A look at the variety of programming languages that are [or have been] used for embedded and some thoughts on the future possibilities.
Zephyr: West Manifest For Application Development
In this blog post, I show a simpler way to create custom West manifest files. This technique eliminates the need to duplicate the complex West manifest from upstream Zephyr. I also show how we can use the West manifest to include out-of-tree board and SoC definitions, and include our own out-of-tree drivers.
Who needs source code?
Many developers feel that the supplying source code is essential for licensed software components. There are other perspectives, including the possibility of it being an actual disadvantage. Even the definition of source code has some vagueness.
Size matters - System success depends on initial design
Too many times during the initial phases of system design, opposing interests start fighting for valuable resources, sometimes without even knowing that they are. Case in point, a development project is starting up with a very simple product. For the user interface, Engineering wants to use a very simple character based LCD display and a couple of membrane switches, while Marketing wants a graphic display with a touch screen. The cost difference between these two items is...
Hello Android
Finally I could get Android Early SDK up and running on my Fedora Core-7 Machine.
The process was quite simple. However I had to struggle for a few days, because Fedora install the gnu version of Java and Android requires Java from Sun.
Here are the steps I had to follow:
(1) Install the eclipse IDE (if you do not have it already) with following command:
$> yum install eclipse-jdt eclipse-jdt-sdk (to be done as super user).
(2) now install the Android SDK and ADT plug-in for Eclipse...
C++ Assertion? Well Yes, But Actually No.
Assertions are a double-edged sword - on one side you enforce program correctness catching bugs close to their origin, on the other your application is subject to run-time error, like any interpreted language. This article explores what C++ can offer to get the advantages of assertions, without risking the crashes by moving contract checking at compile time.
Bringing up Baby - product development thoughts
Things have just started to get exciting. After months of defining, specifying and designing my latest product, I finally have semi-functional prototypes. After a few side steps during the building and bring-up process, power is applied and most of the low level functions have been verified. Soon, software will meet hardware and debugging can begin in earnest.
Before jumping in and really enjoying the fun (besides I'm now waiting for some new parts to arrive), I thought it would be nice to...
In the beginning, there was no code…
…and it was good.
Why is it that code starts out nice and deteriorates over time?
