How niekiran/cortexmxprogramming works
This repository is a set of Cortex-M embedded-programming course examples, not one integrated firmware product. The learner-facing progression runs from basic output and processor modes through interrupts, exceptions, and SVC, then to cooperative task scheduling and a CMSIS-based variant. The scheduler examples show task setup, tick-based blocking, and PendSV context switching; the CMSIS variant uses the STM32 device header and Cortex-M4 core definitions. Several older KEIL examples demonstrate related interrupt and access-control topics. Unsampled lesson internals are represented only where the file tree supports them; edges are limited to indexed references or shown calls.
Main entry points: stm32f4xx.h STM32F4 device layer · Src/main.c Task scheduler · Src/main.c CMSIS scheduler · Src/main.c Hello world
Components 22
Core Basics
- Hello world
Source_code/001_HelloWorld/Src/main.c - Semihosting
Source_code/002_HelloWorld_semihosting/Src/main.c - Processor modes
Source_code/003_operation_modes/Src/main.c - Inline assembly
Source_code/004_inline_1/Src/main.c - Access levels
Source_code/005_access_levels/Src/main.c - Core bit operations
Source_code/007_bit_banding/Src/main.c
Exceptions
- Interrupt examples
Source_code/009_USART3_int_pend/Src/main.c - Interrupt priority
Source_code/010_interrupt_priority/Src/main.c - Fault handling
Source_code/012_fault_gen/Src/main.c - SVC examples
Source_code/014_svc_operation/Src/main.c - Legacy access demo
old/Source_codes/KEIL-MDK-5/Section 7_ Access levels/main.c - Legacy interrupt demos
old/Source_codes/KEIL-MDK-5/Section 13_ (76) Exception masking & unmasking/main.c - Button interrupts
old/Source_codes/KEIL-MDK-5/Section 15_ External Interrupts-Buttons/main.c - PendSV demo
old/Source_codes/KEIL-MDK-5/Section 17_ (90) PendSV exception/main.c
Task Scheduling
- Task scheduler
Source_code/015_task_scheduler/Src/main.c - Scheduler configuration
Source_code/015_task_scheduler/Inc/main.h - LED interface
Source_code/015_task_scheduler/Inc/led.h - CMSIS scheduler
Source_code/016_cmsis_task_scheduler/Src/main.c
Platform Support
- STM32F4 device layer
Source_code/016_cmsis_task_scheduler/driver/Device/ST/ST/stm32f4xx/Include/stm32f4xx.h - Cortex-M4 core layer
Source_code/016_cmsis_task_scheduler/driver/CMSIS/Core/Include/core_cm4.h - STM32 system interface
Source_code/016_cmsis_task_scheduler/driver/Device/ST/ST/stm32f4xx/Include/system_stm32f4xx.h
Other components
- Course learner
Connections 20
- Course learner → Hello world: studies
- Course learner → Semihosting: studies
- Course learner → Processor modes: studies
- Course learner → Inline assembly: studies
- Course learner → Access levels: studies
- Course learner → Core bit operations: studies
- Course learner → Interrupt examples: studies
- Course learner → Interrupt priority: studies
- Course learner → Fault handling: studies
- Course learner → SVC examples: studies
- Course learner → Legacy access demo: studies
- Course learner → Legacy interrupt demos: studies
- Course learner → Button interrupts: studies
- Course learner → PendSV demo: studies
- Course learner → Task scheduler: studies
- Course learner → CMSIS scheduler: studies
- Task scheduler → LED interface: imports
Source_code/015_task_scheduler/Src/main.c - CMSIS scheduler → STM32F4 device layer: imports
Source_code/016_cmsis_task_scheduler/Src/main.c - STM32F4 device layer → Cortex-M4 core layer: includes
Source_code/016_cmsis_task_scheduler/driver/Device/ST/ST/stm32f4xx/Include/stm32f4xx.h - STM32F4 device layer → STM32 system interface: includes
Source_code/016_cmsis_task_scheduler/driver/Device/ST/ST/stm32f4xx/Include/stm32f4xx.h