Monday, 30 April 2018

Embedded C++ for MSP430 using IAR compiler

In my current project, I used Embedded C++ for MSP430 using IAR compiler. I re-created an existing assembly project and I was able to reduce the code size from 30KB down to 15KB. Yet, I have more features in my new Embedded C++ firmware. I am very careful with the C++ features that I used due to limited resources (processing power, RAM, FLASH size), the most expensive thing that I used is the virtual method which I essentially needed to implement strategy and template method design patterns.  I also used the Instantiator Based Programming Paradigm to eliminate unneeded build times (similar to C++ PIMPL) and to be able to adhere to a good programming principle: "Program to Interface, Not to implementation."

At the end of the project, the code size is small, the code is very expressive, code is unit-testable and the software architecture is very flexible due to application of object-oriented design patterns.

I am very impressed with the IAR C++ compiler.

No comments:

Post a Comment