Lecture
Overview of the Lecture
Based on the computer science knowledge from Algorithms, Programming, and Data Representation and first programming experience with the Python programming language, the lecture aims to impart basic knowledge of system-level programming. While modern application-level programming primarily focuses on concepts and algorithms to idiomatically address problems, the different interactions of low-level components largely are abstracted and often overlooked. System-level programming fills this gap between the internals of the computer/microcontroller architecture and its use by applications. A commonly used programming language in this domain is C, which will serve as the basis for the lecture and practical exercises in this course. Although the creation of C dates back several decades and it is often criticized for the development of larger applications, a large proportion of today’s software is still written and actively maintained in C. In specialized fields, such as embedded systems or operating systems, C is considered as the default language. The main focus of this course lays on the principles of system-level software and their realization using the C programming language (e.g. pointers in C, virtual memory). Furthermore, problematic aspects of C from a programming point of view and the resulting exploitations will be highlighted.Overview of the Tutorial
The default development platform is Linux and the custom SPiC IDE, which includes all the required functionality to program, test, and debug the SPiCboard as well as Linux applications. The SPiCboard can be soldered by the students themselves during a separate soldering event. Using this tools, the overall learning objective of this course is about recognizing and understanding typical problems and solutions for hardware-related microcontroller programming. This also includes the efficient use of resources (e.g memory and energy) and the creation of correct and robust system software. In the second part of the course, the previously gathered insights will be applied to system-level programming using the Linux operating system. Hereby, the use of operating system interfaces is practiced and parallels are drawn to development (without an operating system) on the microcontroller.Lecture Slides
The slides form the thread through the lecture. They can (and shall) not replace supplementary lecture notes and full description of the topics in the technical literature (see also below).Complete Set of Lecture Slides
Variants
Last Changed: 19.03.2024
Chapter A: Concepts and Organisation
Lecture 1: Introduction
Lecture 2: Organisation of the Lecture
Chapter B: Introduction to C
Lecture 3: Java/Python vs. C – Some Examples
Lecture 4: Software Layers and Abstraction
Lecture 5: Language Overview
Lecture 6: Basic Data Types
Lecture 7: Operations and Expressions
Lecture 8: Control Structures
Lecture 9: Functions
Lecture 10: Variables
Lecture 11: Preprocessor
Chapter C: System-Level Programming
Lecture 12: Program Structure and Modules
Lecture 13: Pointers and Arrays
Lecture 14: Composite Data Types
Lecture 15: µC-System Architecture – Preface
Lecture 16: µC-System Architecture – Processor
Lecture 17: µC-System Architecture – Periphery
Lecture 18: Interrupts
Lecture 19: Interrupts – Example
Lecture 20: Interrupts – Concurrency
Chapter E: Memory
Hinweis: Vorlesungsteil E ist seit dem SS2021 vorgezogen.
Lecture 33: Dynamic Allocation of Memory
Lecture 34: Organisation of Memory
Lecture 35: Organisation of Memory – Stack
Lecture 36: Organisation of Memory – Summary
Chapter D: Operating-System Abstractions
Lecture 21: Additions: Pointers
Lecture 22: Additions – In-/Output
Lecture 23: Additions – Error Handling
Lecture 24: Operating Systems
Lecture 25: File Systems – Introduction
Lecture 26: File Systems – UNIX
Lecture 27: Programs and Processes
Lecture 28: Programs and Processes – UNIX
Lecture 29: Signals
Lecture 30: Multi Processors
Lecture 31: Concurrent Threads
Lecture 32: Concurrent Threads – praxis
Exam Preparation
We reserve the right to regularly improve and update the script. However, changes do not usually affect the entire script. The slides show when the relevant chapter was last changed.
All slides are copyrighted © 2006–2024 by Daniel Lohmann, Jürgen Kleinöder, Volkmar Sieh, and Peter Wägemann, University of Erlangen-Nürnberg, Germany. Use without prior written permission of the authors is not permitted!