Giter Site home page Giter Site logo

rgrr / playground Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.5 MB

Misc games

CMake 1.25% Makefile 0.76% C++ 50.67% Starlark 0.44% Shell 0.11% HTML 0.04% SCSS 0.05% C 41.58% Python 3.96% Assembly 1.15%
clang cmsis rtt systemview sysview segger yapicoprobe openocd pyocd

playground's Introduction

Playground

This is Hardy’s personal playground. But everyone is free to contribute.

Mirror of the repo can be found at github.

Games

Games should not be understood literally…​ instead these are finger exercises for the (embedded) software developer.

The following exercises are targeted:

Setup / Tooling

  1. setup Eclipse, cmake and clang/gcc

  2. gitlab-runner

  3. libraries

    1. STL

    2. Boost

Unittesting

  1. GoogleTest [subdir]

    1. introduction with a simple example

    2. mocking

  2. test driven development with a simple bag module

LLVM

Several topics concerning LLVM.

Self Training

There are plenty of websites for doing some self training. My personal favourites:

Setup

C/C++

Eclipse

For C/C++ experiments, Eclipse is used as IDE. For installation details refer to Clue.

MSYS2

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.
Installation
# 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

Visual Studio Code

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.

.vscode/settings.json
Adding MINGW32 to the Terminal Setup
    "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",

Linux

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

playground's People

Contributors

hardygriech-eh avatar rgrr avatar

Stargazers

 avatar

Watchers

 avatar

playground's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.