Embedded Software Blog

Posts tagged with 'C'

System-C for embedded systems programming

Posted Nov 28, 2011, by Colin Walls

I recent wrote about the similarity in software and hardware design, as they are both performed by writing code in a high level programming language. My colleague Richard Vlamynck, wrote to me, suggesting that he might be able to usefully expand on this topic. He is an unusual guy, even within Mentor Graphics, as he is a modern day “Renaissance man” – he has a very good understanding … Read More

Tags: Precision, C, VHDL, Programming Languages, System-C

Hardware designers and software

Posted Oct 31, 2011, by Colin Walls

As I work for a company that has traditionally had a strong focus on hardware design, I am particularly interested in the relationship between hardware and software development and the synergies between the two disciplines. Previously, I have discussed the dominance of software in modern designs [here] and the relationships in the EDA world [here]. But today I want to think about how hardware guys … Read More

Tags: Hardware, C, Verilog, VHDL, hardware design, Programming Languages

Dennis Ritchie and C for embedded

Posted Oct 24, 2011, by Colin Walls

I was, of course, saddened to hear the recent news of the death of Steve Jobs. Since then, the Internet has been buzzing with stories, anecdotes and speculation about him. As a result, the news of the death of another key figure in the computing world barely got a mention: Dennis Ritchie died on 12 October 2011. Although not so much of a household name as Jobs, there are many [including myself] who … Read More

Tags: Dennis Ritchie, C, Steve Jobs, Linux, Programming Languages

Efficient code - quiz answers

Posted Oct 10, 2011, by Colin Walls

Two weeks ago, I set a quiz. I listed four ways to write some code, which was supposed to divide an unsigned integer by 8. I commented that the priority was for the code to be as fast as possible and asked which of my lines of C was most efficient. I was pleased with the response and acknowledge contributions from Peter Bushell, Dan S, Ken Simone, Krzysztof Wesołowski, Lee Riemenschneider, and Shaun … Read More

Tags: Development Tools, C, Optimization, Programming Languages

Efficient code - a quiz

Posted Sep 26, 2011, by Colin Walls

I was recently reading a set of “golden rules” for embedded programming. I am very skeptical about such proscriptive instructions as, for them to be valid, a great many assumptions must be made and clearly stated. These rules were supposed to promote the production of safe, efficient code. I am OK with “safe” – that simply means that the code does what it is supposed to … Read More

Tags: Development Tools, C, Optimization, Programming Languages

C libraries

Posted Sep 19, 2011, by Colin Walls

For a software developer, the idea of a library is quite simple: It is a file containing a [typically large] number of functions/procedures/subroutines in a special format. At link time, the linker looks in the library [or there may well be more than one, in which case it checks each in turn] to resolve any references to functions not satisfied by the supplied object modules. This means that the programmer … Read More

Tags: Development Tools, C, Programming Languages, libraries, Linux

Embedded tools - the third way

Posted Jul 25, 2011, by Colin Walls

A significant factor in getting any job done properly is having the right tools. This is true whether you are building a kitchen, fixing your car or developing embedded software. Of course, it is the last of these that I am interested in here. I have been evangelizing on this topic for years [decades!]. The problem is that there is a similarity – arguably superficial – between programming … Read More

Tags: Development Tools, C, Open Source

What language?

Posted Jul 18, 2011, by Colin Walls

I have always been interested in programming languages. The first one I used, way back when I was at university, was FORTRAN [4, not 77]. I then moved on to do a bit of assembly, BCPL, a few flavors of Algol, Simula 67, SNOBOL 4 – just about everything that was around at the time, except COBOL. Later, in the course of my career as a software engineer, I came back to FORTRAN and assembly, then … Read More

Tags: Java, Programming Languages, C

Data types and code portability

Posted Jul 11, 2011, by Colin Walls

I recently attended a presentation about the challenges with porting code from 8/16-bit CPUs to 32-bit devices. The speaker addressed all the major issues, giving me a few things to think about. One area that particularly caught my attention was the thorny issue of C language data types. With the intention of making it easy to write portable code, the specification for (traditional ANSI) C explicitly … Read More

Tags: Programming Languages, C

Device registers in C

Posted Mar 28, 2011, by Colin Walls

Mentor Graphics has historically been dedicated to providing tools for electronic hardware designers and that still represents a very large proportion of the business. Ever since I was acquired into the company, I have found that the hardware focused guys have a healthy interest in software - embedded software in particular. Often, they are specifically concerned with the boundary between software and … Read More

Tags: EDGE Compiler, C