UML Statechart tip: Handling errors when entering a state
This is my second post with advice and tips on designing software with UML statecharts. My first entry is here.
It has been nearly 20 years since I first studied UML statecharts. Since that initial exposure (thank you Samek!), I have applied event driven active object statechart designs to numerous projects [3]. Nothing has abated my preference for this pattern in my firmware and embedded software projects. Through the years I have taken note of a handful of common challenges when...
Examining The Stack For Fun And Profit
Well, maybe not so much for profit, but certainly for fun. This is a wandering journey of exploration and discovery, learning a variety of interesting and useful things.
One of the concerns with an embedded system is how much memory it needs, known as the memory footprint. This consists of the persistent storage needed for the program (i.e. the flash memory or filesystem space that stores the executable image), and the volatile storage needed to hold the data while executing over long...
So You Want To Be An Embedded Systems Developer
Contents:- Introduction
- What's An Embedded System?
- Hobbyist vs. Professional Hardware
- The Primary Resources
- Some Advanced Resources
- Some Hardware
- Glossaries
- Other Links
- Final Thought
A brief overview of flight control software
It has been a long time since the first drones appeared. If you are interested in such a topic, you may be confused about how and where to jump in. Since I went through the same phase, I'd like to write my findings here and help others.
For this blog post, I've created chart and table with all open source flight control programs I've been able to find.
The chart shows the course of development of the existing software. It is separated in years and you can see when which project...
Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Tenderfoot: Recommended Reading
Twenty years ago I read Code Complete by Steve McConnell. And then read it again. And again. And again. Of all the books I have read during my career, I believe this was the book that catapulted me from a young electrical engineer to a young and aspiring embedded software engineer. So to all the ‘tenderfoots’ embarking upon an embedded systems and especially embedded software and firmware career, this entry is for you.
First, I would certainly recommend that all engineers read and read...
Tenderfoot: Introduction to Magic (Numbers that is...)
Once upon a time, while participating in a source code review, I stumbled across the following C code in a header file:
struct Foo { //various structure fields char string_buffer[45+3]; //buffer requires about 45 bytes };My right eyebrow raised, I took a note, and continued with the code review, only to later stumble into this line of code in the body of a C function:
char * temp_string_buffer = (char*) malloc(45+3);Again, I took a note on this function, and continued...
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...
Levitating Globe Teardown, Part 2
Part 1 of this article was really more of an extended (and cynical) product review. In this part of the article, I actually take things apart (sometimes a bit more suddenly than I meant to) and show you some innards.First the globe. I knew there was a magnet in there someplace, because it's obviously plastic and it also attracts metal. I had intended to gently part the globe at the glue bond along the equator. I started by trying to gently flex the thing on my work...
Levitating Globe Teardown, Part 1
I've been kicking some ideas around for a long time for a simple and inexpensive platform I could use for control systems experimentation for the beginner. I want something that can be controlled easily in a basic fashion, yet that provides some depth: I want to be able to present ever-more challenging goals to the student, that can be attained by fancier control algorithms all on the same device.
I'm currently looking at magnetic levitation. It's fun, it has the potential to be...
C++ on microcontrollers 2 - LPCXpresso, LPC-link, Code Sourcery, lpc21isp, linkerscript, LPC1114 startup
previous parts: 1
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 teach my students that...
Embedded Systems - free EdX course by UT-Austin!
I was very excited to see that there will be an Embedded Systems class available for free at https://www.edx.org/course/utaustin/ut-6-01x/embedded-systems-shape-world/1172
It's free to sign up and take the online class at the EdX website.
More exciting is that the class is based on a TI Launchpad Tiva microcontroller development board. The Tiva Launchpad features an 80-MHz ARM Cortex M-4 MCU with 256 KB of flash storage, 32 KB of RAM and 43 general purpose I/O pins.
VolksEEG Project: Initial Hardware Architecture
The initial hardware architecture for the prototype VolksEEG uses an Adafruit Feather nRF52840 Sense, which connects to a PC via USB for UI (User Interface). Through several additional chips, this provides power to and acquires data from the ADS1299 ADC.
An important topic I mentioned in my introduction to the project is isolation, ensuring there is no conductive path for current through the patient. The architecture is therefore split into...
Tenderfoot: Embedded Software and Firmware Specialties
Once upon a time (seven years ago) I answered a question on Stack Overflow. Then Stephane suggested I turn that answer into a blog post. Great idea! This post dives deeper into the original question: “Is it possible to fragment this field (embedded software and firmware) into sub-fields?”
This post represents a detailed and updated response to my original Stack Overflow answer. I hope this post provides guidance and useful information to the “tenderfoots” in the...
Introducing The VolksEEG Project
IntroductionThe 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
I owe, I owe, so off to work I go.....
The economy hit my start-up plans pretty toughly. My step-daughter and I were working out of a common pool of money (our savings account), and in the end, she won out. She is in her third year at San Jose State and with rising tuition and student housing costs, etc., money was beginning to get a little tight in our savings account. So, I did the right thing, I got a paying job. My initial plan was to find some consulting work to bring in some money, but this...
A Sneak Peek at the 2024 Embedded Online Conference
The embedded systems industry is evolving at a rapid pace. Just a few years ago, most embedded products were disconnected systems that used bare-metal scheduling techniques. Today, the drive to connect devices and add intelligence at the edge is revolutionizing how we build embedded products. The only way to stay current and not get left behind is to learn and network with colleagues and industry experts continuously.
This year, the 2024 Embedded Online Conference is...
Video-Based STEM Embedded Systems Curriculum, Part 2
Contents:- Introduction
- Lesson Plan 1: Introducing Arduino
- Lesson Plan 2: Circuit Drawings With Fritzing
- Lesson Plan 3: Basic Electronics
- Coming Soon
This post continues from part 1. It contains the first three lesson plans.
Lesson Plan 1: Introducing ArduinoThis lesson is first because Arduino is the simplest programming environment, yet allows lots of interaction with hardware. In...
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 brief overview of flight control software
It has been a long time since the first drones appeared. If you are interested in such a topic, you may be confused about how and where to jump in. Since I went through the same phase, I'd like to write my findings here and help others.
For this blog post, I've created chart and table with all open source flight control programs I've been able to find.
The chart shows the course of development of the existing software. It is separated in years and you can see when which project...
Tenderfoot: Introduction to Magic (Numbers that is...)
Once upon a time, while participating in a source code review, I stumbled across the following C code in a header file:
struct Foo { //various structure fields char string_buffer[45+3]; //buffer requires about 45 bytes };My right eyebrow raised, I took a note, and continued with the code review, only to later stumble into this line of code in the body of a C function:
char * temp_string_buffer = (char*) malloc(45+3);Again, I took a note on this function, and continued...
Moulding the Embedded Systems Engineers of Tomorrow: Adapting to a Constantly Transforming Technological Terrain
Embedded systems engineers, previously focused on device architecture, are now steering the digital era, encompassing firmware, software, complex silicon, and cloud computing. To keep pace, mastery in new areas like cybersecurity, artificial intelligence (AI), machine learning (ML), and cloud technologies is critical. In today's highly connected world, security is foundational to design, necessitating knowledge in encryption, secure coding, and data protection laws. Additionally, expertise in AI and ML is essential for managing vast global data, requiring understanding of ethical implications and effective system design for data analysis. The advent of cloud technology mandates learning about cloud architectures and data security. In this fast-paced field, continuous learning and adapting these new skills is the key to staying relevant and spearheading future advancements.
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...
Three more things you need to know when transitioning from MCUs to FPGAs
Take a look at three more important difference between FPGAs and MCUs: "code reuse" vs templating, metastability and blocking vs. non-blocking operations.
Learning From Engineering Failures
Contents: IntroductionI'm an informal student of engineering failures. They guide a lot of my attitude and approach towards engineering.
This is rooted in two of my favorite quotes:
- George Santayana: Those who do not remember the past are condemned to repeat it.
- Louis...
Introducing The VolksEEG Project
IntroductionThe 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
My Guiding Principles As An Engineer
These are my guiding principles as an embedded systems software engineer, forged over 40 years of experience. They shape the way I work and approach problems, and maintain my attitude in the face of adversity.
You may find them useful as well, whether working as a developer, a manager, or an executive, alone or on a team, when things are going well, and when they aren't.
They're a combination of favorite quotes and my own bits of derivative wisdom I've sprinkled...
Embedded Developers, Ditch Your IDEs – Here’s Why!
Ditching your Integrated Development Environment (IDE) temporarily can be a transformative learning experience in embedded development. This post invites you to explore the underpinnings of IDEs by delving into alternative tools and processes like Makefile, CMake, Vim, GDB, and OpenOCD. Understanding these tools can demystify the background operations of IDEs, revealing the intricacies of compiling, linking, and debugging. This journey into the “under the hood” aspects of development is not just about learning new tools, but also about gaining a deeper appreciation for the convenience and efficiency that IDEs provide. By stepping out of your comfort zone and experimenting with these alternatives, you can sharpen your skills, enhance your knowledge, and possibly discover a more tailored and streamlined development experience. Whether you're a novice or a seasoned developer, this exploration promises insights and revelations that can elevate your embedded development journey.
Tracing code and checking timings
Debugging resource limited systemsApplications writers that write code on large systems have it easy. Well, perhaps not easy, but certainly easier. There are some things that they don't have to worry about and there is a huge array of tools available to them when it comes time to debug. The have choices in their toolsets, lots of choices. They also have a large selection of available methods for getting debugging information out to them such as log files, proc entries, pop up dialog boxes or...