2024-05-27(6): Cross Development, Toolchain Installation¶
Cross Development¶
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.cppReacting upon exceptions (
try
, andcatch
)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¶
Exercise: Parse Lines From /etc/passwd
¶
Moodle submission:
Exercise definition: Exercise: Parse A Line From /etc/passwd