Logo

Programming Linux

Quick search

Navigation

Courses

  • Courses Overview
  • Slide Material
  • How To Book
  • Log Of Past Courses

About

  • Myself: Contact, Impressum, …
  • This Site
    • OpenTraining
    • Work in Progress
      • Embedded Computing (FH Joanneum Graz)
        • Design Tools And Laboratory Engineering (2024)
        • Embedded Computing (STECE-2019)
        • Embedded Computing STECE-2020)
        • Embedded Computing (STECE-2021)
        • Embedded Computing (STECE-2022)
          • Embedded Computing 1 (STECE-2022): Summer
            • Embedded Computing 1 (STECE-2022): Syllabus
            • Embedded Computing 1 (STECE-2022): Material
              • Glühwein Trinken?
              • 2024-03-04(6): Introduction
              • 2024-03-21(6): OS Concepts, Shell, SSH
              • 2024-04-14(6): SSH, Permissions (Incl. Exercise)
              • 2024-04-17(6): Toolchain, Makefiles, CMake
              • 2024-04-22(6): CMake, Systems Programming/File-IO, Homework
              • 2024-05-06(3): Homework Recap, Exercise: Reading Sensor, Test Driven Development
              • 2024-05-13(3): Homework Recap, Cross Development Intro
              • 2024-05-27(6): Cross Development, Toolchain Installation
              • 2024-06-17(6): Container Templates
              • 2024-06-19(6): Sorting And Searching
              • 2024-06-20(3): Lab Exercise
              • 2024-06-28: Written Exam
          • Embedded Computing 2 (STECE-2022): Winter
        • Embedded Computing (STECE-2023)
      • Playground
      • Git Notes
      • Creating Screencasts
      • I2S Audio for a Kontron SMARC Module
      • Packaging this Site on PyPI
      • Seminar on “Clean Code” (2022-04-13)
      • Pointless Blinking
      • GLT 2025: systemd’s D-Bus Implementation, And Its Python asyncio Binding
      • IT-Visions TODO
      • Kajak Auf Der Donau
    • Recipes

Blog

  • Posts

2024-05-27(6): Cross Development, Toolchain Installation¶

  • Cross Development

  • Exercise: Install Cross Toolchain

  • C++ Intro: Livecoding Session

    • User’s View

  • Exercise: Parse Lines From /etc/passwd

Cross Development¶

  • Cross Development

  • CMake: Cross Build

  • Cross Toolchain Setup

Exercise: Install Cross Toolchain¶

  • Setup cross toolchain as in Cross Toolchain Setup

  • Download CMake toolchain file as in Cross Toolchain Setup

  • Build the project from the last exercise, Exercise: Reading A Sensor (Driven By Tests)

C++ Intro: Livecoding Session¶

See https://github.com/jfasch/FH-STECE2022/tree/main/livecoding/sensor-oo-c for code.

  • Morphing Exercise: Reading A Sensor (Driven By Tests) into something object-oriented, but still C

  • Introduce exception handling; this is done to overcome the weird function signature of sensor_get_temperature().

    • Causing exceptions (throw): https://github.com/jfasch/FH-STECE2022/blob/main/livecoding/sensor-oo-c/lib/sensor.cpp

    • Reacting upon exceptions (try, and catch)

      • Production code: https://github.com/jfasch/FH-STECE2022/blob/main/livecoding/sensor-oo-c/bin/read-sensor.cpp

      • Test code (attention, the logic seems somehow inverted): https://github.com/jfasch/FH-STECE2022/blob/main/livecoding/sensor-oo-c/tests/suite-sensor.cpp

User’s View¶

  • std::string

Exercise: Parse Lines From /etc/passwd¶

  • Moodle submission:

  • Exercise definition: Exercise: Parse A Line From /etc/passwd

©2019-2025 (GPLv3), Jörg Faschingbauer. | Page source