Embedded Programming
Week 4 — Group Assignment
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.
We analyzed key hardware specifications to understand how architecture impacts performance and design constraints.
ESP32 Development 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 |
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.
- 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.
- Understanding MCU architectural trade-offs
- Comparing embedded toolchains (avr-gcc vs ESP-IDF)
- Analyzing memory and performance constraints
- Documenting embedded system experiments