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).

Folienvarianten

Letzte Änderung: 19.03.2023

Kapitel 1: Introduction

Kapitel 2: Organisation of the Lecture

Kapitel 3: Java/Python vs. C – Some Examples

Kapitel 4: Software Layers and Abstraction

Kapitel 5: Language Overview

Kapitel 6: Basic Data Types

Kapitel 7: Operations and Expressions

Kapitel 8: Control Structures

Kapitel 9: Functions

Kapitel 10: Variables

Kapitel 11: Preprocessor

Kapitel 12: Program Structure and Modules

Kapitel 13: Pointers and Arrays

Kapitel 14: Composite Data Types

Kapitel 15: µC-System Architecture – Preface

Kapitel 16: µC-System Architecture – Processor

Kapitel 17: µC-System Architecture – Periphery

Kapitel 18: Interrupts

Kapitel 19: Interrupts – Example

Kapitel 20: Interrupts – Concurrency

Hinweis: Vorlesungsteil E ist seit dem SS2021 vorgezogen.

Kapitel 33: Dynamic Allocation of Memory

Kapitel 34: Organisation of Memory

Kapitel 35: Organisation of Memory – Stack

Kapitel 36: Organisation of Memory – Summary

Kapitel 21: Additions: Pointers

Kapitel 22: Additions – In-/Output

Kapitel 23: Additions – Error Handling

Kapitel 24: Operating Systems

Kapitel 25: File Systems – Introduction

Kapitel 26: File Systems – UNIX

Kapitel 27: Programs and Processes

Kapitel 28: Programs and Processes – UNIX

Kapitel 29: Signals

Kapitel 30: Multi Processors

Kapitel 31: Concurrent Threads

Kapitel 32: Concurrent Threads – praxis

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!