Week 4

Embedded Programming (Full Documentation)

Unabridged Group Work Documentation ensuring 100% content preservation.

Week 4: Embedded Programming

Group Assignment:

  • Demonstrate and compare the toolchains and development workflows for available embedded architectures
  • Document your work on the group work page and reflect on your individual page what you learned

For this activity we decided to divide up and work in pairs or individually to be able to capture our group work on the group website. The teams are as follows:

Carmen and Grace:

Grace:

Documentation Media 1

Group Assignment:

During Week 4 (Embedded Programming), my teammate Carmen and the team organized to demonstrate and compare toolchains and development workflows across different microcontroller families. To divide the work, each member focused on a microcontroller. In my case, I documented the RP2040 and then shared my findings so we could compare them with the other architectures selected by the group.

Documentation Media 2

For more information, click here: Group Task

Documentation Media 3

Compare Performance and Development Workflows for Other Architectures

1) Comparison of other architectures

For this comparison we used four different families (XIAO form factor + one "minimal" ARM option):

Documentation Media 4
  • RP2040 (ARM Cortex-M0+ dual-core, 32-bit)
  • ESP32-C3 (RISC-V, 32-bit, Wi-Fi/BLE)
  • ESP32-S3 (Xtensa LX7 dual-core, 32-bit, Wi-Fi/BLE)
  • ATSAMD11 (sometimes written "ATAMD11") (ARM Cortex-M0+, 32-bit)

Quick Comparison of Performance and Capabilities (Hardware)

MCU/Board CPU / Architecture Max Clock Memory (board/chip) Connectivity Typical Use
RP2040 Dual-core ARM Cortex-M0+ 133 MHz 264 KB SRAM + 2 MB Flash No wireless Local control, PWM/ADC/PIO, rapid prototyping
ESP32-C3 32-bit RISC-V (single-core) 160 MHz 400 KB SRAM + 4 MB Flash Wi-Fi + BLE 5 Basic IoT, connectivity, low cost
ESP32-S3 32-bit Xtensa LX7 dual-core 240 MHz 8 MB PSRAM + 8 MB Flash Wi-Fi + BLE 5 IoT + heavier applications / light edge AI
ATSAMD11 32-bit ARM Cortex-M0+ 48 MHz 16 KB Flash + 4 KB SRAM No wireless Minimalist, USB device, simple control, low power

Comparison of Toolchains and Workflows

Toolchain Comparison Matrix
MCU/Board Common Toolchains How it is programmed (typical workflow) Evidence to Demonstrate
RP2040 Arduino / MicroPython / CircuitPython USB Upload (UF2/IDE) + Serial Monitor/REPL Upload screenshot + Serial logs + LED/button demo
ESP32-C3 Arduino / MicroPython / (Optional ESP-IDF) Flash via USB serial (ROM bootloader) + serial monitor Flash logs + Wi-Fi/BLE connection + remote demo
ESP32-S3 Arduino / MicroPython / (Optional ESP-IDF) Flash via USB + monitor; ideal for Wi-Fi/BLE demos and larger apps Logs + Wi-Fi/BLE demo + power modes/consumption (if applicable)
ATSAMD11 gcc-arm/Microchip Studio + OpenOCD/EDBG/Atmel-ICE (SWD) Build (ARM GCC) β†’ program/debug via SWD Terminal/IDE commands screenshot + programmer photo + USB/serial output

2. Analyze Specifications and Features:

This week we compared four microcontrollers/boards: RP2040, ESP32-C3, ESP32-S3, and ATSAMD11. The main differences between them are processing power, memory, connectivity, and the programming workflow they usually use.

Documentation Media 5

Performance and Development Workflows (MCU Comparison)

MCU Comparison Data
Feature RP2040 ESP32-C3 ESP32-S3 ATSAMD11
Architecture / CPU ARM Cortex-M0+ (dual core) 32-bit RISC-V (single core) Xtensa LX7 (dual core) ARM Cortex-M0+ (single core)
Word Size 32-bit 32-bit 32-bit 32-bit
Max Clock Up to 133 MHz Up to 160 MHz Up to 240 MHz Up to 48 MHz
Flash Memory 2 MB (onboard) 4 MB (onboard) 8 MB (onboard) 16 KB (on chip, typical)
SRAM 264 KB (on chip) ~400 KB (on chip) SRAM + (external PSRAM) 4 KB (on chip, typical)
Extra Memory β€” β€” 8 MB PSRAM (onboard) β€”
Connectivity No Wi-Fi/BLE (needs external module) WiFi 2.4 GHz + BLE 5 WiFi 2.4 GHz + BLE 5 No Wi-Fi/BLE
Programming / Debugging USB (UF2 bootloader), SWD pads USB/Serial (boot), JTAG/debug depends on board USB/Serial (boot), JTAG/debug depends on board SWD (Atmel-ICE/EDBG), bootloader depends on design
Common Toolchains Arduino, MicroPython, CircuitPython Arduino, MicroPython, ESP-IDF Arduino, MicroPython, ESP-IDF Microchip Studio, ARM GCC, OpenOCD

