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
Balázs Scherer, master lecturer, MIT
A fenti forma a Neptun sajátja, ezen technikai okokból nem változtattunk.
A kötelező előtanulmányi rend az adott szak honlapján és képzési programjában található.
The primary aim of the subject is to introduce the students to the topics of embedded software development.
The following main topics are introduced:
Lectures:
1. Basics of embedded C programming: Cross compiling, compiling of C code in embedded systems. Startup codes in a microcontroller, what happens before calling the main() function.
2. Memory-mapped registers and peripherals: Traditional 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 handling: Process of interrupt handling. Vector-based interrupt handler. Examples for interrupt handling in embedded systems.
5. DMA-based (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 abstraction): Necessity of board-level abstraction. Why abstraction layers are used in well-structured programs? Examples and standardization aims.
7. Operating modes of an embedded software: The 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 software: Purpose 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 software: The 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 interrupts.
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.
Demonstrations 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 structures.
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: Implementation of an interrupt routine for a peripheral. Practical examples for interrupt handing.
5. Handling of a peripheral using DMA: Programming of the DMA controller for a memory-peripheral transaction. Comparing of DMA and interrupt-based operation.
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): Starting FreeRTOS 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.
Mid-term exam can be once repeated during teaching period.
Dr. Orosz György, associate professor, MIT
Scherer Balázs, master lecturer, MIT
Naszály Gábor, master lecturer, MIT
Dr. Kovácsházy Tamás, associate professor, MIT