Belépés címtáras azonosítással
magyar nyelvű adatlap
angol nyelvű adatlap
Embedded Software Development
A tantárgy neve magyarul / Name of the subject in Hungarian: Beágyazottszoftver-fejlesztés
Last updated: 2023. október 22.
Dr. György Orosz,
associate professor, MIT
master lecturer, MIT
primary aim of the subject is to introduce the students to the topics of
embedded software development.
following main topics are introduced:
1. Basics of embedded C programming:
compiling of C code in embedded systems. Startup codes in a microcontroller,
what happens before calling the main() function.
2. Memory-mapped registers and
solutions with pointers. Advanced structure blocks for peripheral handling and
standardization: introduction of CMSIS core and related standards for structure
and coding conventions.
3. Hardware abstraction layers - the
microcontroller level abstraction: Purpose of microcontroller-level abstraction. Structure of modern
firmware libraries. Intention for standardization, CMSIS driver, API, coding
and naming conventions. Porting the standard C library onto and embedded hardware.
4. Interrupt-based peripheral
of interrupt handling. Vector-based interrupt handler. Examples for interrupt
handling in embedded systems.
(Direct Memory Access) peripheral handling. Basics of DMA process. Typical parameters
of DMA. System design considerations for effective DMA process. Examples.
6. Hardware abstraction layer (board-level
of board-level abstraction. Why abstraction layers are used in well-structured
programs? Examples and standardization aims.
7. Operating modes of an embedded
typical states and modes in an embedded software. Implementation and properties
of most common modes: energy saving mode, fail stop, fail safe, fail reduced,
calibration, diagnostic modes.
8. Operating modes of an embedded
of calibration and diagnostic modes: support of testing, real-time monitoring,
configuration, logging of error events. Remote software update: bootloader.
Introduction of an industrial diagnostic protocol: XCP (Universal Measurement
and Calibration Protocol).
9. Debugging and testing an embedded
debugging possibilities provided by modern microcontrollers. The connection
between the microcontroller and development environment (IDE): debug hardware
(e.g, CMSIS-DAP), GDB server, GDB RSP, GDB command line. Tracing capabilities:
DWT, ITM and their integration into an IDE.
10. Non-preemptive software
architectures, introduction to RTOS (Real-time operating system): Round robin scheduling (basic and
extended with interrupts), scheduling based on function queue. Basics of
embedded operating systems through FreeRTOS: structure, operation, scheduling,
modes of threads.
11. Basics of parallel programing (shared
resources and mutual exclusion): Problems of using shared resources. Theory and practice of solutions for
problems, e.g., mutual exclusion.
12. Basics of parallel programing
(synchronization and communication between threads): Introduction of theory and practice
of solutions for communication between threads. Role of semaphore and queue in
the communication between different threads, and between threads and
13. Basics of parallel programing
(typical problems): The
typical problems of threads using the same memory segment and related
solutions, stack problems. Scheduling problems and realization of scheduling.
Thread properties: response time and execution time. Measurement of execution
time, and calculation of response time.
and exercises related to the lectures:
1.Introduction to an integrated
development environment (IDE) and development board: Creation of sample projects.
Investigation of stages of compiling and startup process.
2. Programming of a simple
peripheral: GPIO programming: Programming of a simple peripheral with memory pointers and CMSIS-Core
3. Programming of a simple
peripheral using firmware library: Peripheral programming using Firmware library,
examples: GPIO and UART. Porting LibC for using printf() with UART.
4. Handling of a peripheral using interrupts:
an interrupt routine for a peripheral. Practical examples for interrupt
5. Handling of a peripheral using DMA:
Programming of the
DMA controller for a memory-peripheral transaction. Comparing of DMA and interrupt-based
6. Board-level abstraction layer: Interfacing an external sensor
(e.g., I2C temperature sensor). Creating API for the sensor, and choosing between
DMA, interrupt, or polling-based handling.
7. Testing energy saving modes: Checking mode-dependent energy
consumption. Which parts of the processor remain awake in different modes?
Writing simple codes for waking up a microcontroller from energy saving mode
with push-button or timer.
8. Diagnostic modes: Porting an existing protocol (XCP),
and creating a simple command line interface (CLI).
9. Debugging: Introduction to traditional debug
possibilities. How debug commands are sent from the IDE to the microcontroller.
Watch, live watch functionalities, tracing of interrupts, how trace console is
integrated into IDE.
10. Embedded operating systems (OS):
on demo board. Creating a simple demo program with 1-2 threads.
11. Mutual exclusion: Demonstration of problems of using shared
resources. Application of different solutions for solving problems of shared
resources: examples for mutexes.
12. Communication and
synchronization between threads: Tools for synchronization and
communication between different threads and between threads and interrupts.
Transmission of events and messages using semaphores and queues.
13. Demonstrating and
solving problems of an embedded OS: Stack-overflow problem and stack protection.
Tracking the timing and scheduling by instrumenting the kernel.
exam can be once repeated during teaching period.
György, associate professor, MIT
Balázs, master lecturer, MIT
Gábor, master lecturer, MIT
Kovácsházy Tamás, associate professor, MIT