Simple explanation of each board

  • RP2040 is well balanced: it has a dual-core, good speed (up to 133 MHz), and enough memory (264 KB SRAM + 2 MB Flash) for medium projects. It is ideal for local control (LEDs, buttons, sensors, PWM, ADC) and rapid development with Arduino or MicroPython.
  • ESP32-C3 is a good option when you need wireless connectivity, as it includes Wi-Fi and Bluetooth (BLE). It is strong enough for basic IoT and its main advantage is connecting to a network or phone. The workflow usually includes network setup (Wi-Fi credentials or BLE services).
  • ESP32-S3 is the most powerful: higher speed and much more available memory on the board (Large Flash + PSRAM). This helps when you need heavier tasks, larger libraries or advanced features while maintaining Wi-Fi/BLE.
  • ATSAMD11 is the most basic and limited in resources (lower speed and memory). However, it is very useful for learning because it pushes you to write efficient firmware and is often programmed with a more "technical" workflow using ARM tools and SWD debugging. It is a good choice to demonstrate a workflow different from "just upload via USB".

Conclusion of the group assignment

In this group assignment we compared, through practical application, how these microcontrollers are programmed and how capable they are: XIAO RP2040, XIAO ESP32-C3, XIAO ESP32-S3, and ATSAMD11. We learned that it is not just about how powerful a chip is, but also how easy it is to program, what tools it uses, and how quickly you can test changes.

Documentation Media 6

Overall, we found that:

Documentation Media 7
  • RP2040 is very comfortable for quick testing and local control (button/LED/sensors).
  • ESP32 (C3/S3) is better when you need Wi-Fi or Bluetooth for IoT projects.
  • SAMD11 helps you understand a lower-level "technical" workflow and debugging, although it has less memory and power.

In summary, teamwork helped us compare tools and workflows and choose the right microcontroller depending on project requirements.

Documentation Media 8

Group Work (Grace & Carmencita)

Carmencita and I worked together on the group assignment, testing and comparing two embedded development workflows using real hardware (XIAO RP2040 and XIAO ESP32-C3). We documented our process, problem-solving, and results as a team.

Documentation Media 9

For more details, visit our group documentation: πŸ”— View group documentation

Documentation Media 10

This week was also full of challenges. We were able to meet virtually with Professor Roberto from the node, who provided us with clearer guidance on the topic we were going to address during the week. Thanks to his orientation, we understood that the work was divided into a group component and an individual component, which required better organization and task distribution. Later, we met first virtually and then in person at the Fab Lab UNI to organize ourselves into small groups. This allowed us to develop the group component more efficiently, share ideas, and compare the work done, enriching the collective learning experience. Personally, I consider these topics challenging because they are new to me; however, I see them as a challenge that motivates me to continue learning. The most important thing has been to maintain a proactive attitude, looking for additional information and supporting each other within our group node to achieve our proposed goals.

Documentation Media 11

Assignment Requirements

Group assignment
Demonstrate and compare the toolchains and development workflows for available embedded architectures
Document your work on the group work page and reflect on your individual page what you learned

Documentation Media 12

Individual assignment
Browse through the datasheet for a microcontroller
Write and test a program for an embedded system using a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections)

Documentation Media 13

Progress Status

This is for reporting progress (not for visitors to click).

Documentation Media 14
  • Group work: Done - Group page link + notes added.
  • Press-fit kit: Done - Missing final photos and conclusions.
  • Downloads: Done - Upload .zip with source files.

Learning Outcomes

Implement programming protocols.

Documentation Media 15

Have you answered these questions?

