This repository contains my practical coursework, code exercises, and peripheral drivers developed during the Microcontroller Embedded C Programming: Absolute Beginners course by FastBit Embedded Brain Academy (Kiran Nayak).
All target projects were written and tested using STM32CubeIDE targeting ARM Cortex-M microcontrollers.
The workspace is organized into two main directories:
-
/host
-
Core C programming exercises executed directly on the host computer.
-
Covers fundamentals such as data structures, pointers, bitwise operations, memory layout, and standard input/output.
-
/target
-
Firmware code designed to run directly on STM32 microcontroller hardware.
-
Focuses on peripheral register manipulation, driver development, interrupt handling, and direct hardware interfacing.
- IDE: STM32CubeIDE
- Language: Embedded C
- Target Hardware: STM32 Nucleo Development Board (ARM Cortex-M)
- Compiler / Toolchain: GNU Toolchain for STM32 (GCC)
- Debugging Tools: ST-LINK / OpenOCD
- Embedded C Fundamentals: Data types, structure padding and packing, and type qualifiers like
volatileandconst. - Pointers and Memory: Pointer arithmetic, type casting, memory mapping, stack and heap layout, and memory management.
- Bitwise Operations: Setting, clearing, toggling, and testing specific bits using bit masks and bit-fields.
- Microcontroller Architecture: Memory organization, bus matrix layout, peripheral base addresses, and register offsets.
- Low-Level Drivers: Writing register-level drivers directly without relying solely on abstraction libraries.
- Build Systems: Compilation flow, preprocessor directives, linker scripts, and understanding executable ELF files.
- Clone the Repository:
git clone https://github.com/YOUR-USERNAME/STM32-Embedded-C-Coursework.git
- Import into STM32CubeIDE:
- Open STM32CubeIDE.
- Navigate to File > Import > General > Existing Projects into Workspace.
- Choose the
hostortargetdirectory and import the project you want to run.
- Build and Flash (Target Projects):
- Connect your STM32 Nucleo board via USB.
- Right-click the project folder and select Build Project.
- Select Run As > STM32 C/C++ Application to flash the code onto the board.
Completed as part of the Microcontroller Embedded C Programming: Absolute Beginners course on Udemy.