
Updates in Embedded Hardware Software Development Tools
It’s been said that if all you have is a hammer, everything starts to look like a nail. For maximum efficiency and effectiveness in any skilled profession, it is essential to have access to the appropriate tools. The same holds true for developing embedded systems. In contrast to the sophisticated and up-to-date features offered by desktop, web, and mobile development tools, embedded development tools have lagged behind until recently. In addition, microcontroller and FPGA programming has traditionally necessitated the use of proprietary software and expensive hardware programmers/debuggers. To some extent, the recent trend toward more open source ecosystems (such as the RISC-V microprocessor, the Arduino IDE, etc.) has improved the reliability and accessibility of many embedded development tools. Here we take a look at some of the software advancements that have already begun to drastically alter the way embedded system developers work:
1. Integrated Development Environment (IDE)
Many programmers are tempted to use lightweight text editors like Vim or Nano on Linux because of their ease of use. They don’t weigh much and are preinstalled on the vast majority of Linux distributions. However, the advanced features of today’s code editors and IDEs are very appealing to embedded developers. Furthermore, many makers of embedded hardware provide integrated development environments (IDEs) tailored to their particular families of microcontrollers. Access to support libraries for external components, templates for multiple microcontrollers, and examples to help developers get started with new hardware are just a few of the benefits offered by IDEs that are focused on a specific manufacturer.
2. Version Control Tools
The creation of new software is a never-ending process. In addition, creating cutting-edge embedded systems typically takes a team of programmers working together. Embedded systems are typically a part of a larger software ecosystem, so an embedded developer will likely need to collaborate with mobile or web developers. Tools for version control, such as Git, allow developers to keep track of code changes over time. GitHub and GitLab are two popular cloud-based repositories of source code and other design files. Using a version control tool allows you to do things like manage versions, organize releases, and report bugs. There are, however, a few drawbacks. Developers sometimes inadvertently leave usernames, passwords, or encryption keys in the commits they push to publically available repositories, and this has made them a part of cybersecurity attack chains. Criminals then mine these databases for this data to use in their malware campaigns.
3. Debugger
The cost of hardware for debugging microcontrollers has traditionally been high. Plug an In-Circuit Emulator (ICE) into the microcontroller port of your larger system to simulate its behavior. They provide debugging features like register and memory access, conditional breakpoints, and trace buffers while still allowing the firmware to execute in real time. In-Circuit Debuggers, which are less expensive and more common, are a better option (ICD). The In-Circuit Serial Programming (ICSP) protocol requires a device to be placed between the developer’s desktop and the target microcontroller to facilitate debugging. Some newer microcontroller boards come with on-board ICSP debugging hardware, which can be accessed via a USB connection between the board in question and the developer’s PC. The preferred IDE for a given development board is usually where debugging features are managed.
4. Linter
We always use a spell and grammar checker after completing a draft of an article or report. A linter is analogous to a grammar checker, but for computer code. Errors in style, configuration, project structure, and library dependencies can all be spotted by a linter because it analyzes the source code statically (before compilation) rather than dynamically (while the machine code is running on the target device). These mistakes can have a wide range of effects, from making the code unreadable to stopping the compilation process altogether.
5. GitHub Copilot
Code editors have included auto-completion for years. As a programmer types, auto-complete provides suggestions for relevant keywords and variable names, allowing them to save time and effort. Copilot, a plug-in for Visual Studio Code developed by GitHub, is an artificial intelligence (AI)-based code completion tool that revolutionizes auto-complete. Copilot will analyze the name of a developer’s function and suggest the full set of instructions needed to call that function. Say, for instance, you jot down the following:
To put it simply, Copilot is an artificial intelligence (AI) teammate that can aid in software development by providing at least a baseline for function definitions. Copilot’s output code still requires human inspection and, if necessary, correction, just as it would with any other automation tool.
6. HTTP and API Examination Tools
Connectivity to a network or the Internet is becoming standard for embedded devices (i.e., IoT devices). Unfortunately, it’s likely that the web app developers are working on new code at the same time as the embedded development team. Embedded developers can use tools like Postman to inspect and test HTTP request methods (like PUT, POST, and GET) and API requests separately from the firmware. Therefore, API problems can be investigated without touching the embedded hardware, guaranteeing that any problems are attributable to the API and not the firmware or hardware.
7. Packet Inspection Tools
While tools for inspecting protocols like HTTP and APIs that are geared toward developers are great for high-level debugging, there are times when a more detailed inspection of the packet level is required, or when a different protocol, like Zigbee, must be examined. When this occurs, a packet inspection tool like Wireshark is required. Numerous packet-based communications protocols are accessible for analysis and recording with Wireshark.
8. Software-based Logic Analyzers
Software-based tools are becoming increasingly popular among developers in place of bulky hardware-based oscilloscopes and logic analyzers when troubleshooting devices. Most software-based tools have a desktop application interface and are connected to a computer via USB. The Saleae Logic Analyzer is a common low- to medium-tier logic analyzer. To a field technician, the benefits of these software-based tools are clear. By taking analysis that was previously only possible in a laboratory, they improve the efficiency with which deployed devices are inspected and fixed when they malfunction. An important benefit of a software-based analyzer is that you can write your own protocol analyzers for bespoke communications protocols, in addition to the standard protocols supported (such as I2C, SPI, serial).
9. Secure Shell (SSH) Terminal Client
In order to perform certain maintenance tasks on more robust embedded systems running an operating system and providing shell access for remote management, it will likely be necessary to SSH into a device. Or it may be necessary to remotely login into a server that multiple IoT devices communicate with and make changes to backend services. Accessing systems remotely is essential, and SSH terminal clients like Termius make it possible. Other useful features in modern clients include creating, storing, and running bash code snippets with a single click of the mouse. They also provide the ability to access multiple terminals at a time. Last but not least, some clients feature SFTP functionality, which allows you to safely transfer files to and from remote devices.