The idea for this posting started when I read New approaches to dominate in embedded development article. Then I found some ther related articles and here is the result: long article.
Embedded devices, or embedded systems, are specialized computer systems that constitute components of larger electromechanical systems with which they interface. The advent of low-cost wireless connectivity is altering many things in embedded development: With a connection to the Internet, an embedded device can gain access to essentially unlimited processing power and memory in cloud service – and at the same time you need to worry about communication issues like breaks connections, latency and security issues.
Those issues are espcecially in the center of the development of popular Internet of Things device and adding connectivity to existing embedded systems. All this means that the whole nature of the embedded development effort is going to change. A new generation of programmers are already making more and more embedded systems. Rather than living and breathing C/C++, the new generation prefers more high-level, abstract languages (like Java, Python, JavaScript etc.). Instead of trying to craft each design to optimize for cost, code size, and performance, the new generation wants to create application code that is separate from an underlying platform that handles all the routine details. Memory is cheap, so code size is only a minor issue in many applications.
Historically, a typical embedded system has been designed as a control-dominated system using only a state-oriented model, such as FSMs. However, the trend in embedded systems design in recent years has been towards highly distributed architectures with support for concurrency, data and control flow, and scalable distributed computations. For example computer networks, modern industrial control systems, electronics in modern car,Internet of Things system fall to this category. This implies that a different approach is necessary.
Companies are also marketing to embedded developers in new ways. Ultra-low cost development boards to woo makers, hobbyists, students, and entrepreneurs on a shoestring budget to a processor architecture for prototyping and experimentation have already become common.If you look under the hood of any connected embedded consumer or mobile device, in addition to the OS you will find a variety of middleware applications. As hardware becomes powerful and cheap enough that the inefficiencies of platform-based products become moot. Leaders with Embedded systems development lifecycle management solutions speak out on new approaches available today in developing advanced products and systems.
Traditional approaches
C/C++
Tradionally embedded developers have been living and breathing C/C++. For a variety of reasons, the vast majority of embedded toolchains are designed to support C as the primary language. If you want to write embedded software for more than just a few hobbyist platforms, your going to need to learn C. Very many embedded systems operating systems, including Linux Kernel, are written using C language. C can be translated very easily and literally to assembly, which allows programmers to do low level things without the restrictions of assembly. When you need to optimize for cost, code size, and performance the typical choice of language is C. Still C is today used for maximum efficiency instead of C++.
C++ is very much alike C, with more features, and lots of good stuff, while not having many drawbacks, except fror it complexity. The had been for years suspicion C++ is somehow unsuitable for use in small embedded systems. At some time many 8- and 16-bit processors were lacking a C++ compiler, that may be a concern, but there are now 32-bit microcontrollers available for under a dollar supported by mature C++ compilers.Today C++ is used a lot more in embedded systems. There are many factors that may contribute to this, including more powerful processors, more challenging applications, and more familiarity with object-oriented languages.
And if you use suitable C++ subset for coding, you can make applications that work even on quite tiny processors, let the Arduino system be an example of that: You’re writing in C/C++, using a library of functions with a fairly consistent API. There is no “Arduino language” and your “.ino” files are three lines away from being standard C++.
Today C++ has not displaced C. Both of the languages are widely used, sometimes even within one system – for example in embedded Linux system that runs C++ application. When you write a C or C++ programs for modern Embedded Linux you typically use GCC compiler toolchain to do compilation and make file to manage compilation process.
Most organization put considerable focus on software quality, but software security is different. When the security is very much talked about topic todays embedded systems, the security of the programs written using C/C++ becomes sometimes a debated subject. Embedded development presents the challenge of coding in a language that’s inherently insecure; and quality assurance does little to ensure security. The truth is that majority of today’s Internet connected systems have their networking fuctionality written using C even of the actual application layer is written using some other methods.
Java
Java is a general-purpose computer programming language that is concurrent, class-based and object-oriented.The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them. Java is intended to let application developers “write once, run anywhere” (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. Java is one of the most popular programming languages in use, particularly for client-server web applications. In addition to those it is widely used in mobile phones (Java apps in feature phones, ) and some embedded applications. Some common examples include SIM cards, VOIP phones, Blu-ray Disc players, televisions, utility meters, healthcare gateways, industrial controls, and countless other devices.
Some experts point out that Java is still a viable option for IoT programming. Think of the industrial Internet as the merger of embedded software development and the enterprise. In that area, Java has a number of key advantages: first is skills – there are lots of Java developers out there, and that is an important factor when selecting technology. Second is maturity and stability – when you have devices which are going to be remotely managed and provisioned for a decade, Java’s stability and care about backwards compatibility become very important. Third is the scale of the Java ecosystem – thousands of companies already base their business on Java, ranging from Gemalto using JavaCard on their SIM cards to the largest of the enterprise software vendors.
Although in the past some differences existed between embedded Java and traditional PC based Java solutions, the only difference now is that embedded Java code in these embedded systems is mainly contained in constrained memory, such as flash memory. A complete convergence has taken place since 2010, and now Java software components running on large systems can run directly with no recompilation at all on design-to-cost mass-production devices (consumers, industrial, white goods, healthcare, metering, smart markets in general,…) Java for embedded devices (Java Embedded) is generally integrated by the device manufacturers. It is NOT available for download or installation by consumers. Originally Java was tightly controlled by Sun (now Oracle), but in 2007 Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU Classpath (standard libraries), and IcedTea-Web (browser plugin for applets).
My feelings with Java is that if your embedded systems platform supports Java and you know hot to code Java, then it could be a good tool. If your platform does not have ready Java support, adding it could be quite a bit of work.
Increasing trends
Databases
Embedded databases are coming more and more to the embedded devices. If you look under the hood of any connected embedded consumer or mobile device, in addition to the OS you will find a variety of middleware applications. One of the most important and most ubiquitous of these is the embedded database. An embedded database system is a database management system (DBMS) which is tightly integrated with an application software that requires access to stored data, such that the database system is “hidden” from the application’s end-user and requires little or no ongoing maintenance.
There are many possible databases. First choice is what kind of database you need. The main choices are SQL databases and simpler key-storage databases (also called NoSQL).
SQLite is the Database chosen by virtually all mobile operating systems. For example Android and iOS ship with SQLite. It is also built into for example Firefox web browser. It is also often used with PHP. So SQLite is probably a pretty safe bet if you need relational database for an embedded system that needs to support SQL commands and does not need to store huge amounts of data (no need to modify database with millions of lines of data).
If you do not need relational database and you need very high performance, you need probably to look somewhere else.Berkeley DB (BDB) is a software library intended to provide a high-performance embedded database for key/value data. Berkeley DB is written in Cwith API bindings for many languages. BDB stores arbitrary key/data pairs as byte arrays. There also many other key/value database systems.
RTA (Run Time Access) gives easy runtime access to your program’s internal structures, arrays, and linked-lists as tables in a database. When using RTA, your UI programs think they are talking to a PostgreSQL database (PostgreSQL bindings for C and PHP work, as does command line tool psql), but instead of normal database file you are actually accessing internals of your software.
Software quality
Building quality into embedded software doesn’t happen by accident. Quality must be built-in from the beginning. Software startup checklist gives quality a head start article is a checklist for embedded software developers to make sure they kick-off their embedded software implementation phase the right way, with quality in mind
Safety
Traditional methods for achieving safety properties mostly originate from hardware-dominated systems. Nowdays more and more functionality is built using software – including safety critical functions. Software-intensive embedded systems require new approaches for safety. Embedded Software Can Kill But Are We Designing Safely?
IEC, FDA, FAA, NHTSA, SAE, IEEE, MISRA, and other professional agencies and societies work to create safety standards for engineering design. But are we following them? A survey of embedded design practices leads to some disturbing inferences about safety.Barr Group’s recent annual Embedded Systems Safety & Security Survey indicate that we all need to be concerned: Only 67 percent are designing to relevant safety standards, while 22 percent stated that they are not—and 11 percent did not even know if they were designing to a standard or not.
If you were the user of a safety-critical embedded device and learned that the designers had not followed best practices and safety standards in the design of the device, how worried would you be? I know I would be anxious, and quite frankly. This is quite disturbing.
Security
The advent of low-cost wireless connectivity is altering many things in embedded development – it has added to your list of worries need to worry about communication issues like breaks connections, latency and security issues. Understanding security is one thing; applying that understanding in a complete and consistent fashion to meet security goals is quite another. Embedded development presents the challenge of coding in a language that’s inherently insecure; and quality assurance does little to ensure security.
Developing Secure Embedded Software white paper explains why some commonly used approaches to security typically fail:
MISCONCEPTION 1: SECURITY BY OBSCURITY IS A VALID STRATEGY
MISCONCEPTION 2: SECURITY FEATURES EQUAL SECURE SOFTWARE
MISCONCEPTION 3: RELIABILITY AND SAFETY EQUAL SECURITY
MISCONCEPTION 4: DEFENSIVE PROGRAMMING GUARANTEES SECURITY
Some techniques for building security to embedded systems:
Use secure communications protocols and use VPN to secure communications
The use of Public Key Infrastructure (PKI) for boot-time and code authentication
Establishing a “chain of trust”
Process separation to partition critical code and memory spaces
Leveraging safety-certified code
Hardware enforced system partitioning with a trusted execution environment
Plan the system so that it can be easily and safely upgraded when needed
Flood of new languages
Rather than living and breathing C/C++, the new generation prefers more high-level, abstract languages (like Java, Python, JavaScript etc.). So there is a huge push to use interpreted and scripting also in embedded systems. Increased hardware performance on embedded devices combined with embedded Linux has made the use of many scripting languages good tools for implementing different parts of embedded applications (for example web user interface). Nowadays it is common to find embedded hardware devices, based on Raspberry Pi for instance, that are accessible via a network, run Linux and come with Apache and PHP installed on the device. There are also many other relevant languages
One workable solution, especially for embedded Linux systems is that part of the activities organized by totetuettu is a C program instead of scripting languages (Scripting). This enables editing operation simply script files by editing without the need to turn the whole system software again. Scripting languages are also tools that can be implemented, for example, a Web user interface more easily than with C / C ++ language. An empirical study found scripting languages (such as Python) more productive than conventional languages (such as C and Java) for a programming problem involving string manipulation and search in a dictionary.
Scripting languages have been around for a couple of decades Linux and Unix server world standard tools. the proliferation of embedded Linux and resources to merge systems (memory, processor power) growth has made them a very viable tool for many embedded systems – for example, industrial systems, telecommunications equipment, IoT gateway, etc . Some of the command language is suitable for up well even in quite small embedded environments.
I have used with embedded systems successfully mm. Bash, AWK, PHP, Python and Lua scripting languages. It works really well and is really easy to make custom code quickly .It doesn’t require a complicated IDE; all you really need is a terminal – but if you want there are many IDEs that can be used. High-level, dynamically typed languages, such as Python, Ruby and JavaScript. They’re easy—and even fun—to use. They lend themselves to code that easily can be reused and maintained.
There are some thing that needs to be considered when using scripting languages. Sometimes lack of static checking vs a regular compiler can cause problems to be thrown at run-time. But it is better off practicing “strong testing” than relying on strong typing. Other ownsides of these languages is that they tend to execute more slowly than static languages like C/C++, but for very many aplications they are more than adequate. Once you know your way around dynamic languages, as well the frameworks built in them, you get a sense of what runs quickly and what doesn’t.
Bash and other shell scipting
Shell commands are the native language of any Linux system. With the thousands of commands available for the command line user, how can you remember them all? The answer is, you don’t. The real power of the computer is its ability to do the work for you – the power of the shell script is the way to easily to automate things by writing scripts. Shell scripts are collections of Linux command line commands that are stored in a file. The shell can read this file and act on the commands as if they were typed at the keyboard.In addition to that shell also provides a variety of useful programming features that you are familar on other programming langauge (if, for, regex, etc..). Your scripts can be truly powerful. Creating a script extremely straight forward: It can be created by opening a separate editor such or you can do it through a terminal editor such as VI (or preferably some else more user friendly terminal editor). Many things on modern Linux systems rely on using scripts (for example starting and stopping different Linux services at right way).
The most common type of shell script is a bash script. Bash is a commonly used scripting language for shell scripts. In BASH scripts (shell scripts written in BASH) users can use more than just BASH to write the script. There are commands that allow users to embed other scripting languages into a BASH script.
There are also other shells. For example many small embedded systems use BusyBox. BusyBox providesis software that provides several stripped-down Unix tools in a single executable file (more than 300 common command). It runs in a variety of POSIX environments such as Linux, Android and FreeeBSD. BusyBox become the de facto standard core user space toolset for embedded Linux devices and Linux distribution installers.
Shell scripting is a very powerful tool that I used a lot in Linux systems, both embedded systems and servers.
Lua
Lua is a lightweight cross-platform multi-paradigm programming language designed primarily for embedded systems and clients. Lua was originally designed in 1993 as a language for extending software applications to meet the increasing demand for customization at the time. It provided the basic facilities of most procedural programming languages. Lua is intended to be embedded into other applications, and provides a C API for this purpose.
Lua has found many uses in many fields. For example in video game development, Lua is widely used as a scripting language by game programmers. Wireshark network packet analyzer allows protocol dissectors and post-dissector taps to be written in Lua – this is a good way to analyze your custom protocols.
There are also many embedded applications. LuCI, the default web interface for OpenWrt, is written primarily in Lua. NodeMCU is an open source hardware platform, which can run Lua directly on the ESP8266 Wi-Fi SoC. I have tested NodeMcu and found it very nice system.
PHP
PHP is a server-side HTML embedded scripting language. It provides web developers with a full suite of tools for building dynamic websites but can also be used as a general-purpose programming language. Nowadays it is common to find embedded hardware devices, based on Raspberry Pi for instance, that are accessible via a network, run Linux and come with Apache and PHP installed on the device. So on such enviroment is a good idea to take advantage of those built-in features for the applications they are good – for building web user interface. PHP is often embedded into HTML code, or it can be used in combination with various web template systems, web content management system and web frameworks. PHP code is usually processed by a PHP interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI) executable.
Python
Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability. Python interpreters are available for installation on many operating systems, allowing Python code execution on a wide variety of systems. Many operating systems include Python as a standard component; the language ships for example with most Linux distributions.
Python is a multi-paradigm programming language: object-oriented programming and structured programming are fully supported, and there are a number of language features which support functional programming and aspect-oriented programming, Many other paradigms are supported using extensions, including design by contract and logic programming.
Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Since 2003, Python has consistently ranked in the top ten most popular programming languages as measured by the TIOBE Programming Community Index. Large organizations that make use of Python include Google, Yahoo!, CERN, NASA. Python is used successfully in thousands of real world business applications around globally, including many large and mission-critical systems such as YouTube.com and Google.com.
Python was designed to be highly extensible. Libraries like NumPy, SciPy and Matplotlib allow the effective use of Python in scientific computing. Python is intended to be a highly readable language. Python can also be embedded in existing applications and hasbeen successfully embedded in a number of software products as a scripting language. Python can serve as a scripting language for web applications, e.g., via mod_wsgi for the Apache web server.
Python can be used in embedded, small or minimal hardware devices. Some modern embedded devices have enough memory and a fast enough CPU to run a typical Linux-based environment, for example, and running CPython on such devices is mostly a matter of compilation (or cross-compilation) and tuning. Various efforts have been made to make CPython more usable for embedded applications.
For more limited embedded devices, a re-engineered or adapted version of CPython, might be appropriate. Examples of such implementations include the following: PyMite, Tiny Python, Viper. Sometimes the embedded environment is just too restrictive to support a Python virtual machine. In such cases, various Python tools can be employed for prototyping, with the eventual application or system code being generated and deployed on the device. Also MicroPython and tinypy have been ported Python to various small microcontrollers and architectures. Real world applications include Telit GSM/GPRS modules that allow writing the controlling application directly in a high-level open-sourced language: Python.
Python on embedded platforms? It is quick to develop apps, quick to debug – really easy to make custom code quickly. Sometimes lack of static checking vs a regular compiler can cause problems to be thrown at run-time. To avoid those try to have 100% test coverage. pychecker is a very useful too also which will catch quite a lot of common errors. The only downsides for embedded work is that sometimes python can be slow and sometimes it uses a lot of memory (relatively speaking). An empirical study found scripting languages (such as Python) more productive than conventional languages (such as C and Java) for a programming problem involving string manipulation and search in a dictionary. Memory consumption was often “better than Java and not much worse than C or C++”.
JavaScript and node.js
JavaScript is a very popular high-level language. Love it or hate it, JavaScript is a popular programming language for many, mainly because it’s so incredibly easy to learn. JavaScript’s reputation for providing users with beautiful, interactive websites isn’t where its usefulness ends. Nowadays, it’s also used to create mobile applications, cross-platform desktop software, and thanks to Node.js, it’s even capable of creating and running servers and databases! There is huge community of developers. JavaScript is a high-level language.
Its event-driven architecture fits perfectly with how the world operates – we live in an event-driven world. This event-driven modality is also efficient when it comes to sensors.
Regardless of the obvious benefits, there is still, understandably, some debate as to whether JavaScript is really up to the task to replace traditional C/C++ software in Internet connected embedded systems.
It doesn’t require a complicated IDE; all you really need is a terminal.
JavaScript is a high-level language. While this usually means that it’s more human-readable and therefore more user-friendly, the downside is that this can also make it somewhat slower. Being slower definitely means that it may not be suitable for situations where timing and speed are critical.
JavaScript is already in embedded boards. You can run JavaScipt on Raspberry Pi and BeagleBone. There are also severa other popular JavaScript-enabled development boards to help get you started: The Espruino is a small microcontroller that runs JavaScript. The Tessel 2 is a development board that comes with integrated wi-fi, an ethernet port, two USB ports, and companion source library downloadable via the Node Package Manager. The Kinoma Create, dubbed the “JavaScript powered Internet of Things construction kit.”The best part is that, depending on the needs of your device, you can even compile your JavaScript code into C!
JavaScript for embedded systems is still in its infancy, but we suspect that some major advancements are on the horizon.We for example see a surprising amount of projects using Node.js.Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications. Node.js has an event-driven architecture capable of asynchronous I/O that allows highly scalable servers without using threading, by using a simplified model of event-driven programming that uses callbacks to signal the completion of a task. The runtime environment interprets JavaScript using Google‘s V8 JavaScript engine.Node.js allows the creation of Web servers and networking tools using JavaScript and a collection of “modules” that handle various core functionality. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. Modern desktop IDEs provide editing and debugging features specifically for Node.js applications
JXcore is a fork of Node.js targeting mobile devices and IoTs. JXcore is a framework for developing applications for mobile and embedded devices using JavaScript and leveraging the Node ecosystem (110,000 modules and counting)!
Why is it worth exploring node.js development in an embedded environment? JavaScript is a widely known language that was designed to deal with user interaction in a browser.The reasons to use Node.js for hardware are simple: it’s standardized, event driven, and has very high productivity: it’s dynamically typed, which makes it faster to write — perfectly suited for getting a hardware prototype out the door. For building a complete end-to-end IoT system, JavaScript is very portable programming system. Typically an IoT projects require “things” to communicate with other “things” or applications. The huge number of modules available in Node.js makes it easier to generate interfaces – For example, the HTTP module allows you to create easily an HTTP server that can easily map the GET
method specific URLs to your software function calls. If your embedded platform has ready made Node.js support available, you should definately consider using it.
Future trends
According to New approaches to dominate in embedded development article there will be several camps of embedded development in the future:
One camp will be the traditional embedded developer, working as always to craft designs for specific applications that require the fine tuning. These are most likely to be high-performance, low-volume systems or else fixed-function, high-volume systems where cost is everything.
Another camp might be the embedded developer who is creating a platform on which other developers will build applications. These platforms might be general-purpose designs like the Arduino, or specialty designs such as a virtual PLC system.
This third camp is likely to become huge: Traditional embedded development cannot produce new designs in the quantities and at the rate needed to deliver the 50 billion IoT devices predicted by 2020.
Transition will take time. The enviroment is different than computer and mobile world. There are too many application areas with too widely varying requirements for a one-size-fits-all platform to arise.
Sources
Most important information sources:
New approaches to dominate in embedded development
A New Approach for Distributed Computing in Embedded Systems
New Approaches to Systems Engineering and Embedded Software Development
Embracing Java for the Internet of Things
Embedded Linux – Shell Scripting 101
Embedded Linux – Shell Scripting 102
Embedding Other Languages in BASH Scripts
PHP Integration with Embedded Hardware Device Sensors – PHP Classes blog
JavaScript: The Perfect Language for the Internet of Things (IoT)
Anyone using Python for embedded projects?
JavaScript: The Perfect Language for the Internet of Things (IoT)
MICROCONTROLLERS AND NODE.JS, NATURALLY
Node.JS Appliances on Embedded Linux Devices
The smartest way to program smart things: Node.js
Embedded Software Can Kill But Are We Designing Safely?
DEVELOPING SECURE EMBEDDED SOFTWARE
1,667 Comments
Tomi Engdahl says:
https://oxeltech.de/en/freertos-vs-embedded-linux-which-one-should-i-use/
FreeRTOS or Linux? Which One is Better for my Application?
Your choice of OS depends mainly on what the intended application for the system is.
If the system requires a strict timing schedule and the application focuses primarily on controlling hardware—such as the control systems of household appliances like microwaves or washing machines—then FreeRTOS is a suitable OS. This real-time operating system excels in environments where simplicity and timing precision are paramount.
If the application requires complex processing and does not require strict process deadlines, then Embedded Linux can be the choice. Examples of this are systems which deal with networking such as routers, or systems involving computer vision or machine learning. These applications primarily focus on processing rather than control. This is a very simplified answer which leaves out the intricacies of hardware and software.
One important thing to understand is that these platforms target different types of hardware and are not interchangeable.
I’m a beginner, Which One is Easier to Learn?
Embedded Linux: If someone is familiar with working on Linux systems, picking up embedded Linux will be relatively straightforward since it shares many functionalities with desktop Linux. However, for those with no prior experience with Linux, the learning curve can be steep.
FreeRTOS: Most microcontrollers are programmed using the C language, a familiar territory for many engineers, making it easier to dive into FreeRTOS development. While programming with FreeRTOS can be relatively straightforward, it demands a deep understanding of the hardware being utilized to write effective code.
Considering these factors, it’s fair to say that Embedded Linux might pose challenges for beginners due to the complexity of its software. In contrast, FreeRTOS emerges as a more accessible option, especially for users not planning to stay with microcontrollers.
What’s an Example Application of Each?
It should be evident by now that while both systems may share some aspects and their functionality might overlap in some cases, ultimately, they have different use cases. When making a choice between the two, it is important to identify the core requirements of the application and choose accordingly for an efficient system.
While a simple motor controller can operate under Embedded Linux, this might lead to higher power consumption and slower boot times due to the additional software overhead. In such cases, a microcontroller running FreeRTOS could achieve the same functionality more efficiently, using fewer resources and offering quicker responsiveness.
While the flight controls of an aircraft would utilize a real-time operating system, the navigation systems would be more suitably handled by an Embedded Linux-based system as it will need to be interactive for the user with a graphical interface.
A system running FreeRTOS will not be able to perform high-level computer vision tasks; for that, an Embedded Linux system is far more suitable as it can access a wide range of proprietary software resources available.
Android, which is based on the Linux kernel, exemplifies a specialized adaptation of Embedded Linux designed for complex devices like smartphones. Such devices surpass the hardware and software capabilities typically supported by FreeRTOS
Which One Gives Me More Access to Hardware?
FreeRTOS: FreeRTOS is a real-time operating system. A real-time operating system is not a full operating system like Windows or Linux; rather, it can be thought of as an advanced task scheduler with a focus on strict timing and consistency in meeting deadlines. High-level hardware control provided by FreeRTOS means that often the firmware is directly flipping registers, which makes the code efficient but specific to a microcontroller and not very portable.
Embedded Linux: Embedded Linux is an operating system based on the Linux kernel with packages specifically tailored for embedded systems. Embedded Linux has the advantages of a full operating system and can run other proprietary software which makes it very versatile. Since Embedded Linux has common libraries and abstraction layers in its code, it doesn’t directly interact with the hardware of the system, making the code very portable.
Which One Is Lighter?
FreeRTOS: Compared to a full OS, it is very lightweight and doesn’t have high hardware requirements, which means it can run with very little overhead with a very fast boot time.
This makes FreeRTOS more suitable for battery-constrained applications.
Embedded Linux: Embedded Linux has a lot of overhead software, which significantly increases its hardware requirements and consumes more power.
Do They Both Work with the Same Hardware?
Sometimes yes, but generally speaking they are targeted for different hardware.
Tomi Engdahl says:
Custom Software Vs. Ready-Made: Pros and Cons
https://www.weare.fi/en/custom-software-vs-ready-made-pros-and-cons/
Tomi Engdahl says:
Can we replace an embedded system design with a general purpose computer or a smartphone?
https://electronics.stackexchange.com/questions/307653/can-we-replace-an-embedded-system-design-with-a-general-purpose-computer-or-a-sm
Yes, you can replace an embedded solution with standard parts. However, you might not be able to.
For example, you listed specs such as:
mil environment, temperature, vibration, reliability.
real time software
avionics (weight and size restrictions?)
You won’t get a standard pc or smartphone outside 0 to 40 degree ambient. They are also not real time at all, you will have to start bare metal software. Or at least, get some custom kernel running. And that is hard, because you won’t have documentation.
You might be able to get a small industrial pc without moving parts for $2000, carrying an ssd and some mobile intel chip with build-in IO. (CAN, rs-485, io)
You can use PLC controllers, they come in various forms and classifications. But they are large and expensive as well.
What you can do however, is call around for oems supplying processor and io boards. Various companies do, for example in the automotive sector there are only a few companies making the actual hardware.
There won’t be a catalog and price on their website. You have to ask, its a niche and closed market.
With these boards you can save a lot of time, which is also expensive. You might still need to fabricate an enclosure or interfacing boards. But the most difficult part, the multilayer cpu board, will be ready.
It seems you are looking for something called a single board computer. These things exist in many varieties and tradeoffs, and the industry is quite competitive. You can get something beefy enough to run Windows 10 IOT, for example, for $350, including the Windows license and 0-70°C operating temperature. There are also ruggedized fanless computers in small boxes for a bit more money.
In your case, you have to look carefully at the operating temperature rating, and get something designed for a high-vibration environment. That’s basically the difference between something low end like a Raspberry Pi and a real industrial SBC.
Tomi Engdahl says:
Off-the-shelf vs custom embedded Linux distributions
https://theembeddedkit.io/blog/off-the-shelf-custom-linux-distributions/
Selecting the appropriate Linux distribution for initiating your embedded system can be a challenging decision. Do you opt for a pre-configured Debian, potentially facing limitations down the road? Alternatively, do you leverage the Yocto Project to craft a custom Linux distribution, affording complete flexibility although with a high time investment? Join us in a thorough exploration of the advantages and drawbacks associated with off-the-shelf versus custom embedded Linux distributions to determine the optimal choice for your system.
Strengths and weaknesses of standard, off-the-shelf embedded Linux distributions
Ubuntu Core and Debian are the most classical standard embedded Linux distributions we can find in the
embedded world.
These distributions offer a sense of familiarity by aligning with typical Linux usage patterns, making them particularly appealing to users accustomed to the desktop environment. The strength of Linux distros like Ubuntu Core and Debian lies in their expansive ecosystems, featuring wide repositories and precompiled packages that facilitate the seamless integration of features into embedded systems. Users also benefit from regular updates, ensuring a secure and up-to-date operating environment, making these distributions a reliable foundation for those prioritizing ease of use, stability, and a well-supported software ecosystem.
However, despite their strengths, off-the-shelf Linux distributions like Ubuntu Core and Debian face notable limitations in the context of embedded systems. These drawbacks become evident, especially when implementing advanced security features such as secure boot, where the package manager’s inability to facilitate seamless updates poses a challenge. Additionally, these distributions often result in larger image sizes and limited customization options. Consequently, for embedded devices requiring high adaptability and intricate security measures, off-the-shelf Linux distributions may not fully meet your specific demands, and you should rather look at building your own tailor-made Linux distribution.
Linux distribution comparison: Debian, Ubuntu Core, Windriver, Welma Yocto Linux
https://theembeddedkit.io/blog/embedded-linux-distribution-comparison/
Choosing the right software for your hardware is crucial for a strong and secure product. In this blog post, we’ll compare popular embedded Linux options like Windriver, Ubuntu Core, Welma Yocto Linux, Debian, or even create your own custom distribution independently or with a service provider. Join us to find the best Linux distro for your embedded system.
Tomi Engdahl says:
https://www.riot-os.org/
Tomi Engdahl says:
Open Source RTOS is often used in projects where cost savings, community collaboration, and customization are key priorities. Examples of popular Open Source RTOS solutions include FreeRTOS, Zephyr, and RIOT. These systems have been implemented in a wide range of applications, such as IoT devices, consumer electronics, and robotics, proving their versatility and adaptability in the embedded systems domain.
https://runtimerec.com/custom-vs-commercial-vs-open-source-rtos/
Tomi Engdahl says:
https://wiki.metropolia.fi/display/alykas/Tehdastestit+ja+kelpuutus
Tomi Engdahl says:
LAPPEENRANNAN TEKNILLINEN YLIOPISTO
SÄHKÖTEKNIIKKA
KANDIDAATINTYÖ
Ohjelmistotuotannon menetelmien käyttö sulautetuissa järjestelmissä
https://lutpub.lut.fi/bitstream/handle/10024/90057/Kandity%F6_EskoKasila.pdf?sequence=2
Tomi Engdahl says:
https://fi.wikipedia.org/wiki/Sulautettu_j%C3%A4rjestelm%C3%A4
Tomi Engdahl says:
https://www.digikey.fi/fi/articles/speed-embedded-wireless-iot-development-with-an-off-the-shelf-embedded-linux-multicore-platform
Tomi Engdahl says:
https://lutpub.lut.fi/bitstream/handle/10024/34456/tombjork.pdf;jsessionid=E31CBAF7061098050EF4550A945C8E99?sequence=1
Tomi Engdahl says:
https://etn.fi/index.php/tekniset-artikkelit/15142-kuinka-valita-naeyttoe-sulautettuun-jaerjestelmaeaen
Tomi Engdahl says:
https://www.velvetech.com/blog/embedded-system-design-guide/
Tomi Engdahl says:
https://www.digi.com/blog/post/choose-the-starting-point-embedded-system-design
Tomi Engdahl says:
https://electronics.stackexchange.com/questions/95073/when-do-we-need-an-operating-system-in-embedded-system-design
My rule of thumb is that you should consider an operating system if the product requires one or more of the following: a TCP/IP stack (or other complex networking stack), a complex GUI (perhaps one with GUI objects such as windows and events), or a file system.
Tomi Engdahl says:
https://theembeddedkit.io/blog/embedded-linux-distribution-comparison/
Tomi Engdahl says:
https://www.ciklum.com/resources/blog/the-future-of-embedded-systems-trends-and-innovations
https://medium.com/@neuailabs/latest-trends-in-embedded-systems-a-glimpse-into-the-future-dafa511dce58
Tomi Engdahl says:
https://github.com/DanielMartensson/Easy-CANopen
https://hackaday.io/project/3614-agcon-arduino-generic-canopen-node
Tomi Engdahl says:
https://medium.com/@embeddedhash.in/is-embedded-systems-a-good-career-choice-065df5c0d72b
Tomi Engdahl says:
https://www.theiotacademy.co/blog/use-of-ai-in-embedded-systems/
Tomi Engdahl says:
General Purpose Operating System (GPOS)
Real-Time Operating System (RTOS)
Tomi Engdahl says:
https://www.linkedin.com/pulse/embedded-linux-2050-shaping-future-pravin-jogdand
Tomi Engdahl says:
Top 10 Applications and Use of AI in Embedded Systems
https://www.theiotacademy.co/blog/use-of-ai-in-embedded-systems/
Top 10 Applications of AI in Embedded Systems
1. Autonomous Vehicles
2. Smart Home Devices
3. Healthcare Devices
4. Industrial Automation
5. Agricultural Technology
6. Retail and Supply Chain Management
7. Energy Management
8. Consumer Electronics
9. Aerospace and Defense
10. Environmental Monitoring
Tomi Engdahl says:
https://cambridgeopenacademy.com/top-10-technology-trends-in-2025/
Tomi Engdahl says:
https://teo.dk/en/blog/top-11-software-development-trends-for-2024-and-2025/
Tomi Engdahl says:
https://iot-analytics.com/top-6-edge-ai-trends-as-showcased-at-embedded-world-2024/
Tomi Engdahl says:
Nuvoton Targets Those Moving Up From 5V Eight-Bit Microcontrollers with the 32-Bit M2003 Series
Designed for projects that have outgrown eight-bit alternatives, the M2003 chips are powered by an Arm Cortex-M23 core.
https://www.hackster.io/news/nuvoton-targets-those-moving-up-from-5v-eight-bit-microcontrollers-with-the-32-bit-m2003-series-ff57cfeb5809
Tomi Engdahl says:
https://hackaday.com/2024/08/28/swd-interface-simplifies-debugging/
Tomi Engdahl says:
https://www.securityweek.com/google-pushes-rust-in-legacy-firmware-to-tackle-memory-safety-flaws/
Tomi Engdahl says:
Clea OS on uusin sulautettu Linux
https://etn.fi/index.php/13-news/16570-clea-os-on-uusin-sulautettu-linux
Italialainen SECO on tänään julkistanut Clea OS -käyttöjärjestelmän osaksi Clea-ohjelmistopakettiaan. Clea OS on teollisuustason sulautettu Linux-käyttöjärjestelmä, joka on suunniteltu yksinkertaistamaan elektronisten tuotteiden kehitystä ja ylläpitoa, joissa vaaditaan korkeaa luotettavuutta ja turvallisuutta.
Sulautettujen Linuxien määrää on käytännössä mahdotonta edes arvioita. Kun otetaan huomioon, että monilla yrityksillä on omia, kustomoituja versioita sulautetusta Linuxista, määrä kasvaa satoihin ja todennäköisesti tuhansiin. Tällainen on myös Clea OS.
Clea OS on ollut osa Clea-ohjelmistopakettia useiden vuosien ajan, on nyt saatavilla itsenäisenä käyttöjärjestelmänä. Se on suunniteltu optimoimaan teollisuuden sulautettujen järjestelmien DevOps-prosessit.
Käyttöjärjestelmästä on saatavilla kaksi eri versiota: minimalistinen versio, joka sisältää vain välttämättömät palvelut turvallisiin päivityksiin ja Docker-sovellusten käyttöön, sekä kaiken kattava versio, joka on esiasetettu monimutkaisten sovellusten, kuten käyttöliittymien, kehittämiseen.
https://clea.ai/
Tomi Engdahl says:
Sulautettujen osaajapula hidastaa siirtymistä alustakehitykseen
https://www.uusiteknologia.fi/2024/09/11/sulautettujen-osaajapula-hidastaa-siirtymista-alustakehitykseen/
Suomalaisen QT-yhtiön teettämän kyselyn mukaan jopa 50 prosentilla sulautetun elektroniikan tiimeistä on vaikeuksia laajentaa alustakehitysstrategiaansa. Ja alustakehitysstrategiaa hyödyntävienkin kehitystiimien koodista kirjoitetaan edelleen räätälöidyillä ratkaisuilla.
Tutkimuslaitos Forrester Consultingin ja kehitysohjelmia tuottavan Qt Groupin selvityksen mukaan lähes kaksi kolmasosaa (63 %) alustakehitysstrategiaa (Platform engineering) hyödyntävien organisaatioiden sulautetuista ohjelmistoista luodaan edelleen räätälöidyillä, yhtä käyttötarkoitusta varten kehitetyillä -ratkaisuilla.
Siitä S huolimatta vastaajat pitävät organisaationsa alustakehitysstrategiaa käyvänä ratkaisuna. Vastaajista 65 prosenttia näkevät alustansa perustana, jolle sulautettu ohjelmisto rakentuu, jota ominaisuuksia pyritään parantamaan sekä lisäämään automaatiota ja käyttötapausten kattavuutta.
Tutkimuksen tulokset tuovat QT:n mukaan selvästi esiin, miten monet sulautettuja ohjelmistoja kehittävät tiimit joutuvat yhä tasapainotelemaan tuottavuuden ja tiukkojen laatu- ja turvallisuusvaatimusten välillä. Kehitystiimit tarvitsivatkin lisää joustavia ja skaalautuvia alustoja, jotka täyttävät turvallisuus- ja laatuvaatimukset
Selvityksen perusteella nimenomaan laatuvaatimukset ovat saaneet QT:n mukaan useimmat sulautettuja järjestelmiä kehittävät tiimit siirtymään alustakehitykseen. Keskeisinä hyötyinä mainitaan muun muassa parantunut loppuasiakaskokemus aiempaa luotettavamman ja laadukkaamman ohjelmiston ansiosta sekä laitteiden parantunut turvallisuus ja toimialan standardien noudattaminen,
Haasteista huolimatta lähes kaikki vastaajat (93 %) kertovat, että yrityksen johto tukee olemassa olevia alustakehitysstrategioita. “Olemme usein huomanneet, että yrityksissä alustakehitysstrategioiden koettu kypsyys ei aina vastaa niistä saatavia todellisia hyötyjä. Liian paljon työtä tehdään edelleen manuaalisesti erityistarpeiden täyttämiseksi, olipa kyseessä sitten lääke-, auto- tai teollisuusautomaatioala,” sanoo alustatekniikoita markkinoivan QT:n Juhapekka Niemi selvityksen taustaksi.
Tomi Engdahl says:
What is COTS, MOTS, GOTS and NOTS?
COTS, MOTS, GOTS and NOTS are abbreviations that describe prepackaged software or — less commonly — hardware purchase alternatives. The four acronyms denote different classifications of software and hardware, each with their own unique characteristics and usage scenarios.
COTS. Commercial off-the-shelf software.
MOTS. Modified, modifiable or military off-the-shelf software.
GOTS. Government off-the-shelf software.
NOTS. Niche or NATO off-the-shelf software.
https://www.techtarget.com/searchdatacenter/definition/COTS-MOTS-GOTS-and-NOTS
Tomi Engdahl says:
https://www.digilogicsystems.com/blog/advantages-of-cots-vs-embedded-boards/
Tomi Engdahl says:
https://www.windriver.com/solutions/learning/what-are-cots-mots-gots-nots
Tomi Engdahl says:
Advantages of COTS vs Embedded Boards in Automated Testing Environments
https://www.digilogicsystems.com/blog/advantages-of-cots-vs-embedded-boards/
Tomi Engdahl says:
https://emcfastpass.com/rf-modules/
RF Implementation Comparison
Here’s a top level overview of the routes you can take to implementing a wireless solution into your product. The ballpark pricing here is for Wi-Fi modules, just to pick an example. The certification costs brackets are wide because they account for variations in regional test requirements and configurations of equipment.
Tomi Engdahl says:
https://www.tuvsud.com/en-gb/resource-centre/blogs/uk/testing-and-certification-blog/regulatory-compliance-for-radio-enabled-iot-devices-using-pre-certified-radio-modules
Tomi Engdahl says:
https://www.tritechsolutions.se/wp-content/uploads/2022/12/Pros_and_Cons_Computer-on-Modules_eng.pdf
Tomi Engdahl says:
https://goldenmargins.com/computer-on-module/
Tomi Engdahl says:
The Killer Features of the New C++ Are the Sentence for Rust in Critical Real-Time Systems
https://medium.com/@pepitoscrespo/the-killer-features-of-the-new-c-are-the-sentence-for-rust-in-critical-real-time-systems-c397f96c3b14
As the release of C++26 approaches, it is becoming increasingly clear to those of us who have long worked in critical real-time systems that this new standard will not just refine but surpass our expectations in extending system-level programming capabilities. It offers significant improvements in both security and performance, which will likely lead many of us to further reduce our use of C++’s competitors like Rust, Zig, and Go.
Rust remains highly effective for more deterministic systems where, unlike C++, the unsafe, non-deterministic parts are the exception rather than the norm. This characteristic makes Rust an excellent programming tool as a replacement for Haskell in certain contexts. As we all know, Rust’s ownership and borrowing system provides strong guarantees against common programming errors, making it highly suitable for systems where predictability and safety are paramount.
It is becoming increasingly clear that, given its competition with C++, the intended scope for Rust, as envisioned by its designers, is to focus on non-critical real-time applications while leaving the more complex, safety-critical systems to C++. In fact, as Rust evolves, it is steadily shifting towards a more functional paradigm — offering functional programming concepts like…
Tomi Engdahl says:
Embedded Rust: where are we today?
https://www.embedded.com/embedded-rust-where-are-we-today/
Have you heard about Rust? The marketing and cheerleading would have you believe that every team in the world is dropping everything and adopting Rust. Even the White House has jumped in and encouraged technology companies to adopt memory-safe languages as a way of life.
On the surface, it’s not a bad recommendation. Unfortunately, it completely ignores the reality of the state of businesses and the time, costs, and technical implications. There aren’t a lot of mature Rust developers, and businesses have billions, if not trillions, of dollars invested in existing frameworks and products.
Rust makes a lot of sense for general application development, but does it really make sense for embedded software teams? Where is Rust today, and is it the rosy solution everyone advocates?
Pure software products have the luxury of rapid change. Embedded software is tied to physical products that often have lifetimes approaching or exceeding a decade. That means you can’t just pivot and change your mind on a dime if you make a poor choice. It also means that many companies are carrying around existing intellectual property that they’ve invested millions of dollars to develop. They aren’t going to quickly throw away that investment because there is a fantastic new language everyone is pushing.
So, is Rust being adopted for embedded systems? Yes, in small pockets. In my conversations and discussions with hundreds of engineers, developers, etc, over the last year, I’ve come to a few conclusions about the state of Rust.
First, established teams are not adopting Rust. Teams that have existing products are using either C or C++. The teams that are using C are very interested in moving to C++.
C++ adoption makes sense because it’s a modern language that allows teams to leverage the intellectual property they’ve already developed. I’ve also found it’s easier for teams to adopt “C like C++”, which improves the robustness of their code without getting “too crazy” with modern C++ concepts.
Second, the teams that are adopting Rust and are the most passionate about it are start-ups. These companies don’t have any existing intellectual property and are starting from a clean slate. They are often made up of developers who are right out of school and have the flexibility and time to break through the Rust learning curve. They can take a risk on Rust because, as a start-up, the risk is already high, and the potential reward if they succeed will be worth it.
Tomi Engdahl says:
Top 10 Best Embedded Systems Programming Languages in 2024
Last Updated : 09 Apr, 2024
https://www.geeksforgeeks.org/embedded-systems-programming-languages/
Tomi Engdahl says:
https://www.microej.com/product/vee-software-container-embedded-systems/
https://www.telit.com/partners/microej/
Tomi Engdahl says:
https://www.designnews.com/embedded-systems/5-embedded-software-trends-to-watch-in-2024
Tomi Engdahl says:
https://www.linkedin.com/pulse/embedded-processors-market-2024-profitability-cmhxf?trk=organization_guest_main-feed-card_feed-article-content
Tomi Engdahl says:
https://www.embedur.ai/role-of-es-2024/
Tomi Engdahl says:
https://www.electronicproducts.com/embedded-world-2024-mcus-and-socs/
Tomi Engdahl says:
https://www.linkedin.com/pulse/navigating-scarcity-embedded-realm-challenges-solutions
Tomi Engdahl says:
https://www.uusiteknologia.fi/2024/09/11/sulautettujen-osaajapula-hidastaa-siirtymista-alustakehitykseen/
https://www.qt.io/press/platform-engineering-hindered-by-diverse-embedded-development-needs?hsLang=en&page=1
Tomi Engdahl says:
https://www.cognitivemarketresearch.com/embedded-operating-systems-market-report