Embedded Toolbox: Windows GUI Prototyping Toolkit
In this installment of my "Embedded Toolbox" series, I would like to interest you in the free Windows GUI Toolkit called QWin for prototyping, developing and debugging embedded C or C++ code on Windows.
If you work on devices with non-trivial user interfaces consisting of LCDs (segmented or graphic), buttons, LEDs, etc., QWin could be just the tool for you. It has improved my productivity in such projects dramatically. I personally consider it a gem in my "Embedded...
Embedded Toolbox: Programmer's Calculator
Like any craftsman, I have accumulated quite a few tools during my embedded software development career. Some of them proved to me more useful than others. And these generally useful tools ended up in my Embedded Toolbox. In this blog, I'd like to share some of my tools with you. Today, I'd like to start with my cross-platform Programmer's Calculator called QCalc.
I'm sure that you already have your favorite calculator online or on your smartphone. But can your calculator accept...
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...Basic hand tools for electronics assembly
Though the software tools vary with different microcontrollers, many hardware tools are the same.
Practical CRCs for Embedded Systems
CRCs are a very practical tool for embedded systems: you're likely to need to use one as part of a communications protocol or to verify the integrity of a program image before writing it to flash. But CRCs can be difficult to understand and tricky to implement. The first time I attempted to write CRC code from scratch I failed once. Then twice. Then three times. Eventually I gave up and used an existing library. I consider myself intelligent: I got A's...
Coding Step 3 - High-Level Requirements
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
If this series of articles has been light on one thing it's 'coding'. If it's been light on two things the second is 'embedded'. In three articles I haven't gotten past Hello World on a desktop PC. That changes (slowly) with this article. In this article I'll...
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...
Coding Step 1 - Hello World and Makefiles
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
Step 0 discussed how to install GCC and the make utility with the expectation of writing and compiling your first C program. In this article, I discuss how to use those tools we installed last time. Specifically, how to use GCC to compile a C program and...
Coding - Step 0: Setting Up a Development Environment
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
You can easily find a million articles out there discussing compiler nuances, weighing the pros and cons of various data structures or discussing the optimization of databases. Those sorts of articles are fascinating reads for advanced programmers but...
Project Directory Organization
A recent question on Reddit’s C Programming sub asked what sort of directory structure people use for their projects. Perhaps not unsurprisingly this didn’t elicit a flood of answers - maybe there are no organizational schemes that people are happy with or perhaps few people consider it a glamorous topic (not that the C Programming subreddit is filled with glamorous people -no offense I love you all). Personally I find it to be a very interesting topic. Organization and process are...
How to Include MathJax Equations in SVG With Less Than 100 Lines of JavaScript!
Today’s short and tangential note is an account of how I dug myself out of Documentation Despair. I’ve been working on some block diagrams. You know, this sort of thing, to describe feedback control systems:
And I had a problem. How do I draw diagrams like this?
I don’t have Visio and I don’t like Visio. I used to like Visio. But then it got Microsofted.
I can use MATLAB and Simulink, which are great for drawing block diagrams. Normally you use them to create a...
Code Metrics - SLOC Count
Many programmers will start having flashbacks at the title of this article because it contains the words 'metrics' and 'SLOC'. Newer programmers are probably wondering what all of the fuss is about - most probably have no negative connotations with the term 'code metrics' and some may not even know what SLOC is. While there is much baggage associated with metrics and SLOC you shouldn't be afraid to gather fundamentally useful data such as SLOC count from your programming projects...
3D printing for embedded development
Used mostly for creating little plastic objects, the desktop 3D printer is not an obvious addition to the embedded developer's toolbox. However, if you're looking for more reasons to get one, or already have one that's mostly gathering dust, here are a couple of embedded-related ways to get more value out of it.
STM32 VS Code Extension Under The Hood
VS Code is becoming the "go to" environment for many developers. Increasingly, toolchain providers are publishing VS Code extensions and ST has recently followed suit. Additionally, CMake is significantly growing in popularity, with many projects adopting it for its ease of use and flexibility. This video shows how the STM32 VS Code extension works under the hood and how to get more out of it.
Specifically, we'll review the CMake files generated by the VS Code extension and how to modify...
Using a RTLSDR dongle to validate NRF905 configuration
I am currently working on a system to monitor the garage door status from my flat. Both places are 7 floors apart, and I need to send the data wirelessly. I chose to operate on the 433MHz carrier, and I ordered 2 PTR8000 modules: http://www.electrodragon.com/w/NRF905_Transceiver_433MHz-Wireless_ModuleThe PTR8000 is based on the dual band sub 1GHz NRF905 chipset from NORDICSEMI: http://www.nordicsemi.com/eng/Products/Sub-1-GHz-RF/nRF905I...Basic hand tools for electronics assembly
Though the software tools vary with different microcontrollers, many hardware tools are the same.
Project Directory Organization
A recent question on Reddit’s C Programming sub asked what sort of directory structure people use for their projects. Perhaps not unsurprisingly this didn’t elicit a flood of answers - maybe there are no organizational schemes that people are happy with or perhaps few people consider it a glamorous topic (not that the C Programming subreddit is filled with glamorous people -no offense I love you all). Personally I find it to be a very interesting topic. Organization and process are...
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...
How to make a heap profiler
We'll see how to make a heap profiler. Example code for this post makes up heapprof, a working 250-line heap profiler for programs using malloc/free.
It works out of the box on Linux (tested on "real" programs like gdb and python). The main point though is being easy to port and modify to suit your needs. The code, build and test scripts are at github.
Why roll your own heap profiler?
- It's easy! And fun, if you're that sort of person. What, not reasons enough? OK, how...
Review: Modern Software Engineering
This is actually a review of 3 books by Dave Farley, because they really form a set:
- Modern Software Engineering: Doing What Works to Build Better Software Faster (just released for 2022, 224 pages)
- Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (co-authored with Jez Humble, 2011, 463 pages)
- Continuous Delivery Pipelines: How To Build Better Software Faster (2021,...
10 Items of Test Equipment You Should Know
When life gets rough and a circuit board is letting you down, it’s time to turn to test equipment. The obvious ones are multimeters and oscilloscopes and power supplies. But you know about those already, right?
Here are some you may not have heard of:
Non-contact current sensors. Oscilloscope probes measure voltage. When you need to measure current, you need a different approach. Especially at high voltages, where maintaining galvanic isolation is important for safety. The usual...
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...
How to Include MathJax Equations in SVG With Less Than 100 Lines of JavaScript!
Today’s short and tangential note is an account of how I dug myself out of Documentation Despair. I’ve been working on some block diagrams. You know, this sort of thing, to describe feedback control systems:
And I had a problem. How do I draw diagrams like this?
I don’t have Visio and I don’t like Visio. I used to like Visio. But then it got Microsofted.
I can use MATLAB and Simulink, which are great for drawing block diagrams. Normally you use them to create a...
How to make a heap profiler
We'll see how to make a heap profiler. Example code for this post makes up heapprof, a working 250-line heap profiler for programs using malloc/free.
It works out of the box on Linux (tested on "real" programs like gdb and python). The main point though is being easy to port and modify to suit your needs. The code, build and test scripts are at github.
Why roll your own heap profiler?
- It's easy! And fun, if you're that sort of person. What, not reasons enough? OK, how...
Basic hand tools for electronics assembly
Though the software tools vary with different microcontrollers, many hardware tools are the same.
Code Metrics - SLOC Count
Many programmers will start having flashbacks at the title of this article because it contains the words 'metrics' and 'SLOC'. Newer programmers are probably wondering what all of the fuss is about - most probably have no negative connotations with the term 'code metrics' and some may not even know what SLOC is. While there is much baggage associated with metrics and SLOC you shouldn't be afraid to gather fundamentally useful data such as SLOC count from your programming projects...
Continuous Integration for Embedded Systems
It is no secret that anyone who wants to streamline project management, reduce risk and improve the quality needs some form of "automation" in SW development processes. What is commonly used in most companies as a tool for such automation is called Continuous Integration (CI). It is a good practice for embedded systems as well even though it is much harder to use CI for embedded systems compared to pure software development because embedded systems mostly depend on...
Coding Step 3 - High-Level Requirements
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
If this series of articles has been light on one thing it's 'coding'. If it's been light on two things the second is 'embedded'. In three articles I haven't gotten past Hello World on a desktop PC. That changes (slowly) with this article. In this article I'll...
Project Directory Organization
A recent question on Reddit’s C Programming sub asked what sort of directory structure people use for their projects. Perhaps not unsurprisingly this didn’t elicit a flood of answers - maybe there are no organizational schemes that people are happy with or perhaps few people consider it a glamorous topic (not that the C Programming subreddit is filled with glamorous people -no offense I love you all). Personally I find it to be a very interesting topic. Organization and process are...
Simple Automated Log Processing
Text log data offers a wealth of information from an embedded system. At least during prototyping and development phases, most systems have some kind of serial log output, or use semihosting methods to log to a serial output channel in a debugger. Then you can capture the logs to a file.
The problem is that they tend to accumulate large volumes of data. Logs can be many thousands of lines long, especially when you run long duration tests. Finding information and evaluating trends in the...