Modern Embedded Systems Programming Video Course

This is the companion web-page to the YouTube video course about programming embedded systems the modern way. The course is taught by Quantum Leaps’ Miro Samek.

Here you can find various resources for the course as well as links to all released videos and project downloads.

share on: 

About the Course...

The course consists of focused, fast-paced, hands-on lessons that teach you how to program embedded microcontrollers in C. The course begins with the fundamentals, but gradually covers increasingly advanced concepts all the way to the contemporary modern embedded programming practice.

The course is specifically designed not just to be watched, but to be actively followed along on your own computer (Windows based PC) and a small, self-contained, very inexpensive evaluation board. This companion web-page provides the project downloads that you can open in a specific embedded toolchain and run on your PC at home.

The goal of the course is not just to teach C–other sources do it already quite well. But there are virtually no courses that would step down to the machine level and show you exactly what happens inside a microcontroller.

So, starting from Lesson 1 you will actually see how the ARM Cortex-M processor executes your code, how it manipulates registers, and how an embedded microcontroller can “do” things in the real world, such as turn on and off an LED.

This deeper understanding will allow you to use the C language more efficiently and with greater confidence. You will gain understanding not just what your program does, but also how the C statements translate to machine instructions and get a sense for how fast the processor can execute them. Also, you will get some familiarity with the ARM Cortex-M core, which will look really good on your resume.

The course has been going from January 2013, but it is never too late to join. Stay tuned…

Course Resources

The following list provides links to useful resources about the embedded boards and the development toolchains used in the course.

Embedded Board: TivaC LaunchPad

The main embedded board used throughout the course is the EK-TM4C123GXL board from Texas Instruments, also known under the name TivaC LaunchPad. The board is based on the TM4C123GH6PM microcontroller (ARM Cortex-M4 CPU). The TM4C123GH6PM Data Sheet in PDF is available for download.

To be able to run the projects provided below, you need to use the exact board. No other board, even if based on the same ARM Cortex-M4 CPU, will allow you to run the projects prepared for the TivaC LaunchPad.

The TivaC LaunchPad board was previously called EK-LM4F120XL "Stellaris LaunchPad" and the first segment of lessons refers to the board by its old name. But the two boards (TivaC LaunchPad and Stellaris LaunchPad) are essentially equivalent and both are equally suitable for this course.

Board: EK-TM4C123GXL
EK-TM4C123GXL (ARM Cortex-M4)

Troubleshooting TivaC LaunchPad

Application Note describing how to fix common problems with TivaC LaunchPad and related software.

Tiva™ TM4C123GH6PM Microcontroller Data Sheet

Documentation of the TM4C123GH6PM MCU on the TivaC LauchPad board. This is the most frequently referenced document is the video course.

Tiva TM4C123GXL LaunchPad User Manual

(applies also for Stellaris EK-LM4F120XL LaunchPad)

ARM Cortex™-M4 Users Guide

Describes ARM Cortex-M4 instruction set.

Tiva/Stellaris In-Circuit ICDI Manual

USB drivers installation instructions.

Tiva/Stellaris ICDI Drivers

Tiva/Stellaris USB drivers for Windows.

Tiva/Stellaris Extension for KEIL uVision

Extension for KEIL uVision to support the Stellaris ICDI debugger

LM-FLASH programmer

The LM-FLASH tool can be used to recover an unresponsive TivaC Lauchpad board. Please see the "Troubleshooting TivaC LaunchPad" for details.

Embedded Board: STM32 NUCLEO-C031C6

The course downloads now also contain project versions for the STM32 NUCLEO-C031C6 board from ST Microelectronics. The board is based on the STM32C031C6T6 microcontroller (ARM Cortex-M0+ CPU). The STM32C031C6 Data Sheet in PDF is available for download.

To be able to run the projects provided below, you need to use the exact board. No other board, even if based on the same ARM Cortex-M0+ CPU, will allow you to run the projects prepared for the TivaC LaunchPad.

STM32 NUCLEO-C031C6
STM32 NUCLEO-C031C6

STM32C031C6 Microcontroller Data Sheet

Documentation of the STM32C031C6 MCU on the NUCLEO-C031C6 board.

ST-Link Drivers

ST-Link USB drivers for Windows.

Logic Analyzer: USB Logic Analyzer (8ch, 24MHz)

