Thought Leadership

Better C code webinar (redux)

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 did some work with Doulos to put together a webinar on this topic: a compare and contrast of the two standards. This webinar proved very popular, so two further sessions are planned this week on Wednesday 23 January.

Colin Walls

I have over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, I am a member of the marketing team of the Mentor Graphics Embedded Systems Division, and am based in the UK. Away from work, I have a wide range of interests including photography and trying to point my two daughters in the right direction in life. Learn more about Colin, including his go-to karaoke song and the best parts of being British: http://go.mentor.com/3_acv

More from this author

Comments

2 thoughts about “Better C code webinar (redux)

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/embedded-software/2019/01/21/better-c-code-webinar-redux/