Software Development Tool Trends for Embedded Hardware

Published  September 28, 2022   0
S Staff
Author
Software Development Tool Trends for Embedded Hardware

It is said that a person who only has a hammer everything looks like a nail. Having the right tool for the right job is crucial for effectiveness and efficiency in any skilled profession. Embedded system development is no different. That said, until fairly recently, tools aimed at embedded development have lacked the refinement and modern feature sets found in the development tools aimed at desktop, web, and mobile developers. In addition, programming microcontrollers and FPGAs have historically required rather expensive hardware programmers/debuggers and proprietary software licenses. The recent push towards more open source ecosystems (e.g., RISC-V microprocessor, Arduino IDE, etc.) has had an arguably net positive effect on the robustness and user-friendliness of many embedded development tools. Here is a look at software developments that have and are continuing to make significant changes to the workflow of embedded system developers:

1. Integrated Development Environment (IDE)

There is an allure for many developers to code in simple text editors, especially Vim or Nano on Linux. They are lightweight and found on nearly every Linux distro by default. However, modern code editors and IDEs offer much more functionality that makes them very attractive to embedded developers. In addition, many embedded hardware manufacturers offer custom IDEs specific to their various microcontroller families. Manufacturer-centric IDEs provide numerous advantages such as access to support libraries for external components, templates for multiple microcontrollers, and examples to help developers get started with new hardware.

2. Version Control Tools 

Software development is nothing if not continuous. Additionally, it is rare for a single developer to develop modern embedded systems. Or at the very least, an embedded developer must work with mobile or web developers as embedded systems tend to be a part of a larger software ecosystem. Version control tools such as Git provide the ability to manage the iterations of source code through the development cycle. GitHub and GitLab are two popular cloud-based repositories of source code and other design files. Versioning, release management, and bug reporting are just a few of the benefits of using version control tools. However, there are a few drawbacks. Chiefly they have become a part of cybersecurity attack chains because developers sometimes accidentally leave usernames, passwords, or encryption keys in the commits they push to publicly available repositories. Bad actors then scour these repositories looking for that information and incorporate it into their malware attacks.

3. Debugger

Historically, debugging microcontrollers meant expensive hardware. In-Circuit Emulators (ICE) are devices that plug into the microcontroller socket of a more extensive system. They allow for real-time execution of the firmware while also providing debugging functionality such as register and memory access, conditional breakpoints, and trace buffers. More common and less expensive are In-Circuit Debuggers (ICD). Typically, a device sits between the developer workstation and the target microcontroller and allows for debugging over the In-Circuit Serial Programming (ICSP) protocol. Certain modern microcontroller development boards even have the debugging ICSP hardware built-in and are accessed via a USB cable connected directly between the target development board and developer workstation. Control over the debugging functionality is typically found in the development board’s preferred IDE.

4. Linter

When we write articles or reports, we run the final draft through a spell and grammar check tool. A linter is a similar concept but for source code. A linter looks at source code statically (i.e., before compilation and not while the machine code is running on the target device) and can detect issues that arise from stylistic errors, configuration errors, project structure errors, and library dependency errors. These errors can affect anything from readability to preventing successful compilation.

5. GitHub Copilot

For decades, auto-completion has been a feature of many code editors. Auto-complete helps developers be more efficient by offering real-time intelligent recommendations for keywords and variable names as a developer types out their source code. GitHub’s Copilot is an AI-based code completion tool (a plug-in for Visual Studio Code) that takes the idea of auto-complete to a whole new level. Copilot will examine the name of a function written by a developer and recommend the entirety of the source code needed to execute that function. For example, say you write the following:

float calculateVolume

Copilot will finish the function declaration as follows:

float calculateVolume(float radius) {
     return (4.0/3.0) * PI * radius * radius * radius;
}

Copilot is essentially an AI colleague who can help develop code by providing at least a starting point for function definitions. However, like any automation tool, it does not replace the need for a human to review and, if necessary, correct code generated by Copilot.

6. HTTP and API Examination Tools

It is increasingly rare for embedded devices (i.e., IoT devices) to not communicate over a network, if not the Internet itself. Unfortunately, there is a good chance the web app developers are creating software in parallel( to the embedded development efforts. Tools such as Postman allow embedded developers to inspect and test HTTP request methods (e.g., PUT, POST, GET) and API requests independently and before committing them into the firmware. Thus troubleshooting is independent of the embedded hardware, ensuring any issues with an API are solely because of the API itself and not the firmware or embedded hardware.

7. Packet Inspection Tools

While development-oriented HTTP and API examination tools are excellent for high-level debugging, sometimes it is necessary to inspect at the packet level, or one may need to examine different protocols such as Zigbee. In those cases, it is necessary to use a packet inspection tool such as Wireshark. Wireshark can record and inspect numerous packet-based communications protocols.

8. Software-based Logic Analyzers

It is increasingly common for developers to use software-based tools to debug their devices in place of desks full of cumbersome hardware-based oscilloscopes and logic analyzers. Typically software-based tools connect to a personal computer via a USB cable, and the interface is provided as a desktop application. A popular entry/mid-level logic analyzer is the Saleae Logic Analyzer. These software-based tools are very compelling for field technicians. They make inspection and troubleshooting of deployed devices more efficient by bringing what has traditionally been lab-based level analysis out into the field. A vital advantage of a software-based analyzer is that in addition to the default protocols supported (e.g., I2C, SPI, serial), it is possible to write your own protocol analyzers for custom communications protocols.

9. Secure Shell (SSH) Terminal Client

For more robust embedded systems running an operating system and offering shell access for remote management, it will likely be necessary to SSH into a device to perform specific maintenance tasks. Or it may be necessary to remotely login into a server that multiple IoT devices communicate with and make changes to backend services. Regardless, the ability to remotely access systems is crucial, and SSH terminal clients such as Termius make that 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. Lastly, some clients also offer secure file transfer (SFTP) functionality to transfer files to/from remote devices from/to your local machine.

About the Author

Michael Parks, P.E. is the owner of Green Shoe Garage, a custom electronics design studio and technology consultancy located in Southern Maryland. He produces the S.T.E.A.M. Power podcast to help raise public awareness of technical and scientific matters. Michael is also a licensed Professional Engineer in the state of Maryland and holds a Master’s degree in systems engineering from Johns Hopkins University.

Source: Mouser

Have any question realated to this Article?

Ask Our Community Members