Optimizing C for Microcontrollers - Best Practices
Offered By: Linux Foundation via YouTube
Course Description
Overview
Explore best practices for optimizing C code on microcontrollers in this 53-minute conference talk by Khem Raj from Comcast RDK. Discover tips and techniques for writing efficient C programs, using Zephyr as a case study to demonstrate size and performance optimizations. Learn about leveraging GCC for microcontrollers and RTOSes like Zephyr, covering topics such as compiler switches, linker scripts, data types, variable usage, loop optimization, and inline assembly. Gain insights into memory management, code organization, and compiler-friendly practices to squeeze the most out of your microcontroller projects.
Syllabus
Intro
Knowing Tools - Compiler Switches
Linker Script (Memory Map)
Linker Map
Binutils Tools
Data Types
Slow and fast integers
Portable Datatypes
const' qualifier for variables and function parameters
Const volatile variables
Global variables
Global Vs Local
Static Variable/Functions
Array subscript Vs Pointer Access
Loops (Increment Vs Decrement)
Loops (post Vs Pre Decrement)
Order of Function Parameters
Inline Assembly
Optimizing for DRAM
Help the compiler out!
Optimizing your code
Taught by
Linux Foundation
Tags
Related Courses
Comprendre les MicrocontroleursÉcole Polytechnique Fédérale de Lausanne via Coursera Electronic Interfaces: Bridging the Physical and Digital Worlds
University of California, Berkeley via edX Arduino y algunas aplicaciones
Universidad Nacional Autónoma de México via Coursera Embedded Systems Design
Indian Institute of Technology, Kharagpur via Swayam Enseignes et afficheurs à LED
École Polytechnique Fédérale de Lausanne via Coursera