Thought Leadership

Better C code webinar

By Colin Walls

Early embedded software was written in assembly language in order to accommodate the limited memory and CPU power available. At that time, compilers were quite inefficient and it took a while before high level languages became popular and then mainstream. Although a number of languages have been used over the years – and still are – C quickly became the most popular choice. Of late, its popularity seems to have increased even more, as less and less assembly language is crafted. But C is not the ideal language for embedded …

C is attractive to embedded developers because, apart from its wide availability, it has a rich mixture of functionality and power, in the context of quite a small language. Unfortunately, the power of the language can also be its downfall, as errors are all too easy to introduce and may be hard to find. The best way to deploy C – particularly in a safe or secure application – is to apply a well-defined set of programming guidelines that constrain the use of the language to avoid difficult issues.

For some time I have been keen on the MISRA C standard, which, as soon as I began to become familiar with it, I realised was useful way beyond its automotive roots. This is a topic that I have written about from time to time. Another approach is to consider the requirements for writing certifiable C code. There are a number of different certification authorities, but the CERT C programming standard is intended to guide developers in the right direction.

Although, on the surface MISRA C and CERT C are competing standards, they are actually quite complementary and show a lot of overlap. With this in mind, I have been working with Doulos to put together a webinar on this topic: a compare and contrast of the two standards. Two sessions are planned next week on Tuesday 24 April. You can sign up to attend here.

 

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/embedded-software/2018/04/16/better-c-code-webinar/