Embedded Software Blog

Posts tagged with 'C'

Share and share alike

Posted Mar 21, 2011, by Colin Walls

A constant challenge I have found, when teaching or mentoring people, is to avoid making assumptions about what they know. I have found that it is so easy to assume that, because something is obvious to me, it is clearly apparent to everyone else. On numerous occasions I have discovered that this not to be the case. Of course, the best response to this realization is not to treat everyone else as stupid, … Read More

Tags: C, Development Tools, Programming Languages

Why move to C++?

Posted Mar 14, 2011, by Colin Walls

As I am on vacation this week, I thought that I would leave behind a short note, which might provoke some discussion. The most widely used programming language for embedded systems continues to be C. I observe great interest in the use of C++ and have frequently written and talked about the subject. Its adoption is also progressing steadily, though much more slowly than anticipated a decade ago. With … Read More

Tags: Development Tools, EDGE Compiler, C, Programming Languages

Embedded World 2011

Posted Mar 7, 2011, by Colin Walls

Last week I attended the Embedded World show in Nuremberg, Germany. I have been to this event most years and it just seems to get bigger and bigger. I have not seen the latest detailed statistics, but they claim to be the largest embedded exhibition in the world and I think that there is every reason to believe this claim is valid. The event is well organized and the location makes a lot of sense. I … Read More

Tags: FPGA, Clean Code, C, Embedded World, Agile

C++ reference parameters - the downside

Posted Feb 21, 2011, by Colin Walls

Something that I have discovered over the years is a great pleasure. When I am giving information - presenting, teaching, writing an article or a blog - it is not necessarily a one-way process. I often receive useful and interesting information back. I have commented that I learn as much from delivering a class as I might from attending one. I was recently talking about C++ for embedded at a conference … Read More

Tags: Programming Languages, C

C++ - for loops

Posted Jan 24, 2011, by Colin Walls

I am [mostly] a fan of using C++ for embedded applications. I believe its use needs care and I have written about this before. Broadly, I feel that it offers many simple improvements over C and appropriate use of object oriented techniques can be very beneficial. Today I want to talk about the place of C++ as a “better C language”. There are numerous syntactical improvements that can be … Read More

Tags: Development Tools, EDGE Compiler, C, Programming Languages

Firmly in line

Posted Nov 22, 2010, by Colin Walls

A common compiler optimization is the inclusion of a function’s code at the location(s) from where the function is called, instead of just having calls to the code located elsewhere: inlining. This provides a speed advantage, as the call/return sequence is eliminated, but may increase the memory footprint, if the function is more than a few instructions and is called more than once. I have written … Read More

Tags: Inline, Programming Languages, Optimization, Development Tools, C

C++ at fault

Posted Aug 30, 2010, by Colin Walls

I like being right. Who does not? I am also interested in programming languages. Part of their appeal is that, unlike almost all spoken languages, they have a precise definition or specification to which implementers endeavor to comply. Many languages, like C and C++, have ANSI/ISO standards, which nail down many of the details. These standards tend to be imperfect and aspects of the language can remain … Read More

Tags: Programming Languages, C

Who are you writing that for?

Posted Aug 10, 2010, by Hollis Blanchard

Some people believe code is be self-evident, and, like debuggers, comments in source code are a crutch for the weak developer. I am not one of those people. Commenting code is good. Comments not only help other people understand my code, they also help me understand my code when I re-read it 6 months later. But sometimes I see comments that make me cringe. Some examples: /* Check to see if this header … Read More

Tags: commenting, C

Function parameters

Posted Aug 9, 2010, by Colin Walls

When you use a function in C/C++ [or most other programming languages] you are likely to pass it some parameters - data which may be processed by the function or give it information on what action is required. For the majority of programmers, outside of the world of embedded software, parameters are just a fact - no real issues. They are likely to be quite uninterested in how parameters are passed and … Read More

Tags: C, Programming Languages, EDGE Compiler

When compilers do magic

Posted Jul 5, 2010, by Colin Walls

What is a compiler? Ask an average engineer and you will get an answer something like: “A software tool that translates high level language code into assembly language or machine code.” Although this definition is not incorrect, it is rather incomplete and out of date - so 1970s. A better way to think of a compiler is: “A software tool that translates an algorithm described in a high level language … Read More

Tags: compiler, EDGE Compiler, C