Embedded Software Development
A tantárgyleírás hatályossága
| Subject name (Hungarian, English) |
Beágyazottszoftver-fejlesztés
Embedded Software Development
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Subject code | BMEVIMIAC17 | ||||||||||||
| Subject type | — | ||||||||||||
| Training Level | — | ||||||||||||
| Course types and hours (weekly/semester) |
|
||||||||||||
| Assessment type | vizsga | ||||||||||||
| Credits | 5 | ||||||||||||
| Subject coordinator |
Dr. Orosz György
position: egyetemi docens
contact:
orosz.gyorgy@vik.bme.hu
|
||||||||||||
| Responsible department |
Mesterséges Intelligencia és Rendszertervezés Tanszék
|
||||||||||||
| Faculty | Villamosmérnöki és Informatikai Kar | ||||||||||||
| Subject website | https://www.mit.bme.hu/eng/oktatas/targyak/vimiac17 | ||||||||||||
| Primary curriculum type | — | ||||||||||||
| Direct prerequisites – Strong prerequisite | none | ||||||||||||
| Direct prerequisites – Weak prerequisite | none | ||||||||||||
| Direct prerequisites – Parallel prerequisite | none | ||||||||||||
| Direct prerequisites – Milestone prerequisite | none | ||||||||||||
| Direct prerequisites – Exclusion | none |
Objectives
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.
Learning outcomes
Ez a tantárgy a KKK rendeletben meghatározott, következő kompetenciák fejlesztését szolgálja:
Knowledge
No learning outcomes recorded.
Skills
No learning outcomes recorded.
Attitudes
No learning outcomes recorded.
Autonomy and responsibility
No learning outcomes recorded.
Oktatási módszertan
Tanulástámogató anyagok
Online források
Recommended preliminary knowledge for completing the subject
General rules
Assessment methods
In-term assessments
No detailed assessments provided.
Weight of in-term assessments
No weights provided.
Exam-period assessments
No detailed assessments provided.
Weight of exam elements
No weights provided.
Grade calculation
No grade thresholds provided.
Attendance requirements
No attendance requirements provided.
Rules for retake and resubmission
Not provided.
Short description
Not provided.
Detailed description
Not provided.
Recommended courses
Workload to complete the subject
No workload breakdown provided.
Validity of subject requirements
Curriculum placement
No curriculum placements recorded for this subject version.