Documentation Media 16
  • Linked to the group assignment page: Yes
  • Browsed and documented specific information from a microcontroller's datasheet: Yes
  • Programmed a board to interact and communicate: Yes
  • Described the programming process(es) used: Yes
  • Includes your source code: Yes
  • Included 'hero shot(s)': Yes

Introduction to Embedded Programming

This week was also full of challenges. We were able to meet virtually with Teacher Roberto, from the node, who gave us clearer guidance on the topic we had to address during the week. Thanks to his orientation we understood that the work was divided into a group part and an individual part, which implied a better organization and distribution of tasks.

Documentation Media 17

Group Work

During week 4, which focused on embedded programming, my colleague Grace Schwan and the team organized to demonstrate and compare toolchains and development workflows across different microcontroller families. To better distribute the workload, each team member focused on a specific microcontroller.

Documentation Media 18

In my case, I documented the operating and development environment of the ESP32-C3, while my colleague worked with the RP2040. Subsequently, we shared our findings with the team to analyze and compare them with other selected architectures, which allowed us to identify similarities, differences, and advantages of each platform.

Documentation Media 19

1) Comparison of other architectures (Repeated Group Data)

For this comparison, we used four different families (XIAO form factor + one "minimal" ARM option):

Documentation Media 20
  • RP2040 (ARM Cortex-M0+ dual-core, 32-bit)
  • ESP32-C3 (RISC-V, 32-bit, Wi-Fi/BLE)
  • ESP32-S3 (Xtensa LX7 dual-core, 32-bit, Wi-Fi/BLE)
  • ATSAMD11 (sometimes written "ATAMD11") (ARM Cortex-M0+, 32-bit)

