Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESH Roadmap Advanced

Board: NUCLEO-C031C6 IDE: VS Code Build: Make Build: Make%20%7C%20CMake

An advanced, project-based learning roadmap for embedded systems development on the STM32C031C6T6 (Cortex-M0+). From here on, the focus shifts to design decisions, scalability, and long-term maintainability. You'll stop asking "How do I make this peripheral work?" and start asking "How should this system be structured so it can grow, be reused, and be maintained?"

Table of Contents

Overview

This repository is the continuation of ESH Roadmap Basic. While the basic roadmap focused on understanding individual peripherals through register-level access, this advanced roadmap tackles the engineering challenges that come after: system architecture, build infrastructure, reproducible environments, and scalable firmware design.

Key learning objectives:

  • Containerized, reproducible build environments with Docker
  • Firmware architecture patterns (layered drivers, HAL abstractions, event-driven design)
  • Testing strategies for embedded software
  • CI/CD pipelines for firmware projects

Hardware

MCU STM32C031C6T6 — ARM Cortex-M0+, 48 MHz, 32 KB Flash, 12 KB SRAM
Board NUCLEO-C031C6
Debugger On-board ST-LINK/V2-1 (SWD)
User LED LD4 — PA5
User Button B1 — PC13 (active low)

Prerequisites

Tool Version Purpose
Visual Studio Code Latest Primary IDE
Docker Latest Reproducible build environment
GNU ARM Embedded Toolchain Latest arm-none-eabi-gcc cross-compiler
Make Latest Build automation
CMake Latest Cross-platform firmware configuration and builds
OpenOCD Latest On-chip programming & debugging

Repository Layout

ESH_roadmap_advanced/
├── adv-00-docker/              # Dockerized bare-metal blinky (Makefile build)
├── adv-01-cmake/               # Bare-metal blinky upgraded to a CMake workflow
├── adv-02-docker-cmake/        # Dockerized ARM GCC workflow driven by CMake presets
├── STM32C031C6/                # Datasheets & reference manuals
└── README.md

Each project follows a consistent internal structure:

adv-XX-<topic>/
├── src/                        # Source files (.c)
├── inc/                        # Header files (.h)
├── startup_stm32c031xx.S       # Vector table & startup code
├── stm32c031x6_flash.ld        # Linker script
├── Makefile/CMake              # Build configuration
└── build/                      # Build output (generated)

Projects

# Folder Topic Description
00 adv-00-docker Docker Build Environment Bare-metal blinky project built with a Makefile inside a Docker container. Demonstrates reproducible, host-independent firmware builds.
01 adv-01-cmake CMake Build Structure Bare-metal blinky project migrated from a Makefile to a reusable ARM GCC CMake workflow with presets and a flash target.
02 adv-02-docker-cmake Docker + CMake Workflow Bare-metal blinky project that combines a Dockerized toolchain with a preset-based CMake build and OpenOCD flash flow.

Getting Started

  1. Clone the repository

    git clone https://github.com/Padifu03/ESH_roadmap_advanced.git
    cd ESH_roadmap_advanced
  2. Open in VS Code

    code .

When VS Code prompts for recommended workspace extensions, install them. In particular, STMicroelectronics.stm32-vscode-extension is recommended for STM32 device setup, STM32 tooling integration, and board-oriented workflows.

  1. Select a project — open the desired folder (e.g. adv-00-docker).

Building & Flashing

adv-01-cmake

Configure the project:

cmake --preset debug
cmake --preset release

Build the firmware:

cmake --build --preset debug
cmake --build --preset release

Flash with OpenOCD:

cmake --build --preset debug --target flash
cmake --build --preset release --target flash

adv-02-docker-cmake

Build the Docker image:

docker build -t stm32c031-blinky adv-02-docker-cmake/docker/

Configure and build the firmware inside the container:

docker run --rm -v ${PWD}:/workspace stm32c031-blinky cmake --preset debug
docker run --rm -v ${PWD}:/workspace stm32c031-blinky cmake --build --preset debug

Clean or flash from the container:

docker run --rm -v ${PWD}:/workspace stm32c031-blinky cmake --build --preset debug --target clean
docker run --rm -v ${PWD}:/workspace --device /dev/bus/usb:/dev/bus/usb stm32c031-blinky cmake --build --preset debug --target flash

Documentation & Resources

Document File
STM32C031C6 Reference Manual stm32c031c6_RM.pdf
STM32C031C6 Datasheet stm32c031c6_datasheet.pdf
STM32C031C6 User Manual stm32c031c6_user_manual.pdf
NUCLEO-64 Board User Manual stm32_nucleo64_UM.pdf
Cortex-M0+ Generic User Guide Cortex-M0plus_UG.pdf
ESH Roadmap Basic (prerequisite) GitHub

Contributing

Contributions, suggestions, and bug reports are welcome. To contribute:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feat/my-feature).
  3. Commit your changes with clear, descriptive messages.
  4. Open a Pull Request against master.

Please keep the existing project structure and coding style consistent.

About

This is the Advanced level of the EMBEDDED ROADMAP program

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages