Abelon News

Embedded Firmware Refactoring, Optimisation and Migration

Abelon news item

Even if you aren’t planning to develop a brand new product, there are a number of options to help improve your current embedded product line.

Legacy products are often based on older hardware platforms which often become obsolete or end-of-life by the silicon vendor. Customers are also always looking for better features and improved performance but either don’t want to invest in new hardware or need to retain the current field population of devices.

These are ongoing challenges for any product manufacturer, but are particularly highlighted in embedded systems where product lifetimes are typically much longer than in consumer markets.

This article looks at three of the most popular options to help you address these issues, and why you may want to consider them.

Firmware Optimisation

Optimising your existing firmware to provide better performance and new features while still retaining the investment in your current hardware platform is often the most obvious step for an embedded systems manufacturer.

Developing a new hardware platform is often a lengthy, complex and expensive business, and requires you and/or your customers to make a sizeable investment to replace the existing systems.

The alternative is to improve the performance of your current system to make it run better on your existing hardware platform. This will not only reduce cost and time to market, but provides an opportunity to add new features, fix existing issues and enhance reliability.

Optimising your embedded system is often a task where using a fresh pair of eyes can yield benefits, particularly if the engineers concerned have experience of this type of work and know the sort of pitfalls to watch out for.

Your own engineers are sometimes too close to the current design to be able to take an objective view of what is required to make the system run better. Using a third party such as Abelon Systems can frequently be the best way improve performance and reliability while allowing your own team to continue with their existing projects.

Remote firmware upgrade is becoming increasingly popular, but it is a feature that needs to be designed in – it is very hard to retrofit it to a system already in the field!

However, what you can do is add it to your next product release and then use it for future upgrades. Of course not all systems are suitable for remote upgrading, but with more and more IoT systems having IP or wireless connectivity then it is often a viable additional feature for many new products.

Abelon have many years of experience of providing remote firmware upgrade capability and are well placed to provide advice on the best methods to use.

Firmware Refactoring

Firmware refactoring is often overlooked as a means of making legacy code easier to understand and maintain, but an effective refactoring exercise can greatly improve the quality of older code, reduce the time to add (or retrofit) new features, and remove the maintenance burden from the original code authors who are frequently more senior and would be better employed on new design work.

Many successful products are based on legacy code and the longer they run, and the more successful they are, the less engineers want to perform a major redesign on them. This leads to the firmware being a mixture of old and new code, often with different coding styles and varying levels of comments and documentation.

Adding new features, particularly ones that are not straightforward, can result in a lot of time being spent trying to review the current code and understand what it does, and means that adding these new feature is a complex and painful business. Consequently they will often be added in new files, using different design templates and coding standards which in turn help to propagate the issues.

Carrying out a detailed refactoring exercise can help to unify the legacy code base and make it more maintainable. A fresh pair of eyes can often identify possible (or actual) bugs or weaknesses in the code and address them before they reach the customer.

Obviously it is essential to understand what the legacy code is supposed to do so an accurate design specification is important. However design documents are often not kept up to date, so a secondary outcome of the refactoring exercise may be an updated design specification, which again will add to the maintainability of the code.

Finally it is important to ensure that the refactored code still does exactly what it is supposed to do, and so a suite of regression tests which can be run before and after are also essential. As with the design specification however, regression test suites are often not kept up to date, and so the refactoring is an opportunity to add the missing test capability.

The end result is then a code base which is once again fit for purpose and can be used as the basis for future development for years to come.

Firmware Migration (or “Porting”)

Sometimes the previous options are simply not sufficient, and you have to look at moving to a new hardware platform, which usually offers higher performance and is often cheaper and lower power.

Although this inevitably requires investment in a new hardware design, the results can be fairly spectacular and very cost effective if approached correctly.

A typical firmware migration project not only requires an understanding of the product requirements, but also experience of the new hardware and firmware environment. The old and new firmware may run on different operating systems and/or types of processor, and using experienced engineers to carry out this porting work can help dramatically reduce the risks and amount of work required.

The migration may also be combined with a refactoring exercise as described above so that a lot of the previous investment in developing the legacy system can be retained, but re-written so that the end result is much more efficient and offers higher performance, while still being maintainable.

Abelon can offer a range of services to help you with any of the above options. This can range from providing consultancy on how best to address your requirements all the way through to modifying and testing the final system.

If you would like to discuss any of the above topics, please don’t hesitate to contact us.

Related news

Other news and updates from Abelon

14
Nov
21 years ago today myself and two colleagues from Lucent Technologies set up this wee company together – little did we know then what...
03
Apr
In these challenging times, we wanted to take a moment to update you on how Abelon Systems are responding to the coronavirus. Our hearts...
13
Jan
Machine Learning (ML) is traditionally associated with large servers and enormous amounts of computing power. However recent improvements in both the efficiency of the...