Games should not be understood literally… instead these are finger exercises for the (embedded) software developer.
The following exercises are targeted:
-
GoogleTest [subdir]
-
introduction with a simple example
-
mocking
-
-
test driven development with a simple bag module
-
-
Creational
-
Structural
-
Behavioral
-
-
Patterns at heise.de and then read bottom-up
-
C++ Programming: Code patterns design (Wikibooks)…
-
and the corresponding C++ Programming book
-
Several topics concerning LLVM.
There are plenty of websites for doing some self training. My personal favourites:
Toolchain etc is taken from MSYS2.
Because my software is most of the time running on 32bit targets, MINGW32 packets are used for playing and testing
(sizeof(void *)==4
on MINGW32, while 8 on MINGW64).
More information on MSYS2 installation can be found in Clue.
Tip
|
MSYS2 installation should go to the default location c:\msys64 to make everything work smoothly.
|
# tooling
pacman -S --needed make
pacman -S --needed mingw-w64-i686-cmake mingw-w64-i686-ninja
# gcc
pacman -S --needed mingw-w64-i686-gcc mingw-w64-i686-gdb
# clang
pacman -S --needed mingw-w64-i686-clang mingw-w64-i686-compiler-rt mingw-w64-i686-lldb mingw-w64-i686-clang-analyzer mingw-w64-i686-clang-tools-extra
As an alternative VSC can be used. Not my real favorite, because every addition or change to it’s setup ends in >1h googling. But flexibility is great and there exists a load of extensions. The following is just a loose collection of topics concerning VSC.
"terminal.integrated.profiles.windows": {
"MINGW32": {
"path": "C:\\msys64\\usr\\bin\\bash.exe",
"args": [
"--login",
"-i"
],
"env": {
"MSYSTEM": "MINGW32",
"CHERE_INVOKING": "1"
}
},
},
"terminal.integrated.defaultProfile.windows": "MINGW32",
Setup for running the tests/everything under Linux should be quite simple: under
Debian install gcc-multiarch
and g++-multiarch
to get 32bit applications
(sometimes the tests need to be generated with -m32
).
Note
|
Compiling with clang is most of the times much faster: the fielddevice unittests need 60s with gcc on my machine, while it took 15s with clang. Most of clangs advantage comes from better usage of multiple cores. Don’t know, what the actual cause is, that gcc behaves "bad". |