Edocti
Advanced Technical Training for the Software Engineer of Tomorrow
Edocti Training

Advanced C and C++ for Embedded Systems

Advanced
28 h
4.8 (142 reviews)

Scheduled sessions

No sessions are available at the moment.
Advanced C and C++ for Embedded Systems

Advanced Embedded Programming: Transition from basic platforms like Arduino or AVR to industry-standard ARM Cortex-M4 microcontrollers, focusing specifically on the STM32 G474RE.

Get hands-on experience by building a complete Automotive ECU Simulator, dividing team responsibilities between sensor data acquisition, precision motor control, and central system management.

Apply modern C and C++ practices to solve complex hardware constraints, optimize memory management, and conquer real-time scheduling challenges without the overhead of heavy abstractions.

Gain practical experience through intensive coding labs (~70% of the course) directly tied to automotive use cases, hardware-level interactions, and advanced debugging.

Who it’s for: Designed for software engineers with foundational C knowledge looking to master advanced concepts, bare-metal hardware access, and modern C++ in resource-constrained environments.

Skills You Will Learn

Advanced C/C++ STM32 Bare-metal Programming ARM Cortex-M4 Architecture ARM Programming RTOS & Task Scheduling Hardware Interrupts (NVIC) DMA & Zero-copy Pipelines Embedded State Machines Automotive ECU Simulation

Curriculum

Day 1 — Essential C/C++ and Memory-Level Fundamentals

  • Essential C & Language Evolution: Deep dive into the linker's job, ABI formats, promotion and overflow pitfalls, advanced pointer manipulation, multi-dimensional arrays, and solving portability issues caused by undefined behaviors.
  • Transitioning to Embedded C++: Understanding resource ownership and RAII (Resource Acquisition Is Initialization), contrasting smart pointers with static storage in environments strictly prohibiting dynamic memory allocation.
  • Data Management: Safely handling complex data types, utilizing the volatile keyword correctly, managing atomic operations, and resolving memory alignment and endianness challenges across different architectures.
  • Math & Optimization: Implementing fixed-point math for high-performance automotive algorithms and using constexpr to shift configuration overhead from runtime to compile time.

Day 2 — STM32 G474RE Architecture, Peripherals, and Hardware I/O

  • ARM Cortex-M4 Architecture: Transitioning from legacy 8-bit AVR to 32-bit ARM. Exploring the memory map, CPU core features, critical registers, addressing modes, and the Stack Pointer mechanics.
  • Hardware I/O & Peripherals: Bare-metal configuration of I/O ports (GPIO), setting up advanced Timers, Analog-to-Digital Converters (ADC), and PWM generation for precise motor control and sensor data acquisition.
  • Advanced Data Transfer: Utilizing memory buses, peripheral ports, and Direct Memory Access (DMA) controllers. Understanding DMA memory constraints, applying DMA masks, and implementing efficient, non-blocking DMA patterns.
  • Project Memory Strategies: Designing and integrating memory pools, ring buffers, and zero-copy pipelines to route raw sensor data to the control logic seamlessly without runtime heap allocations.

Day 3 — Concurrency, RTOS, and Time Management

  • Interrupt Handling (ARM NVIC): Mastering the Nested Vectored Interrupt Controller. Best practices for writing Interrupt Service Routines (ISRs)—identifying strictly what to do and what to avoid, ensuring ISR-safe code, and utilizing deferrable functions.
  • RTOS Essentials & Task Scheduling: Core real-time scheduling concepts, understanding context switching, thread lifecycles, and comparing cooperative versus preemptive scheduling mechanisms in embedded limits.
  • Scheduling Algorithms: Analyzing periodic versus sporadic tasks, comparing rate-monotonic and EDF (Earliest Deadline First) algorithms, and exploring techniques for accurately estimating Worst-Case Execution Time (WCET).
  • Synchronization & Shared Resources: Safe resource sharing using mutexes (comparing robust vs. non-robust policies), identifying critical priority inversion issues, and implementing priority ceilings to protect execution flow.

Day 4 — Software Architecture, State Machines, and Final Integration

  • Object-Oriented Methods for Performance: Implementing constructors and destructors natively. Evaluating static vs. dynamic polymorphism, utilizing CRTP (Curiously Recurring Template Pattern), and applying the Pimpl idiom for clean embedded interfaces.
  • State Machines Done Right: Managing complex automotive application logic through robust state machines. Building state hierarchies, distinguishing Mealy/Moore models, managing operation modes, and ensuring safe code reentrancy.
  • Power Management: Exploring STM32 system power states, implementing low-power modes, and balancing computational performance with strict energy efficiency requirements in automotive environments.
  • Final Project Integration: Assembling the autonomous ECU simulator modules (sensor, actuator, manager). Conducting hands-on debugging directly on the STM32 G474RE board, performing code reviews, and validating the final firmware.

Optional modules

Optional — Automotive Standards & Safety Compliance

  • ISO 26262 alignment basics: ASIL thinking, safety goals, and hardware safety mechanisms overview.
  • Static analysis integration: Adopting MISRA C/C++ compliance essentials and incorporating basic CI smoke tests.

Course Day Structure

  • Part 1: 09:00–10:30
  • Break: 10:30–10:45
  • Part 2: 10:45–12:15
  • Lunch break: 12:15–13:15
  • Part 3: 13:15–15:15
  • Break: 15:15–15:30
  • Part 4: 15:30–17:30

Did you attend this course?

Your feedback is invaluable to us. Please share your experience with us and help us improve this course for future participants.

Share your feedback

Want to find out more? We are here to help!

Or email us directly at training@edocti.com.