#12 Firmware in C++
Almost all firmware is written in C and even the mere idea of anything else can spark a heated debate. Here are some things we believe to be true:
– It’s just as crucial for firmware as for any other code to follow good coding practices, such as clear control flow and no duplication of code
– It’s possible to write good code in both C and C++
– C++ offers features on top of C that encourage writing good code, if used correctly
– C++ also offers features that are very rarely appropriate in firmware (the ‘new’ operator, exceptions, standard libraries…)
– Many people writing firmware today don’t have a lot of experience with C++ and so many of the benefits might go unused
We’ve written firmware in C++ and have been very happy with the results. Would you consider it for your next project?
Want to scale up your IoT solution?
Get in touch today to set up a preliminary discussion with our IoT wireless mesh experts to improve your position for the future.