Faster code Fridays: Avoid floating point math

Everyone seems to have a snazzy weekly feature these days, and we didn’t want to feel left out.  Unfortunately, we could only think of a few catchy names for our series, and it’s not Friday today.  Oh well.  Consider it a preview publication.

Embedded systems often deal with time critical applications that require maximum performance and minimum execution time.  Writing efficient code requires solid study of language and platform fundamentals, and there’s no substitute for concentrated practice.  However, there are small tips and tricks to squeeze the last drop of performance out of your programs.  Faster code Fridays highlights these techniques so you can implement them into your repertoire. We’ll use Arduino-compatible code for most of our examples, though these techniques will work on a number of platforms.

Alright already, we’ll all float on

Mfile: Generate proper Makefiles for your AVR-GCC projects

GNU Make - A program for direction compilation book cover.When you start programming AVRs, you already have your hands full with learning the C language, I/O registers on your chip, and how to manipulate the hardware.  However,  you also have to worry about your development environment.  Figuring out how to compile code, get it on your device, and debug it can seem overwhelming when you’re trying to tackle one thing at a time.