Embedded Programming

Week 4 — Group Assignment

Group Assignment
Compare microcontroller architectures, toolchains, and performance parameters across platforms.
Introduction

This week at Fab Lab Rwanda, we compared embedded architectures by running similar firmware on two platforms: an 8-bit AVR (ATmega328P) and a 32-bit ESP32 system. We focused on compilation behavior, memory usage, execution performance, and development workflow differences.

Architectural Comparison

We analyzed key hardware specifications to understand how architecture impacts performance and design constraints.

ESP32 microcontroller board

ESP32 Development Board

Arduino Uno microcontroller board

Arduino Uno Board (ATmega328P)

Feature ATmega328P (8-bit) ESP32 (32-bit Dual Core)
Clock Speed Up to 20 MHz 160–240 MHz
SRAM 2 KB ~520 KB
Flash 32 KB 4–16 MB
Connectivity External modules required Wi-Fi + Bluetooth
Toolchain & Workflow Analysis

Compilation Output

We compiled identical GPIO firmware across both platforms to compare build systems and memory footprint.

  • AVR: Uses avr-gcc with very small binary size (~KB range).
  • ESP32: Uses ESP-IDF toolchain with RTOS overhead and larger binaries (~hundreds of KB).

Testing Setup

UART communication was observed using lab instrumentation to verify timing and signal integrity across both platforms.

Key Findings
  • 8-bit MCUs are efficient for simple deterministic control systems.
  • 32-bit MCUs excel in high-performance and connected IoT applications.
  • ESP32 introduces RTOS complexity but enables multitasking and networking.
  • Toolchain differences significantly affect development workflow and debugging.
Learning Outcomes
  • Understanding MCU architectural trade-offs
  • Comparing embedded toolchains (avr-gcc vs ESP-IDF)
  • Analyzing memory and performance constraints
  • Documenting embedded system experiments