C Programming for Embedded Applications
2h 5mAdvanced2022-02-03
Authors

Eduardo Corpeño
Electrical Engineer, Computer Programmer, and Teacher for 15+ years
Course details
Learn to write embedded software in C and deliver applications that are small, efficient, and fast. In this course, instructor Eduardo Corpeño explains how C programming and the Internet of Things combine in embedded applications—software that permanently resides on a device. He reviews the challenges involved in this type of programming, ranging from memory, storage, and power limitations to hardware awareness. He explains how different data types can affect the performance of your app and reviews bit manipulation—an area where C shines. Eduardo shows how to manipulate bit-level data using bit masking and bit fields, demonstrating the strengths of both techniques with an Arduino controller. Then learn how to use the volatile and const variables to enforce data correctness and read-only access, and explore alternatives to traditional functions, which may take too long to run, and floating-point math, which consumes CPU.
Skills covered
CProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Getting started in embedded systems
- 02 - What you should know
- 03 - Using the exercise files
1. Embedded Systems
- 04 - Applications - OS vs. embedded
- 05 - Memory
- 06 - Storage
- 07 - Energy consumption
- 08 - Processing power
- 09 - Hardware awareness
- 10 - C vs. Embedded C
2. Data Types
- 11 - Integral types
- 12 - Floating-point types
- 13 - A quick analysis of memory usage with Keil
- 14 - Checking memory usage with Arduino
3. Bit Manipulation
- 15 - Masking
- 16 - Bit masking with Arduino
- 17 - Bit fields
- 18 - A bit field example with Keil
4. Qualifiers
- 19 - The volatile qualifier
- 20 - The const qualifier
- 21 - Protect variables using volatile
- 22 - Don't let the optimizer remove your while loop
5. Function Alternatives
- 23 - Lookup tables
- 24 - Macro functions
- 25 - Inline functions
- 26 - LUT vs. function example in Arduino
- 27 - LUT vs. function example in Keil
- 28 - Inline function example in Keil
6. Floating-Point Unit Alternatives
- 29 - Software implementation of float
- 30 - Fixed-point math
- 31 - Float-point vs. fixed-point example
- 32 - Float-point unit example in Keil
Conclusion
- 33 - Next steps
Related courses
Related learn paths
- The Top Skills Engineering Professionals Have Right Now
- Become an Arduino Developer
- Prepare for the MTA: Software Development Fundamentals Exam (98-361)
- Become a Software Developer
- Getting Started with C++
- Getting Started as a C# Developer
- Advance your Node.js Skills
- C++ Programming Professional Certificate by OpenEDG C++ Institute