Archive for the ‘Efficient C/C++’ Category

Most Popular Embedded Gurus Blog Posts of 2013

Tuesday, December 17th, 2013 Michael Barr

Below are the top 10 most read blog posts from the Embedded Gurus in 2013.

#1: An Update on Toyota and Unintended Acceleration

#2: Efficient C Tip #13: Use the Modulus (%) Operator with Caution

#3: A Tutorial on Signed and Unsigned Integers

#4: A Tutorial on Lookup Tables in C

#5: Embedded C Programming with ARM Cortex-M Video Course

#6: What Belongs in a C .h Header File?

#7: Don’t Follow These 5 Dangerous Coding Standard Rules

#8: Computing Your Stack Size

#9: Combining C’s volatile and const Keywords

#10: Real World Variables

Most Popular Embedded Gurus Blog Posts of 2011

Friday, January 6th, 2012 Michael Barr

Below are the top 10 most read blog posts from the Embedded Gurus in 2011.

#1: Efficient C Tip #13: Use the Modulus (%) Operator with Caution

#2: A Tutorial on Lookup Tables in C

#3: Unintended Acceleration and Other Embedded Software Bugs

#4: Don’t Follow These 5 Dangerous Coding Standard Rules

#5: Protothreads versus State Machines

#6: What Belongs in a C .h Header File?

#7: Computing Your Stack Size

#8: Do Inline Function Bodies Belong in C Header Files?

#9: The N_ELEMENTS Macro

#10: Is “(unint16_t) -1” Portable C Code?

Reduce Energy Use via Power Debugging

Monday, January 10th, 2011 Michael Barr

According a recent study by the European Union, approximately 10% of electricity used in homes and offices is ‘vampire power’. That is to say that even when many products, especially embedded systems, are turned “off” they are still consuming power! The same report puts the total amount of energy wasted in this way, within Europe alone, at dozens of Terawatt hours per year.

Thus developers of all embedded software (not just those designing for battery-powered systems) should take note: A few months back, embedded C/C++ compiler vendor IAR Systems added a handy and innovative new debugging feature to the Embedded Workbench for ARM (EWARM) IDE. The new feature is called “Power Debugging”.

I’ve just now finally had a chance to play around with the Power Debugging feature in EWARM 6. Here’s the kind of stuff you can do with this powerful new development tool:

  • Capture a timeline graph of current consumption in a window in the debugger–with no need for an oscilloscope or any other external tool hookup. (The power debugging feature gets its data from your JTAG interface, which is installed so it powers the target processor.)
  • Highlight individual datapoints in the power timeline to see how much current was consumed at that point, as well as where the program was at the time. You can easily jump back and forth between the high-level source code debug window and the power graph!
  • Sort a list of functions by their average, minimum, or maximum current consumption–combining the time cost profiling capability already in EWARM with a power cost capability.

With this new tool at your disposal, finding the right code to optimize to reduce power consumption is easier than it has ever been. I applaud IAR for developing this innovative feature as well as for including power debugging free in the price of the EWARM IDE.

If you want to find out more, you could watch the short video overview at http://www.youtube.com/v/vrMpD3ttgCE or read the white papers, FAQ, and press releases at http://www.iar.com/power.

Most Popular Embedded Gurus Blog Posts of 2010

Wednesday, December 29th, 2010 Michael Barr

Below are the top 10 most read blog posts from the Embedded Gurus in 2010.

#1: Take the Mutual Exclusion Challenge (Mutexes vs. Semaphores)

#2: Toyota’s Embedded Software Image Problem

#3: Setting a Bad Example, Part 1

#4: 3 Things Every Programmer Should Know About RMA

#5: A Tutorial on Lookup Tables in C

#6: Efficient C Tip #12: Be Wary of Switch Statements

#7: Top 10 Causes of Nasty Firmware Bugs

#8: Efficient C Tip #11: Avoid Passing Parameters by Using More Small Functions

#9: Computing Your Stack Size

#10: Firmware-Specific Bug #1: Race Condition

Most Popular Embedded Gurus Blog Posts of 2009

Monday, November 8th, 2010 Michael Barr

Below are the top 10 most read blog posts from the Embedded Gurus in 2009.

#1: Sorting (in) Embedded Systems

#2: Electrical Engineers vs. Computer Scientists

#3: Binary Literals in C

#4: Robust Embedded Software Architecture in 5 Easy Steps

#5: Understanding Stack Overflow

#6: Signed vs. Unsigned Integers

#7: Computing Your Stack Size

#8: Efficient C Tips #1: Choosing the Correct Integer Size

#9: Embedded Programmers Worldwide Earn Failing Grades in C and C++

#10: PIC Stack Overflow