[Editor's Note: The hardware comparison tables and analysis for RP2040, ESP32-C3, ESP32-S3, and ATSAMD11 are replicated here in the original document as part of the individual reflections. They confirm identical specs: 32-bit architecture, max clocks up to 240MHz for S3, and identical toolchain workflows matching the group consensus.]

Documentation Media 21

Conclusions and practical comparison

  • RP2040: It is well balanced: it has dual-core processing, good speed (up to 133 MHz) and enough memory (264 KB SRAM + 2 MB Flash) for medium projects. It is ideal for local control (LED, buttons, sensors, PWM, ADC) and fast development with Arduino or MicroPython.
  • ESP32-C3: Is a good choice when wireless connectivity is required, as it includes Wi-Fi and Bluetooth (BLE). It is strong enough for basic IoT applications, and its main advantage is the ability to connect to a network or a phone. The workflow usually includes network setup (Wi-Fi credentials or BLE services).
  • ESP32-S3: Is the most powerful option: it offers higher speed and significantly more available memory on the board (Large Flash + PSRAM). This is useful for heavier tasks, larger libraries or advanced features, while maintaining Wi-Fi/BLE connectivity.
  • ATSAMD11: Is the most basic and limited in terms of resources (lower speed and memory). However, it is very useful for learning because it encourages writing efficient firmware and often involves a more "technical" workflow using ARM tools and SWD debugging. It is a good option to demonstrate a workflow other than simply uploading via USB.

Group Assignment Conclusion – Microcontroller Comparison

In this group task we compared, through actual practice, how these microcontrollers are programmed and how capable they are: XIAO RP2040, XIAO ESP32-C3, XIAO ESP32-S3, and ATSAMD11. We learned that it is not just about how powerful a chip is, but also how easy it is to program, what tools it uses and how fast you can test changes.

Documentation Media 22

In summary, teamwork helped us compare tools and workflows and choose the right microcontroller based on project requirements.

Documentation Media 23

Rocio and David's Group

Zoom Meeting Screenshot

For the Embedded Programming week, Rocio and I teamed up via Zoom to compare various development workflows. We split the tasks by choosing different microcontrollers to work on. I took charge of the RP2040 and, after documenting my process, shared the data with her to evaluate the differences between our selected architectures

Documentation Media 24

In this section, I’m presenting a head-to-head comparison between two powerhouse microcontrollers: the Seeed Studio XIAO RP2040 and the ESP32-C3. Although they share a small form factor, their design approaches are worlds apart. After a Zoom session with my teammate Rocio, we organized the following structure to demonstrate and compare their development workflows:

Documentation Media 25

1. Architecture Comparison

Feature Seeed Studio XIAO RP2040 Seeed Studio XIAO ESP32-C3
Microcontroller Raspberry Pi RP2040 Espressif ESP32-C3
Architecture Dual-core ARM Cortex-M0+ Single-core 32-bit RISC-V
Clock Speed 133 MHz 160 MHz
Connectivity None (Wired only) Wi-Fi + Bluetooth 5.0 (LE)
SRAM 264 KB 400 KB
Flash Memory 2 MB 4 MB
Core Strength PIO (Programmable I/O): Hardware-level custom protocols. IoT & Security: Hardware encryption and native wireless.

2. Toolchains (Development Environment)

The toolchain is the set of tools (compiler, linker, debugger) used to turn your code into a binary the chip can understand.

Documentation Media 26
Key Points:
  • The RP2040 Ecosystem is highly portable. Because it uses the ARM standard, many developers find the transition from other chips (like STM32) very easy. The UF2 bootloader is its "secret weapon" for group projects because it removes the need for special drivers to upload code.
  • The ESP32-C3 Ecosystem is more specialized but powerful. It is essentially a "system-on-a-chip" designed to run a multitasking OS (FreeRTOS) by default. This makes the toolchain slightly heavier but allows for complex features like background Wi-Fi management.

3. Development Workflows

Workflow Analysis:
  • The RP2040 Workflow is superior for rapid prototyping and educational settings. The fact that it behaves like a USB flash drive removes the "driver hell" often associated with microcontrollers. If your group wants to show a quick demo of changing code on the fly, this is the better choice.
  • The ESP32-C3 Workflow is better for IoT Deployment. Its workflow assumes the device might not be plugged into a computer forever. The ability to manage memory partitions and perform OTA updates makes it the professional choice for connected devices.
Group Conclusions:
  • Architecture & Power: While both share a compact footprint, the RP2040 offers a dual-core ARM Cortex-M0+ focused on high-speed hardware manipulation through its unique PIO (Programmable I/O). The ESP32-C3 uses a single-core RISC-V architecture designed specifically for the IoT era, integrating native Wi-Fi and Bluetooth.
  • Connectivity & Scope: The ESP32-C3 is the clear winner for wireless projects, cloud integration, and remote monitoring. The RP2040 is better suited for standalone applications, high-performance local control, or scenarios where emulating specific hardware protocols is required.
  • Toolchain & Debugging: The RP2040 follows traditional ARM standards, making it highly portable and easy to use with common compilers. However, the ESP32-C3 provides a more modern debugging experience with its built-in USB-JTAG, allowing for real-time code inspection without additional hardware.
  • Development Workflow: The RP2040 excels in ease of use for beginners and rapid prototyping thanks to its "drag and drop" UF2 bootloader. Conversely, the ESP32-C3 offers a more robust industrial workflow, supporting multitasking via FreeRTOS and professional features like Over-the-Air (OTA) updates.
  • Ecosystem & Community: The RP2040 benefits from the massive Raspberry Pi community and is the premier choice for Python-based embedded development. The ESP32-C3 leverages the mature Espressif ecosystem, which is the industry standard for low-cost, secure IoT deployment.

Esteban and Jean Franco

Esteban - Embedded Programming

This week has been a real challenge for me. I come from the world of architecture, not programming or electronics, so stepping into embedded systems feels like entering a completely new discipline with its own language, logic, and rules.

Objective: The objective of this assignment was to physically program and compare different embedded architectures and their corresponding development toolchains. We analyzed AVR (8-bit), ARM Cortex-M0+ (32-bit), and RISC-V (32-bit) architectures by testing real boards and evaluating their compilation workflows, memory structures, and upload methods.

AVR Toolchain β€” Arduino Uno / Nano

Toolchain used: Arduino IDE, avr-gcc compiler, avrdude uploader, USB bootloader.
Workflow: Write code (.ino) ↓ avr-gcc compilation ↓ Generate .hex file ↓ Upload via USB bootloader.
Compilation was very fast and binary size remained small due to limited SRAM and Flash.

RISC-V Toolchain β€” XIAO ESP32-C3

Toolchain used: Arduino IDE with ESP32 board package, riscv32-esp-elf-gcc compiler, esptool.py flasher.
Workflow: Write code (.ino) ↓ riscv32-esp-elf-gcc compilation ↓ Generate .bin file ↓ Flash to SPI memory.
Compilation time was longer due to networking stack integration and larger memory footprint.

ARM Toolchain β€” Raspberry Pi Pico (RP2040)

Toolchain options: Arduino Core (arm-none-eabi-gcc), MicroPython (UF2 drag-and-drop).
Workflow: Write code ↓ Compile (arm-none-eabi-gcc) ↓ Generate UF2 ↓ Drag & drop to board.
The RP2040 offered flexible development, especially with MicroPython experimentation.

Reflection

Comparing AVR, ARM, and RISC-V architectures revealed how embedded systems evolve from deterministic minimal controllers to network-enabled computational nodes. As an architecture student, I interpreted memory hierarchies as spatial layers and toolchains as construction workflows. This analogy helped me understand embedded logic as structured and layered systems.

Errors & Fixes
  • Error: Board not detected. Fix: Installed correct driver and selected proper COM port. Evidence: Serial monitor log.
  • Error: ESP32 compile failed. Fix: Installed ESP32 board package and updated libraries. Evidence: Successful compile screenshot.
Preparation β€” Soldering the Headers
Esteban soldering header pins JeanFranco soldering header pins

Before beginning the architectural and toolchain comparison, we needed to prepare our development boards physically. Both the XIAO ESP32-C3 (my board) and the Raspberry Pi Pico (JeanFranco’s board) required soldering header pins in order to connect them to a breadboard for testing.

This was my first time soldering electronic components. Understanding that embedded systems are not only about software but also about physical assembly was an important first step in entering the world of electronics.

Esteban soldering header pins to the XIAO ESP32-C3 (first soldering experience). JeanFranco soldering header pins to the XIAO ESP32-C3 and then to the Raspberry Pi Pico (RP2040).

Preparing the boards ourselves helped us understand the physical layer of embedded systems β€” from silicon architecture to tangible electrical connections. Only after this step were we able to begin programming and comparing development workflows.

Demonstration β€” LED Blink Test

To compare the development workflows across different architectures, we programmed a simple LED Blink test on each board. This allowed us to verify compilation, binary generation, upload method, and runtime execution.

Jean Franco: Sub-Team Documentation

Class with Neil

During the theory class of week 04, we learned about the basic concepts of embedded programming and how microcontrollers work. We studied how code is loaded onto a board, what digital is and the function of analog pins, and how to control external components such as LEDs, buttons, sensors, and motors through programming.

This helped me understand how software can control physical hardware and how to structure simple programs, and how embedded systems interact with real-world inputs and outputs. It was an important step towards making my final project smart and interactive.

Group Task Summary

Before starting my individual work, we carried out several group tests to verify the laser cutting, engraving resistance, and cutting speed. These trials helped me better understand how the material reacts to different configurations and allowed me to choose the best parameters for my own design. And for this task we decided to carry out our task at the FAB LAB UNI.

Programming Protocol & Specifications

  • RP2040: 133 MHz Clock, 2MB QSPI Flash, 1.8-5.5V Operating Voltage, programmable I/O (PIO), Compact 51x21mm dimensions.
  • ESP32-S3: 240 MHz Clock, 8MB PSRAM, Bluetooth 5, 2.4GHz WiFi, Vector instructions for ML acceleration, Secure boot.

The Microcontroller Triad

With the goal of comparing performance, we carried out a basic test using the Blink program. The evaluated architectures were: ESP8266, ATMega328P, ATtiny44A. This experiment allows analyzing differences in architecture, processing capacity, operating voltage, and ease of programming using the Arduino IDE and C++.

Differences Identified:
  • ESP8266: 32-bit architecture, includes built-in WiFi connectivity, operates at 3.3 V. Can present greater complexity in pin assignment due to its specific boot functions.
  • ATMega328P: 8-bit AVR architecture. Very stable and widely used in Arduino Uno. Operates normally at 5 V. Features simple programming and high library compatibility.
  • ATtiny44A: Also based on 8-bit AVR architecture. Designed for compact and low-power applications. Requires external programmers for code loading.

Final Conclusion

The results obtained show that the three architectures are capable of correctly executing the Blink program using C++ in the Arduino IDE. Although the visual behavior of the LED blinking is practically identical, there are significant differences in terms of architecture, operating voltage, processing capacity, and integrated functionalities.

AVR microcontrollers (ATMega328P and ATtiny44A) stand out for their simplicity, stability, and compatibility with 5 V systems, while the ESP8266 offers greater processing power and integrated wireless connectivity, although it requires greater care in pin configuration and works with 3.3 V.

These differences allow selecting the most appropriate platform depending on the requirements of the project, such as connectivity, energy consumption, or system complexity.