Skip to content

Open-CMSIS-Pack/debug-adapter-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debug-adapter-registry

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.


Validation

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 npm is installed in the system.

Linter

tl:dr

npm install
npm run lint

Install eslint and json/yaml plugins:

npm install --save-dev eslint eslint-plugin-jsonc eslint-plugin-yml eslint-formatter-compact

Lint 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"' \
  registry

Lint 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"' \
  templates

Schema check

tl:dr

npm install
npm run schema

Install ajv:

npm install --save-dev ajv ajv-cli

Check debug adapters registry schema:

npx ajv -s schemas/debug-adapters.schema.json -d registry/debug-adapters.yml --strict=false

Check templates schema:

npx ajv -s schemas/templates.schema.json -d "templates/*.json" --strict=false

About

Contains the debug adapter registry and adapter templates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 12