This repository contains the debug adapter registry and the CMSIS Solution extension specific adapter template files.
📦
┣ 📂 registry shared debug adapter registry
┃ ┗ 📄 debug-adapters.yml yaml document listing all available debug adapters
┗ 📂 templates command line tool source code
┣ 📄 *.adapter.json json template for vscode launch and task definitions per debug adapter
┗ 📄 ...The adapter registry is used by CMSIS-Toolbox starting version 2.9.0 to generate <solution>+<target-type>.cbuild-run.yml files for the active target-set selected by
cbuild setup <solution> --active <target-type>[@<set>]
Available target-sets are listed by running
cbuild list target-sets <solution>
The <solution>+<target-type>.cbuild-run.yml file is then processed by the CMSIS Solution extension to generate launch.json and task.json files from the debug adapter template files.
The CI worklow validates the debugger adapter registry and templates by running linter and schema checker. Such validation steps can be reproduced in the local environment according to the following instructions.
Pre-requisite: it assumes
npmis installed in the system.
tl:dr
npm install
npm run lintInstall eslint and json/yaml plugins:
npm install --save-dev eslint eslint-plugin-jsonc eslint-plugin-yml eslint-formatter-compactLint debug adapters registry:
npx eslint --no-config-lookup --format compact --parser yaml-eslint-parser --plugin yml --ext .yml \
--rule 'yml/quotes: ["error", { prefer: "double" }]' \
--rule 'yml/indent: ["error", 2]' \
--rule 'no-trailing-spaces: "error"' \
registryLint templates:
npx eslint --no-config-lookup --format compact --parser jsonc-eslint-parser --plugin jsonc --ext .json \
--rule 'jsonc/quotes: ["error", "double"]' \
--rule 'jsonc/indent: ["error", 4]' \
--rule 'no-trailing-spaces: "error"' \
templatestl:dr
npm install
npm run schemaInstall ajv:
npm install --save-dev ajv ajv-cliCheck debug adapters registry schema:
npx ajv -s schemas/debug-adapters.schema.json -d registry/debug-adapters.yml --strict=falseCheck templates schema:
npx ajv -s schemas/templates.schema.json -d "templates/*.json" --strict=false