From 22a3635681be31d86c60a4c8dd7232163ae0c101 Mon Sep 17 00:00:00 2001 From: Kyle Kotowick Date: Sun, 27 Oct 2024 23:20:46 +0000 Subject: [PATCH] Add VS Code configs --- .gitignore | 2 -- .vscode/launch.json | 33 +++++++++++++++++++++++++++++++++ .vscode/tasks.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index ca11a963..8fc76fb5 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,3 @@ utils/nrf-builder/provisioner-nk3am-nrf52-1.2.2.bin utils/nrf-builder/provisioner-nk3am-nrf52-1.2.2.hex utils/nrf-builder/provisioner-nk3am-nrf52-1.2.2.zip utils/nrf-builder/test-certs/ - -.vscode/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..a27a1cb9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "USB/IP Emulator", + "cargo": { + "args": [ + "build", + "--features", + "provisioner,backend-dilithium2,backend-dilithium3,backend-dilithium5", + "--bin=usbip-runner", + ], + "filter": { + "kind": "bin", + } + }, + "preLaunchTask": "DelayedUSBIPAttach", + "program": "${cargo:program}", + "args": [ + // "--ifs", + // "${userHome}/nitrokey-usbip-ifs", + "--user-presence", + "interactive" + ], + "cwd": "${workspaceFolder}/runners/usbip", + } + ], +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..133cd11a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + "version": "2.0.0", + "tasks": [ + { + // This task waits for a few seconds before attaching + // the newly-created USB/IP adapter + "label": "DelayedUSBIPAttach", + "type": "shell", + "command": "sudo", + "args": [ + "${workspaceFolder}/runners/usbip/delayed-attach.sh" + ], + "isBackground": true, + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + }, + // All this is needed so VSCode just lets this task run in the background. + "problemMatcher": [ + { + "pattern": [ + { + "regexp": ".", + "file": 1, + "location": 2, + "message": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": ".", + "endsPattern": ".", + } + } + ], + }, + ], +} \ No newline at end of file