Some of the lessons in the video course use a logic analyzer to demonstrate various aspects of real-time code execution. One, very inexpensive option, is a clone of the CWAV USBee AX-Pro, but without analog (only 8-channel digital) sampling capabilities. The device is available under various brand names and prices (from $5 to $12):

PulseView Software from sigrok

The generic USB Logic Analyzer works with the open-source PulseView software from sigrok.org, which has version for Windows, Linux and macOS.

Modern Embedded Systems Programming
Videos and Projects

All project downloads (lesson-xx.zip files) are now self contained and you typically don't need to download any other software components to build and run the projects.

Lesson NumberRunning TimeVideo Title (watch on YouTube)TranscriptToolsProject DownloadsVideo Download
4923:46#49 Software Testing Part-1, Embedded Unit Testinglesson-49.txtEmbedded-Test (ET)
QTools
lesson-49.zipvideo49
4815:57#48 Assertions and Design by Contract, Part-2lesson-48.txtKEIL-MDK
QM-modeler
lesson-48.zipvideo48
4713:35#47 Assertions and Design by Contract, Part-1lesson-47.txtGCC for Desktoplesson-47.zipvideo47
4626:36#46 Software Tracing with QP/Spylesson-46.txtKEIL-MDK
QM-modeler
lesson-46.zipvideo46
4527:52#45 Software Tracing with printflesson-45.txtKEIL-MDK
QM-modeler
lesson-45.zipvideo45
4422:32#44 Active Objects in Real-Time Part-2: Mutable Eventslesson-44.txtKEIL-MDK
QM-modeler
lesson-44.zipvideo44
4314:10#43 Active Objects in Real-Time Part-1: Run-to-Completion and RMS/RMAlesson-43.txtKEIL-MDK
QM-modeler
lesson-43.zipvideo43
4223:02#42 State Machines Part-8:
Semantics of Hierarchical State Machines
lesson-42.txtKEIL-MDK
QM modeler
lesson-42.zipvideo42
4130:56#41 State Machines Part-7:
Automatic Code Generation
lesson-41.txtKEIL-MDK
QM-modeler
lesson-41.zipvideo41
4031:59#40 State Machines Part-6:
What is a Hierarchical State Machine?
lesson-40.txtKEIL-MDK
QM-modeler
lesson-40.zipvideo40
3933:09#39 State Machines Part-5:
Optimal Implementation in C
lesson-39.txtKEIL-MDK
QM modeler
lesson-39.zipvideo39
3826:36#38 State Machines Part-4:
State Tables and Entry/Exit Actions
lesson-38.txtKEIL-MDK
QM-modeler
lesson-38.zipvideo38
3731:55#37 State Machines Part-3:
Input-Driven State Machines
lesson-37.txtKEIL-MDKlesson-37.zipvideo37
3614:11#36 State Machines Part-2:
Guard conditions
lesson-36.txtKEIL-MDKlesson-36.zipvideo36
3524:15#35 State Machines Part-1:
What is a state machine?
lesson-35.txtKEIL-MDKlesson-35.zipvideo35
3439:11#34 Event-Driven Programming Part-2:
Best practices for concurrency & Active Object pattern
lesson-34.txtKEIL-MDKlesson-34.zipvideo34
3329:33#33 Event-Driven Programming Part-1:
GUI example, events, event-loop, run-to-completion, no-blocking
lesson-33.txtKEIL-MDKlesson-33.zipvideo33
3227:30#32 OOP Part-4:
Polymorphism in C
lesson-32.txtKEIL-MDKlesson-32.zipvideo32
3123:42#31 OOP Part-3:
Polymorphism in C++
lesson-31.txtKEIL-MDKlesson-31.zipvideo31
3024:02#30 OOP Part-2:
Inheritance in C and C++
lesson-30.txtKEIL-MDKlesson-30.zipvideo30
2931:29#29 OOP Part-1:
Encapsulation (classes) in C and C++
lesson-29.txtKEIL-MDKlesson-29.zipvideo29
2838:02#28 RTOS Part-7:
Mutual exclusion mechanisms
lesson-28.txtKEIL-MDKlesson-28.zipvideo28
2743:03#27 RTOS Part-6:
Synchronization and communication among concurrent threads
lesson-27.txtKEIL-MDKlesson-27.zipvideo27
2629:31#26 RTOS Part-5:
What is "real-time"? Preemptive, priority-based scheduling
lesson-26.txtKEIL-MDKlesson-26.zipvideo26
2525:35#25 RTOS Part-4:
Efficient blocking of threads
lesson-25.txtKEIL-MDKlesson-25.zipvideo25
2419:15#24 RTOS Part-3:
Automating the scheduling process
lesson-24.txtKEIL-MDKlesson-24.zipvideo24
2337:36#23 RTOS Part-2:
Automating the context switch
lesson-23.txtKEIL-MDKlesson-23.zipvideo23
2223:26#22 RTOS Part-1:
What is a Real-Time Operating System?
lesson-22.txtKEIL-MDKlesson-22.zipvideo22
2118:37#21 Foreground-Background Architecture
("Superloop")
lesson-21.txtKEIL-MDKlesson-21.zipvideo21
2016:58#20 Race Conditions:
What are they and how to avoid them?
lesson-20.txtTI-CCS
KEIL-MDK
lesson-20.zipvideo20
1922:19#19 GNU-ARM Toolchain and Eclipse IDElesson-19.txtTI-CCS
KEIL-MDK
lesson-19.zipvideo19
1815:28#18 interrupts Part-3:
How interrupts work on ARM Cortex-M?
lesson-18.txtIAR-EWARM
KEIL-MDK
lesson-18.zipvideo18
1719:52#17 interrupts Part-2:
How most CPUs (e.g. MSP430) handle interrupts?
lesson-17.txtIAR-EWARM
KEIL-MDK
lesson-17.zipvideo17
1615:59#16 Interrupts Part-1:
What are interrupts and how they work?
lesson-16.txtIAR-EWARM
KEIL-MDK
lesson-16.zipvideo16
1527:35#15 Startup Code Part-3:
Vector table initialization, exception handlers, interrupt handlers
lesson-15.txtIAR-EWARM
KEIL-MDK
lesson-15.zipvideo15
1425:44#14 Startup Code Part-2:
Replacing the vector-table, embedded software build process
lesson-14.txtIAR-EWARM
KEIL-MDK
lesson-14.zipvideo14
1323:27#13 Startup Code Part-1:
What is startup code and how the CPU gets from reset to main?
lesson-13.txtIAR-EWARM
KEIL-MDK
lesson-13.zipvideo13
1232:11#12 Structures in C and
Cortex Microcontroller Software Interface Standard (CMSIS)
lesson-12.txtIAR-EWARM
KEIL-MDK
lesson-12.zipvideo12
1128:34#11 Standard integers (stdint.h)
and mixing integer types
lesson-11.txtIAR-EWARM
KEIL-MDK
lesson-11.zipvideo11
1027:42#10 Stack Overflow and
Other Pitfalls of Functions
lesson-10.txtIAR-EWARM
KEIL-MDK
lesson-10.zipvideo10
919:08#9 Modules, Recursion,
ARM Application Procedure Call Standard (AAPCS)
lesson-09.txtIAR-EWARM
KEIL-MDK
lesson-09.zipvideo09
817:06#8 Functions in C and the call stacklesson-08.txtIAR-EWARM
KEIL-MDK
lesson-08.zipvideo08
715:22#7 Arrays and Pointer Arithmeticlesson-07.txtIAR-EWARM
KEIL-MDK
lesson-07.zipvideo07
617:06#6 Bit-wise operators in Clesson-06.txtIAR-EWARM
KEIL-MDK
lesson-06.zipvideo06
514:30#5 Preprocessor and
the "volatile" keyword in C
lesson-05.txtIAR-EWARM
KEIL-MDK
lesson-05.zipvideo05
416:45#4 How a computer can change anything outside,
like blinking an LED?
lesson-04.txtIAR-EWARM
KEIL-MDK
lesson-04.zipvideo04
312:23#3 Variables and Pointerslesson-03.txtIAR-EWARM
KEIL-MDK
lesson-03.zipvideo03
211:00#2 How to change the flow of control
through your code
lesson-02.txtIAR-EWARM
KEIL-MDK
lesson-02.zipvideo02
117:06#1 How computers count?lesson-01.txtIAR-EWARM
KEIL-MDK
lesson-01.zipvideo01
011:53#0 Modern Embedded Systems Programming:
Getting Started
lesson-00.txtvideo00