.. include:: SS2023 ====== .. contents:: :local: .. sidebar:: * `Github project `__ * SSH login on the Pi: ``ssh -p 2020 firstname.lastname@jfasch.bounceme.net`` Block 1: Linux, and Working With Remote/Embedded Devices -------------------------------------------------------- .. list-table:: :align: left :widths: auto :header-rows: 1 * * VO * KU * #Units * Topics * * 2023-02-27 * * 3 * * **Introduction: OS Concepts** * :doc:`/trainings/material/soup/linux/basics/intro/overview` (from :doc:`/trainings/material/soup/linux/basics/intro/group`) * **Everything is a file** * :doc:`/trainings/material/soup/linux/basics/intro/demo-everything-is-a-file` (from :doc:`/trainings/material/soup/linux/basics/intro/group`) * Reading temperature sensor values (from :doc:`/trainings/material/soup/linux/hardware/w1/topic`) * :doc:`/trainings/material/soup/linux/sysprog/intro-hw/sysfs-gpio` * **Processes** * :doc:`/trainings/material/soup/linux/basics/intro/process` (from :doc:`/trainings/material/soup/linux/basics/intro/group`) * :doc:`/trainings/material/soup/linux/sysprog/process/commandline` (from :doc:`/trainings/material/soup/linux/sysprog/process/group`) * :doc:`/trainings/material/soup/linux/sysprog/process/tree` (from :doc:`/trainings/material/soup/linux/sysprog/process/group`) * **Homework** Working :doc:`/trainings/material/soup/linux/basics/intro/wsl` installation until next time around. * * 2023-03-07 * * 3 * * **Introduction: OS Concepts** * **Files and Processes: I/O Blocks Processes** * :doc:`/trainings/material/soup/linux/sysprog/blocking-io/blocking-io-file` (from :doc:`/trainings/material/soup/linux/sysprog/blocking-io/group`) * :doc:`/trainings/material/soup/linux/sysprog/blocking-io/blocking-io-timer` (from :doc:`/trainings/material/soup/linux/sysprog/blocking-io/group`) * **Working With The Commandline (The Shell)** (from :doc:`/trainings/material/soup/linux/basics/shell/group`) * :doc:`/trainings/material/soup/linux/basics/shell/commandline` * :doc:`/trainings/material/soup/linux/basics/shell/paths` * :doc:`/trainings/material/soup/linux/basics/shell/special-paths` * :doc:`/trainings/material/soup/linux/basics/shell/ls` * :doc:`/trainings/material/soup/linux/basics/shell/cwd` * :doc:`/trainings/material/soup/linux/basics/shell/file_dir_create_rm` * * * 2023-03-10 * 3 * * **Working With The Commandline (The Shell)** (from :doc:`/trainings/material/soup/linux/basics/shell/group`) * :doc:`/trainings/material/soup/linux/basics/shell/cp` * :doc:`/trainings/material/soup/linux/basics/shell/mv` * :doc:`/trainings/material/soup/linux/basics/shell/links` * :doc:`/trainings/material/soup/linux/basics/shell/configfiles` * **Working With The Commandline (The Shell)** (from :doc:`/trainings/material/soup/linux/basics/shell/group`) * **Exercises** (from :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/group`) * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/mkdir-p-rm-r` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/echo-create-files` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/echo-copy-files` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/echo-move-files` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/verify-hierarchy` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/copy-tree` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/rm-tree` * :doc:`/trainings/material/soup/linux/basics/shell/exercises/cp-mv-mkdir-rm/rm-rf` * * 2023-03-17 * * 3 * * **SSH: Secure Shell** (from :doc:`/trainings/material/soup/linux/ssh/group`) * :doc:`/trainings/material/soup/linux/ssh/basics` * :doc:`/trainings/material/soup/linux/ssh/key-pair` * :doc:`/trainings/material/soup/linux/ssh/scp` * :doc:`/trainings/material/soup/linux/ssh/sshfs` * **File System Permissions** (from :doc:`/trainings/material/soup/linux/basics/permissions/group`) * :doc:`/trainings/material/soup/linux/basics/permissions/basics` * :doc:`/trainings/material/soup/linux/basics/permissions/setuid` * :doc:`/trainings/material/soup/linux/basics/permissions/umask` * * 2023-03-31 * * 3 * * **File System Permissions** (from :doc:`/trainings/material/soup/linux/basics/permissions/group`) From :doc:`/trainings/material/soup/linux/basics/permissions/exercises/group` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/credentials` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/shared-file` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/private-directory` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/private-directory-question` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/public-directory` * :doc:`/trainings/material/soup/linux/basics/permissions/exercises/public-directory-question` Block 2: C on Linux: Local and *Cross* Development -------------------------------------------------- .. list-table:: :align: left :widths: auto :header-rows: 1 * * VO * KU * #Units * Topics * * 2023-04-17 * * 3 * **Lab Exam** * :doc:`/trainings/material/soup/linux/basics/intro/exercises/fh-questions` **Toolchain Intro (Local)** (from :doc:`/trainings/material/soup/linux/toolchain/group`) * :doc:`/trainings/material/soup/linux/toolchain/basics/topic` * :doc:`/trainings/material/soup/linux/toolchain/separate-compilation/topic` * :doc:`/trainings/material/soup/linux/toolchain/static-library/topic` * :doc:`/trainings/material/soup/linux/toolchain/exercises/native-build` * * * 2023-04-17 * 3 * **Toolchain Intro (CMake)** (from :doc:`/trainings/material/soup/linux/toolchain/group`) * :doc:`/trainings/material/soup/linux/toolchain/cmake/local` * Exercise: like above (:doc:`/trainings/material/soup/linux/toolchain/exercises/native-build`), only using CMake * * * 2023-04-21 * 3 * **Systems Programming Basics: File I/O** * :doc:`/trainings/material/soup/c/050-pointers-and-arrays/050-command-line-arguments/topic` * :doc:`/trainings/material/soup/linux/sysprog/basics/group` * :doc:`/trainings/material/soup/linux/sysprog/file-io/basics` **Homework (until next time - 2023-05-08)** * :doc:`/trainings/material/soup/linux/sysprog/file-io/basics-exercise-copy/exercise` * * 2023-05-11 * * 3 * **Homework Recap** Talk about solutions from :doc:`last time's (2023-04-21) homework ` **Work Environment** * `Github project `__ * SSH login on the Pi: ``ssh -p 2020 firstname.lastname@jfasch.bounceme.net`` **Cross Development** * :doc:`/trainings/material/soup/linux/toolchain/cross/basics` * :doc:`/trainings/material/soup/linux/toolchain/cmake/cross` **Cross Toolchain Setup** * :doc:`/trainings/material/soup/linux/toolchain/raspberry-pi/toolchain-setup` **Homework Recap: Cross** * Setup Pi toolchain (:doc:`/trainings/material/soup/linux/toolchain/raspberry-pi/toolchain-setup`) * Cross-build your project * On the Pi, copy ``/etc/passwd`` to ``~/passwd-copy`` * Compare both files using ``diff -u`` (`man -s 1 diff `__) * * * 2023-05-12 * 3 * **Finish Raspi Cross Toolchain Setup** * :doc:`/trainings/material/soup/linux/toolchain/raspberry-pi/toolchain-setup` **Exercise Time** * :doc:`/trainings/material/soup/linux/sysprog/file-io/exercise-sensor-read` **Homework** * Please complete the exercise until next time (2023-05-22) * Please send me your Github account name (create one if you don't already have one) Block 3: C++ ------------ .. list-table:: :align: left :widths: auto :header-rows: 1 * * VO * KU * #Units * Topics * * 2023-05-22 * * 3 * **The Spirit Of C (Why C++?)** * :doc:`/trainings/material/soup/c/050-pointers-and-arrays/040-pointers-and-arrays/topic` (livehacked: `arrays.cpp `__) **Unit Testing (Quick Intro)** * :doc:`/trainings/material/soup/unittest/unittest_gtest_basics/topic` * (For completeness only: :doc:`/trainings/material/soup/unittest/unittest_gtest_cmake/topic`) (livehacked: `unittesting `__ - look into `CMakeLists.txt `__) **OO Basics** * :doc:`/trainings/material/soup/cxx03/020-data-encapsulation/c` * :doc:`/trainings/material/soup/cxx03/020-data-encapsulation/cpp-introduction` (livehacked: `point.cpp `__) * * * 2023-06-01 * 3 * **Exercise** * Clone `Github project `__ * Setup as described in ``README.rst`` * Find your place in it * ``bin/`` is for *programs* * ``lib/`` is for *library code* (e.g. the sensor implementation) * ``tests/`` is for *unit tests* * :doc:`/trainings/material/soup/cxx-exercises/sensor-w1/sensor-w1` * * 2023-06-02 * * 3 * **Exercise, cont'd** * *Q&A* * `Github project `__ (and CMake) recap * *Solution (livehacked)* * `sensor-w1.h `__ * `onewire-temperature-modular.cpp `__ * * 2023-06-05 * * 3 * **Discussion: Future Directions** * PLC state machine (Salloker) * Possible OO implementation (TDD?) .. image:: doormgr-fsm.png **C++ Standard Library** * :doc:`/trainings/material/soup/cxx11/filesystem/topic` * * * 2023-06-07 * 3 * **Exercises** * :doc:`/trainings/material/soup/cxx-exercises/nopoly-sensors-core/sensor-const-nopoly` * :doc:`/trainings/material/soup/cxx-exercises/nopoly-sensors-core/sensor-random-nopoly` * :doc:`/trainings/material/soup/cxx-exercises/nopoly-switch-mock/switch-mock-nopoly` *Note*: see `point.cpp `__ for a sample class implementation. * * * 2023-06-12 * 3 * **Lab Exam** * *Work* * Clone from Github: https://github.com/jfasch/FH-ECE21-LabExam-2023-06-12.git * Prepare according to README (see Github project page) * Build as usual * Implement requirements: :doc:`/trainings/material/soup/cxx-exercises/nopoly-hysteresis/hysteresis-nopoly` * *Upload to Moodle* * Change your current working directory to *one above* the project's source root * Create a ``tar`` archive .. code-block:: console $ tar -j -c -f FH-ECE21-LabExam-2023-06-12.tar.bz2 FH-ECE21-LabExam-2023-06-12/ * Upload ``FH-ECE21-LabExam-2023-06-12.tar.bz2`` to `Moodle `__ .. attention:: Please do *not* build inside the source directory! The build tree *must not* be part of the uploaded archive If you do, this will severely influence the exam grading! * * * 2023-06-15 * 3 * * **Lab Exam recap** * **Work Environment** Mr.Felber to show how vscode could solve problems. Discuss, e.g. * *"Open Folder"*. * What does that do, as opposed to opening single files? * |longrightarrow| understanding your project by trying to comprehend ``CMakeLists.txt`` * |longrightarrow| ``${workspaceFolder}`` * *"Build"* button. * `CMake Tools `__ * `Build with CMake Tools `__ * Configuration in ``.vscode/settings.json``. * Maybe supply a ``.vscode/setting.json`` that contains paths relative to ``${workspaceFolder}`` * * 2023-06-15 * * 3 * * **More C++ Language Features** * :doc:`/trainings/material/soup/cxx03/030-functions-and-methods/020-methods/topic` (livehacked: `const-and-refs.cpp `__) * :doc:`/trainings/material/soup/cxx03/030-functions-and-methods/050-references/topic` (livehacked: `const-and-refs.cpp `__) * :doc:`/trainings/material/soup/cxx03/020-data-encapsulation/initializer-list` (livehacked: `member-initialization.cpp `__) * **C++ Standard Library:** ``std::vector`` * Livehacking: `vector.cpp `__ * Documentation `std::vector on cppreference.com `__) * :doc:`/trainings/material/soup/cxx11/020-new-language-features/range-based-for` * **Homework** Using ``std::vector`` * :doc:`/trainings/material/soup/cxx-exercises/stl/vector` * :doc:`/trainings/material/soup/cxx-exercises/stl/filter-odd` * :doc:`/trainings/material/soup/cxx-exercises/stl/filter-greater-10` * * * 2023-06-19 * 3 * **Exercises** * Recap ``std::vector`` * :doc:`/trainings/material/soup/cxx-exercises/stl/vector` * :doc:`/trainings/material/soup/cxx-exercises/stl/filter-odd` * :doc:`/trainings/material/soup/cxx-exercises/stl/filter-greater-10` * :doc:`/trainings/material/soup/cxx-exercises/nopoly-sensor-avg/sensor-avg-nopoly` * Pull from our `Github project `__ * Implement ``AveragingSensor_nopoly`` in ``students/firstname.lastname/lib/`` * In the toplevel ``toolcase/`` directory, you'll find an implementation of ``MockSensor_nopoly`` * You will use that class in your ``AveragingSensor_nopoly``. This means that the library in your ``lib/`` directory **depends** on the library in the toplevel ``toolcase/`` directory. **Figure out how to specify that dependency to the CMake build system!** *Hint:* the CMake ``TARGET_LINK_LIBRARIES()`` function is used to specify dependencies. As an example, see your ``students/firstname.lastname/bin/CMakeLists.txt`` file where a dependency is specified for an executable that is built. You can do this for inter-library dependencies likewise. * * * 2023-06-23 * 3 * **Lab Exam** * *Work* * Clone from Github: https://github.com/jfasch/FH-ECE21-LabExam-2023-06-23.git * Prepare according to README (see Github project page) * Build as usual * Implement requirements: :doc:`/trainings/material/soup/cxx-exercises/nopoly-display-led-stripe/display-led-stripe-nopoly` * *Upload to Moodle* * Change your current working directory to *one above* the project's source root * Create a ``tar`` archive .. code-block:: console $ tar -j -c -f FH-ECE21-LabExam-2023-06-23.tar.bz2 FH-ECE21-LabExam-2023-06-23/ * Upload ``FH-ECE21-LabExam-2023-06-23.tar.bz2`` to `Moodle `__ .. attention:: Please do *not* build inside the source directory! The build tree *must not* be part of the uploaded archive If you do, this will severely influence the exam grading! Finish: Written Exam -------------------- * :doc:`exam-2023-06-30` * :doc:`exam-2023-06-30-solved`