What to Consider When Using Embedded Open Source Code?

I am Lao Wen, an embedded engineer who loves learning.Follow me, and let’s become better together!Embedded software engineers can generally find corresponding information online when implementing certain product features, and by modifying existing resources, they can achieve the basic functionality.This is perhaps the power of open source, which helps many developers quickly integrate existing software resources for their use, but these software and resources also have their pros and cons.On one hand, developers need to have sufficient capability to handle these software; on the other hand, they should choose more reliable open source components to use.

Source:

https://www.designnews.com/design-software/5-best-practices-utilizing-open-source-software

The English article describes five points regarding the use of embedded open source software, which I believe most embedded developers need to consider. Here, I share them with everyone:

Translation:

Open source software is everywhere and has the potential to help companies accelerate development and improve software quality. However, if not handled carefully, they can pose challenges.

Here are five best practices for successfully utilizing open source software.

1. Use an Abstraction Layer to Resolve Dependencies

A common issue found when reviewing codebases is that developers tightly couple application code with the software libraries they use.For example, if a developer is using FreeRTOS, the application code calls methods specific to the FreeRTOS API. If the developer decides to change the RTOS, they must rewrite a significant amount of code to replace all those RTOS calls.

You might think that changing libraries is rare, but you would be surprised; often, teams start using a certain operating system, library, or component, and when they decide a change is needed, they have to go back and rewrite code.

When a team selects an open source component, or even a commercial component, the first thing they should do iscreate an abstraction layer that interacts with that component.

For RTOS, for example, a team should use an OS abstraction layer (OSAL) that allows them to write application code using OS-independent APIs.

If the operating system changes, the application won’t care because it is accessing an abstraction layer, and software changes may only take minutes instead of days.

2. Leverage Integrated Software Whenever Possible

Most open source software is written in its own sandbox without considering other components it may need to interact with. Components are often written using different coding standards, styles, levels of testing, etc.

When you start combining multiple open source components that are not designed to work together, it can lead to long debugging sessions, headaches, and missed deadlines. Therefore,choose components that have already been integrated and tested together whenever possible.

A good example is using Amazon FreeRTOS to connect to AWS. FreeRTOS has already been integrated and tested with the additional connection libraries needed to connect to the cloud, so do not choose other libraries unless they have also been tested and integrated.

Another example is the code generation tools produced by many microcontroller manufacturers.

These tools often come pre-integrated with driver software components, RTOS, file systems, USB, and other components. They have been proven to work together, saving time and money.

3. Software Review and Quality Analysis

There are many excellent open source software options, but there are also many poor ones. Before developers decide to use open source components in their projects, they need to ensure they conduct due diligence on the software or hire someone else to do it.This includestaking the time to review components and perform quality analysis.

When starting to use open source components, at a minimum, the following aspects of the source code should be checked: complexity using cyclomatic complexity metrics, ensuring it meets business requirements and goals functionally, adherence to best practices and coding standards (as needed), error handling capabilities, and testability.

This can at least help developers understand what they are using and the potential issues and pitfalls.

4. Choose Software from Active Designs

It is always tempting to find software components that solve problems through a quick web search or browsing GitHub. When selecting an open source component, it is crucial to ensure it has an active community.This includes getting quick responses to questions on forums, regular releases of new versions, and continuous improvements of the software with new features.Choosing a component from an inactive community can lead to developers being forced to solve problems on their own or, worse, having to maintain the component themselves.

5. Have a Lawyer Review Licenses

Open source software licenses can be complex. There are dozens of different licensing schemes that impose different requirements on users.

In some cases, developers can use open source software as they see fit.In other cases, the software can be used, but any other software must also be open source.

Although these licenses have become easier to understand in recent years, product developers are running a business, so it is necessary to hire a lawyer to review software licenses.

This is an additional expense, but it is part of the cost that can save money in the long run.

6. Finally

Properly leveraging open source software can greatly benefit development teams. However, for success, developers need to ensure they make wise choices regarding open source components.

This includes abstracting components to ensure their applications remain flexible and maintainable.

It is also necessary to carefully examine open source software,to ensure it meets quality and general requirements.Following these best practices can help teams avoid pitfalls that lead to product delays, poorly architected solutions, quality issues, and many other common problems in product development.Source: Network Expert

-END-

Previous Recommendations: Click the image to read moreWhat to Consider When Using Embedded Open Source Code?

Embedded software programming, is C++ widely used now?

What to Consider When Using Embedded Open Source Code?

Embedded development, with little money and many problems, I advise you not to enter the industry?

What to Consider When Using Embedded Open Source Code?

Embedded development, learning microcontrollers has no future, often advised to quit!

I am Lao Wen, an embedded engineer who loves learning.Follow me, and let’s become better together!

Leave a Comment