Skip to content

Instantly share code, notes, and snippets.

@ryu10
Last active November 9, 2022 04:07
Show Gist options
  • Save ryu10/2f488904564b48e7f6b010a9647b4530 to your computer and use it in GitHub Desktop.
Save ryu10/2f488904564b48e7f6b010a9647b4530 to your computer and use it in GitHub Desktop.
tasks.json for code-cupl with variable file argument
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"windows": {
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/d", "/c"
]
}
}
},
"tasks": [
{
"label": "cupl",
"type": "shell",
"command": "C:\\WinCupl\\Shared\\cupl.exe",
"args": [
"-m1lxfjnabe",
{
"value": "-u C:\\WinCupl\\Shared\\Atmel.DL",
"quoting": "escape"
},
"${file}"
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "cupltest",
"type": "shell",
"command": "C:\\WinCupl\\Shared\\cupl.exe",
"args": [
"-m1lxfjnabe",
"-s",
{
"value": "-u C:\\WinCupl\\Shared\\Atmel.DL",
"quoting": "escape"
},
"${file}"
],
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
@ryu10
Copy link
Author

ryu10 commented Nov 6, 2022

Steps:

  1. Install code-cupl VSCode extension.
  2. Read the Readme of code-cupl and create tasks.json file for your workspace.
  3. Replace the contents of tasks.json file with the code above. Adjust the paths to cupl.exe and Atmel.DL.
  4. Add the path to Fitters dir (e.g. C:\WinCupl\WinCupl\Fitters) to Windows system environment variable path. (info provided by @ja1umi)
  5. You'll need to set the compatibility mode for cupl.exe. See image below.
  6. To run the build task, focus on the *.pld file window and press Ctrl-Shift-B.

image

@ryu10
Copy link
Author

ryu10 commented Nov 6, 2022

Build: Focus on *.pld window and press Ctrl-Shift-B
Test: Focus on *.pld window and press Ctrl-Shift-P, and then select Tasks: Run Test Task

image

@ja1umi
Copy link

ja1umi commented Nov 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment