From c9155d45be7715128c4857690898d76736ea040f Mon Sep 17 00:00:00 2001 From: Marek Mioduszewski <marek.mioduszewski@wicomm.pl> Date: Tue, 7 Jul 2020 15:43:49 +0200 Subject: [PATCH] variables moved to settings.json --- cw1_template/.vscode/settings.json | 3 +++ cw1_template/.vscode/tasks.json | 17 +++++------------ cw2_template/.vscode/settings.json | 3 +++ cw2_template/.vscode/tasks.json | 17 +++++------------ cw3_template/.vscode/settings.json | 3 +++ cw3_template/.vscode/tasks.json | 17 +++++------------ cw4_template/.vscode/settings.json | 10 ++++------ cw4_template/.vscode/tasks.json | 17 +++++------------ 8 files changed, 33 insertions(+), 54 deletions(-) diff --git a/cw1_template/.vscode/settings.json b/cw1_template/.vscode/settings.json index 51accc4..8c07ffd 100644 --- a/cw1_template/.vscode/settings.json +++ b/cw1_template/.vscode/settings.json @@ -5,4 +5,7 @@ "C_Cpp.clang_format_style": "file", "C_Cpp.clang_format_fallbackStyle": "none", "editor.rulers": [90], + "nrf52SDKPath": "${workspaceFolder}/../../../", + "userName": "root", + "group": "08" } \ No newline at end of file diff --git a/cw1_template/.vscode/tasks.json b/cw1_template/.vscode/tasks.json index 4c0f50d..7f1dafa 100644 --- a/cw1_template/.vscode/tasks.json +++ b/cw1_template/.vscode/tasks.json @@ -2,18 +2,11 @@ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", - "options": { - "env": { - "nrf52SDKPath": "${workspaceFolder}/../../../", - "userName": "root", - "group": "02" - } - }, "tasks": [ { "label": "BLEtest", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", "presentation": { "reveal": "always", @@ -24,7 +17,7 @@ { "label": "readUSB", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", "presentation": { "reveal": "always", @@ -35,7 +28,7 @@ { "label": "flashNordic", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && sleep 3 && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -46,7 +39,7 @@ { "label": "flashNordicSD", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -111,7 +104,7 @@ }, "command": "make flash", "group": "build" - } + }, diff --git a/cw2_template/.vscode/settings.json b/cw2_template/.vscode/settings.json index 51accc4..8c07ffd 100644 --- a/cw2_template/.vscode/settings.json +++ b/cw2_template/.vscode/settings.json @@ -5,4 +5,7 @@ "C_Cpp.clang_format_style": "file", "C_Cpp.clang_format_fallbackStyle": "none", "editor.rulers": [90], + "nrf52SDKPath": "${workspaceFolder}/../../../", + "userName": "root", + "group": "08" } \ No newline at end of file diff --git a/cw2_template/.vscode/tasks.json b/cw2_template/.vscode/tasks.json index 4c0f50d..7f1dafa 100644 --- a/cw2_template/.vscode/tasks.json +++ b/cw2_template/.vscode/tasks.json @@ -2,18 +2,11 @@ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", - "options": { - "env": { - "nrf52SDKPath": "${workspaceFolder}/../../../", - "userName": "root", - "group": "02" - } - }, "tasks": [ { "label": "BLEtest", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", "presentation": { "reveal": "always", @@ -24,7 +17,7 @@ { "label": "readUSB", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", "presentation": { "reveal": "always", @@ -35,7 +28,7 @@ { "label": "flashNordic", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && sleep 3 && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -46,7 +39,7 @@ { "label": "flashNordicSD", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -111,7 +104,7 @@ }, "command": "make flash", "group": "build" - } + }, diff --git a/cw3_template/.vscode/settings.json b/cw3_template/.vscode/settings.json index 51accc4..8c07ffd 100644 --- a/cw3_template/.vscode/settings.json +++ b/cw3_template/.vscode/settings.json @@ -5,4 +5,7 @@ "C_Cpp.clang_format_style": "file", "C_Cpp.clang_format_fallbackStyle": "none", "editor.rulers": [90], + "nrf52SDKPath": "${workspaceFolder}/../../../", + "userName": "root", + "group": "08" } \ No newline at end of file diff --git a/cw3_template/.vscode/tasks.json b/cw3_template/.vscode/tasks.json index 4c0f50d..7f1dafa 100644 --- a/cw3_template/.vscode/tasks.json +++ b/cw3_template/.vscode/tasks.json @@ -2,18 +2,11 @@ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", - "options": { - "env": { - "nrf52SDKPath": "${workspaceFolder}/../../../", - "userName": "root", - "group": "02" - } - }, "tasks": [ { "label": "BLEtest", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", "presentation": { "reveal": "always", @@ -24,7 +17,7 @@ { "label": "readUSB", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", "presentation": { "reveal": "always", @@ -35,7 +28,7 @@ { "label": "flashNordic", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && sleep 3 && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -46,7 +39,7 @@ { "label": "flashNordicSD", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -111,7 +104,7 @@ }, "command": "make flash", "group": "build" - } + }, diff --git a/cw4_template/.vscode/settings.json b/cw4_template/.vscode/settings.json index 079af63..8c07ffd 100644 --- a/cw4_template/.vscode/settings.json +++ b/cw4_template/.vscode/settings.json @@ -4,10 +4,8 @@ }, "C_Cpp.clang_format_style": "file", "C_Cpp.clang_format_fallbackStyle": "none", - "editor.rulers": [ - 90 - ], - "files.associations": { - "cstdint": "cpp" - }, + "editor.rulers": [90], + "nrf52SDKPath": "${workspaceFolder}/../../../", + "userName": "root", + "group": "08" } \ No newline at end of file diff --git a/cw4_template/.vscode/tasks.json b/cw4_template/.vscode/tasks.json index 4c0f50d..7f1dafa 100644 --- a/cw4_template/.vscode/tasks.json +++ b/cw4_template/.vscode/tasks.json @@ -2,18 +2,11 @@ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", - "options": { - "env": { - "nrf52SDKPath": "${workspaceFolder}/../../../", - "userName": "root", - "group": "02" - } - }, "tasks": [ { "label": "BLEtest", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'hciconfig hci0 down && hciconfig hci0 up && python3.7 /root/pmk/test_bluepy.py'", "presentation": { "reveal": "always", @@ -24,7 +17,7 @@ { "label": "readUSB", "type": "shell", - "command": "ssh -p 120${group} ${userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", + "command": "ssh -p 120${config:group} ${config:userName}@153.19.49.102 -t 'minicom -D /dev/ttyACM0'", "presentation": { "reveal": "always", @@ -35,7 +28,7 @@ { "label": "flashNordic", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && sleep 3 && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --debug-mode --application /var/tmp/*.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -46,7 +39,7 @@ { "label": "flashNordicSD", "type": "shell", - "command": "scp -P 120${group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${userName}@153.19.49.102:/var/tmp && ssh -p 120${group} ${userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", + "command": "scp -P 120${config:group} pca10059/s140/armgcc/_build/nrf52840_xxaa.hex ${config:nrf52SDKPath}/components/softdevice/s140/hex/s140_nrf52_7.0.1_softdevice.hex ${config:userName}@153.19.49.102:/var/tmp && ssh -p 120${config:group} ${config:userName}@153.19.49.102 'curl http://153.19.49.102:3001/resetNRF52v2/${config:group} && nrfutil pkg generate --hw-version 52 --sd-req 0x00 --sd-id 0xCA --softdevice /var/tmp/s140_nrf52_7.0.1_softdevice.hex --debug-mode --application /var/tmp/nrf52840_xxaa.hex /var/tmp/dfu.zip && nrfutil dfu usb-serial -pkg /var/tmp/dfu.zip -p /dev/ttyACM0 -b 115200 && rm /var/tmp/*.hex'", "presentation": { "reveal": "always", @@ -111,7 +104,7 @@ }, "command": "make flash", "group": "build" - } + }, -- GitLab