Embedded.com Tech Focus Newsletter (1-18-10): C-Programming

Newsletter


01-18-2010

The Embedded Newsletter is delivered to youfree of charge from the staff of Embedded.com. To view the Embedded.com site , visit: http://www.embedded.com
#Ad:Top_leaderboard#
TECH FOCUS – GETTING SERIOUS ABOUT C-PROGRAMMING
In his most recent column , Michael Barr discusses thetroubling results of an on-line multiple choice test onfirmware-related C knowledge taken by several thousand programmers overa three year period.

Based on its results, his conclusion is that programmers merit afailing grade of D-minus, an alarming result considering that embeddedsystems based on C are everywhere, from medical devices to anti-lockbrakes. What is even more troubling is that those who took the testwere not a general sampling of all programmers, but a self-selectedgroup who took the test because they thought they could do well.

But mitigating these results is the fact that online quiz formatsare an artificially structured environment not reflective of an actualwork situation. In the test you are asked to test your memory andselect the right answer. In a work environment, developers usually havereference books, debugging tools, advanced compilers, and high leveldesign tools that generate code automatically. All these allow adeveloper to worry first about getting the flow and structure of thecode right and then fixing things later. What do you think?. Read Michael Barr'scolumn and participate in the discussion.

At Embedded.com, we focus on giving you design articles that helpyou with your programming tasks. First, there are the regularcontributions on C-programming from columnists such as Michael Barr, Jack Ganssle and Dan Saks. Second, there areongoing programming articles on the basics of programming embedded processors, practicalembedded coding tips ,   coding standards such as MISRA C , garbage collection in C, memory allocation inC , and rules for writing cleancode, and using pointerless C , for example.

Third, we provide application articles on how to use yourC-programming expertise in new environments such as multicore, parallel programming,DSP and FPGAs.

Are we doing enough? Do you want more basics articles? Or more onapplying C in new design situations? What are your suggestions forarticle topics? I look forward to hearing from you. (Embedded.com Editor Bernard Cole, bccole@acm.org )

  MICHAEL BARR on C-Programming
Embedded systems programmers worldwide earn failing grades in C
In industry surveys, more than 80% of embedded software developers report using either C or C++ as their primary programming language. Yet as a group, they earned a failing grade on a multiple-choice evaluation of their firmware-related C knowledge.
Real men program in C
Today's computer science students equate learning C with taking an elective in Latin; but C is far from being a dead language in the embedded world.
  C-PROGRAMMING FUNDAMENTALS
Deterministic dynamic memory allocation & fragmentation in C & C++
Colin Walls details the problems with dynamic memory allocation, which tends to be non-deterministic, leading to unexpected allocation failures and describes an approach that resolves such issues.
How to travel safely in embedded code space
Anderson McKay of Green Hills provides a list of ten tips to help you find your way through your software development environment safely.
Automating Compliance to MISRA C/C++ Standards
While C and C++ has the features a software development team need to write well laid out, structured, and expressive code, in the wrong hands this flexibility can lead to perverse and extremely hard to understand code.
Garbage collection in C-language code applications
One of the biggest advantages of C# and Java over C is their support of garbage collection. In this article Steve Rhoads describes ” and provides the source code for – a garbage collector for use with C-language code.
Back to the Basics – Practical Embedded Coding Tips: Part 1
In this six part series, excerpted from a recent book for students, Jack Ganssle deals with the many embedded C-language coding problems and gotchas and provides some helpful hints on how to resolve them. Up first in Part 1: reentrancy, atomic variables and recursion.
The basics of programming embedded processors: Part 1
In this nine part tutorial, Wayne Wolf presents in a clear and concise way the basics of embedded programming using C on microcontrollers. Up first, program design and analysis.
The best coding standards eliminate bugs
Fergus Bolger provides a brief tutorial of the Motor Industry Software Reliability Association (MISRA) C and C++ guidelines for bug detection, avoidance, and prevention.
Six Rules for Writing Clean Code
What constitutes an effective coding style? Here are six general rules for writing clean code that will help you steer clear of the problems that poor coding style creates.
Saving space with Pointer-less C
This unusual and creative approach to standard C programming can save space and time in your design without losing C's efficiency. A clever piece for all embedded systems programmers.
  PUTTING C TO WORK
Combining C code with assembly code in DSP applications
Here's how to integrate assembly code into C for maximum performance and programmer productivity. Topics covered include compiler conventions, inlining, intrinsics, register binding, and debugging strategies.
Use OpenMP for programming parallel threads in multicore applications: Part 1
In the first of four articles, Intel's Shameem Akhter and Jason Roberts present the case for the OpenMP API as a way to write code for highly parallel multicore and multithreaded designs.
Optimizing C programs for embedded SoC applications
Dror Maydan and Steve Leibson provides some guidelines for optimizing C programs in embedded SoC applications using compiler code optimizing efficiency and source code programming styles.
C-Language techniques for FPGA acceleration of embedded software
This paper presents a set of examples showing how computationally-intensive algorithms can be written, analyzed, and optimized for increased performance in FPGAs.
Interactive C-code cleaning tool supports multiprocessor SoC design
To simplify the development of code suitable for parallelization and mapping on multiprocessor platforms, researchers at IMEC have developed a set of CleanC guidelines and a code analysis and refactoring toolbox to make code compliant to the CleanC programming style.
Program and optimize DSP C code: Part 5
How to optimize memory performance and make speed vs. size tradeoffs.
  JACK GANSSLE on C-Programming
The Dearth of C Training
New grads learn on huge systems. Are they prepared for resource-constrained system development?
MISRA minimizes mishaps
Program proactively. Write code that's inherently great before some tool reformats it.
  DAN SAKS on C-Programming
Freestanding vs. hosted implementations
Both the C and C++ standards define two different levels of library support, but neither may be the one you actually have to use.
Into, but not out of, the void
C and C++ both use “void *” as the generic data pointer type, but they treat it differently. Here's some insight into why.
  EDITOR'S NOTE: Continuing Your Education

Two new online courses you might want to sign up for: Fundamentals of Audio Networking, on the basics of networked audio, and Fundamentals of Storage, on the evolution of storage and the advantages and drawbacks of current storage strategies such as RAID, SAN and NAS.

Also, be sure to register for ESC Silicon Valley, where we've added a second Build Your Own Embedded System (BYOES) track. When you register you get a multi-core board with classes to program it. Then, at a second set of classes, attendees get a Freescale Tower system.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.