diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..1f8811b6 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM debian:12 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + cmake \ + g++ \ + make \ + libc6-dev \ + knxd-dev \ + libmosquitto-dev \ + libssl-dev \ + git \ + pkg-config \ + gdb \ + && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..c2f754b8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/cpp +{ + "name": "ebusd-dev", + "privileged" :true, + "build": { + "dockerfile": "Dockerfile", + "context": "." + }, + "mounts": [ + //this mount will only work if the device exist so please connect your adapter before running the devcontainer + { + "source": "/dev/ttyACM0", + "target": "/dev/ttyACM0", + "type": "bind" + } + ], + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools-extension-pack" + ] + } + }, + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [8888] //ebusd default port + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "gcc -v", + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..37ddf7b9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // For more information on debugging c++ code: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/src/ebusd/ebusd", + "args": [ // customize arguments as needed + "--loglevel", "debug" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + + ] +} \ No newline at end of file