Embedded Software Blog

Posts tagged with 'Programming Languages'

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

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

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

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

Staying in line

Posted Feb 22, 2010, by Colin Walls

The idea of inlining code - placing the actual code of a small function at each call site - is a well known compiler optimization, which I have discussed before. This technique can provide significant performance improvements, due to the elimination of the call/return sequence. Also, stack usage is reduced. There is a possible cost in terms of increased program memory requirement. It is reasonable … Read More

Tags: C, Optimization, EDGE Compiler, Programming Languages, Inline