diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 036809d9a3c..41a55fc7988 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -5031,6 +5031,17 @@ "2.2.0": "https://raw.githubusercontent.com/conventional-changelog/conventional-changelog-config-spec/master/versions/2.2.0/schema.json" } }, + { + "name": "vhwdebugger-binding.yaml", + "description": "Configuration of the Vector CANoe hardware debugger binding", + "fileMatch": [ + "vhwdebugger-binding.yaml", + "*.vhwdebugger-binding.yaml", + "vhwdebugger-binding.yml", + "*.vhwdebugger-binding.yml" + ], + "url": "https://json.schemastore.org/vhwdebugger-binding-schema.json" + }, { "name": "vim-addon-info", "description": "vim plugin addon-info.json metadata files", diff --git a/src/negative_test/vhwdebugger-binding-schema/empty.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/empty.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/negative_test/vhwdebugger-binding-schema/float_version.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/float_version.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..40d82d6c440 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/float_version.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: 1.0 + +debuggers: + MyDebugger: + type: isystem + reset: true + run: true + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_empty_client_path.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_empty_client_path.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..1a9852c5cd1 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_empty_client_path.vhwdebugger-binding.yaml @@ -0,0 +1,11 @@ +version: '1.1' + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + run: true + gdb: + path-to-gdb-client: '' + path-to-symbol-file: symbols.elf diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_empty_symbol_path.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_empty_symbol_path.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..eead0b7e8a7 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_empty_symbol_path.vhwdebugger-binding.yaml @@ -0,0 +1,11 @@ +version: '1.1' + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + run: true + gdb: + path-to-gdb-client: gdb.exe + path-to-symbol-file: '' diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_feature_unavailable.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_feature_unavailable.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..9afeaf1539b --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_feature_unavailable.vhwdebugger-binding.yaml @@ -0,0 +1,13 @@ +version: 1.0 + +default-debugger: MyDebugger1 + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + run: true + gdb: + path-to-gdb-client: 'dummyPath/gdb.exe' + path-to-symbol-file: 'dummyPath/app.elf' diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_invalid_run.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_invalid_run.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..36c78201588 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_invalid_run.vhwdebugger-binding.yaml @@ -0,0 +1,11 @@ +version: 1.1 + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 5315 + run: false + gdb: + path-to-gdb-client: 'dummyPath/gdb.exe' + path-to-symbol-file: 'dummyPath/app.elf' diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_no_client_path.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_no_client_path.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..48c859b855f --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_no_client_path.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.1' + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + gdb: + path-to-symbol-file: symbols.elf diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_no_gdb_settings.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_no_gdb_settings.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..cf8f25deebf --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_no_gdb_settings.vhwdebugger-binding.yaml @@ -0,0 +1,8 @@ +version: '1.1' + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + run: true diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_no_run.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_no_run.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..36c78201588 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_no_run.vhwdebugger-binding.yaml @@ -0,0 +1,11 @@ +version: 1.1 + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 5315 + run: false + gdb: + path-to-gdb-client: 'dummyPath/gdb.exe' + path-to-symbol-file: 'dummyPath/app.elf' diff --git a/src/negative_test/vhwdebugger-binding-schema/gdb_no_symbol_path.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/gdb_no_symbol_path.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..1e03568ed20 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/gdb_no_symbol_path.vhwdebugger-binding.yaml @@ -0,0 +1,10 @@ +version: '1.1' + +debuggers: + MyDebugger1: + type: gdb + node: localhost + port: 1234 + run: true + gdb: + path-to-gdb-client: gdb.exe diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_bool.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_bool.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..74f80833076 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_bool.vhwdebugger-binding.yaml @@ -0,0 +1,8 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: localhost + port: 1234 + run: ABC diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..8fefecc9bbd --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.0' + +default-debugger: MyDebugger1 + +debuggers: + ABC%SDFDF: + type: isystem + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name2.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name2.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..1f5a3f73761 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_name2.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.0' + +default-debugger: MyDebugger1 + +debuggers: + '': + type: isystem + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_specific_settings.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_specific_settings.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..cf583817059 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_debugger_specific_settings.vhwdebugger-binding.yaml @@ -0,0 +1,10 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + port: 5315 + lauterbach: + pack-len: 512 + isystem: + disable-winidea-polling: true diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_default_debugger.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_default_debugger.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..70cbc94155e --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_default_debugger.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.0' + +default-debugger: + +debuggers: + MyDebugger: + type: isystem + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_lauterbach_packlen.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_lauterbach_packlen.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..404c859d0ed --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_lauterbach_packlen.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: localhost + port: 2000 + lauterbach: + pack-len: 2048 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_port.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_port.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..37f98287cca --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_port.vhwdebugger-binding.yaml @@ -0,0 +1,7 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: localhost + port: 1234567890 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_port2.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_port2.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..bcc32862796 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_port2.vhwdebugger-binding.yaml @@ -0,0 +1,7 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: localhost + port: InvalidPort diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_string.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_string.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..fde4519ec1f --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_string.vhwdebugger-binding.yaml @@ -0,0 +1,7 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: {} + port: 1234 diff --git a/src/negative_test/vhwdebugger-binding-schema/invalid_type.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/invalid_type.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..74bfdc5c7bb --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/invalid_type.vhwdebugger-binding.yaml @@ -0,0 +1,7 @@ +version: '1.0' + +debuggers: + debugger1: + type: invalid + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/no_debugger.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_debugger.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..1dc59c91670 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_debugger.vhwdebugger-binding.yaml @@ -0,0 +1,3 @@ +version: '1.1' + +debuggers: {} diff --git a/src/negative_test/vhwdebugger-binding-schema/no_debugger_list.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_debugger_list.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..e6060873679 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_debugger_list.vhwdebugger-binding.yaml @@ -0,0 +1 @@ +version: '1.0' diff --git a/src/negative_test/vhwdebugger-binding-schema/no_node.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_node.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..174a376d479 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_node.vhwdebugger-binding.yaml @@ -0,0 +1,6 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/no_object.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_object.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..947ab4f4a31 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_object.vhwdebugger-binding.yaml @@ -0,0 +1 @@ +'ABC' diff --git a/src/negative_test/vhwdebugger-binding-schema/no_port.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_port.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..7568eb39717 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_port.vhwdebugger-binding.yaml @@ -0,0 +1,6 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + node: localhost diff --git a/src/negative_test/vhwdebugger-binding-schema/no_type.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_type.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..a470b77b85e --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_type.vhwdebugger-binding.yaml @@ -0,0 +1,8 @@ +version: '1.0' + +debuggers: + debugger1: + reset: true + run: true + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/no_version.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/no_version.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..d1e9b5bc207 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/no_version.vhwdebugger-binding.yaml @@ -0,0 +1,7 @@ +debuggers: + MyDebugger1: + type: isystem + reset: true + run: true + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/unknown_setting_debugger.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/unknown_setting_debugger.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..f753f725740 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/unknown_setting_debugger.vhwdebugger-binding.yaml @@ -0,0 +1,8 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + port: 5315 + node: localhost + SomeSetting: BlaBlub diff --git a/src/negative_test/vhwdebugger-binding-schema/unknown_setting_root.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/unknown_setting_root.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..761ec45f297 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/unknown_setting_root.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.0' + +debuggers: + debugger1: + type: lauterbach + port: 5315 + node: localhost + +SomeSetting: 'ABC' diff --git a/src/negative_test/vhwdebugger-binding-schema/unsupported_version.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/unsupported_version.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..85bf0e197c2 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/unsupported_version.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '0.1' + +debuggers: + MyDebugger1: + type: isystem + reset: true + run: true + node: localhost + port: 5315 diff --git a/src/negative_test/vhwdebugger-binding-schema/wrong_version_format.vhwdebugger-binding.yaml b/src/negative_test/vhwdebugger-binding-schema/wrong_version_format.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..a3a83f27513 --- /dev/null +++ b/src/negative_test/vhwdebugger-binding-schema/wrong_version_format.vhwdebugger-binding.yaml @@ -0,0 +1,9 @@ +version: '1.2b' + +debuggers: + MyDebugger1: + type: isystem + reset: true + run: true + node: localhost + port: 5315 diff --git a/src/schemas/json/vhwdebugger-binding-schema.json b/src/schemas/json/vhwdebugger-binding-schema.json new file mode 100644 index 00000000000..9bf383e6ca4 --- /dev/null +++ b/src/schemas/json/vhwdebugger-binding-schema.json @@ -0,0 +1,510 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/vhwdebugger-binding-schema.json", + "$ref": "#/definitions/7d459/full", + "title": "Vector CANoe Hardware Debugger Binding Configuration Schema", + "type": "object", + "definitions": { + "b06cc": { + "full": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Debugger Configuration Version 1.1", + "description": "Debugger configuration for the Vector CANoe hardware debugger binding (version 1.1)", + "additionalProperties": false, + "required": ["version", "debuggers"], + "properties": { + "version": { + "title": "Version", + "description": "The version of the configuration. Controls what features are available", + "type": "string", + "const": "1.1" + }, + "default-debugger": { + "title": "Default Debugger", + "description": "The default debugger if a distributed object is not assigned explicitly. Must reference an element from the `debuggers` list", + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$" + }, + "debuggers": { + "title": "Debugger Configurations", + "description": "List of all configured debuggers. The elements' key determines the name of the debugger", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "oneOf": [ + { + "title": "Debugger Configuration (Lauterbach)", + "description": "Debugger Configuration for TRACE32 (Lauterbach)", + "type": "object", + "additionalProperties": false, + "required": ["type", "node", "port"], + "properties": { + "type": { + "title": "Debugger Connection Type", + "type": "string", + "const": "lauterbach" + }, + "reset": { + "title": "Target Reset", + "description": "Connecting to the target on measurement start will cause a target reset. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "run": { + "title": "Start Execution", + "description": "Connecting to the target on measurement start will start execution of the program. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "auto-connect": { + "title": "Auto Connect", + "description": "Automatically connects to the TRACE32 instance on measurement start.", + "type": "boolean", + "default": true, + "examples": [true, false] + }, + "node": { + "title": "Node Address", + "description": "The IP address of the node where the TRACE32 instance is running", + "type": "string", + "examples": ["localhost", "192.168.0.1"] + }, + "port": { + "title": "Node Port", + "description": "The port on which the TRACE32 instance is listening.", + "type": "integer", + "minimum": 0, + "maximum": 65535, + "examples": [5315, 20000] + }, + "lauterbach": { + "title": "Lauterbach TRACE32 Settings", + "description": "Debugger specific settings for TRACE32 (Lauterbach)", + "type": "object", + "additionalProperties": false, + "properties": { + "pack-len": { + "title": "TRACE32 Package Length", + "description": "The UDP package length. Must match the package length configured for the TRACE32 instance", + "type": "integer", + "minimum": 0, + "maximum": 1024, + "default": 1024 + } + } + } + }, + "examples": [ + { + "type": "lauterbach", + "node": "localhost", + "port": 20000 + }, + { + "type": "lauterbach", + "node": "localhost", + "port": 20000, + "run": true, + "reset": true, + "lauterbach": { + "pack-len": 512 + } + } + ] + }, + { + "title": "Debugger Configuration (iSYSTEM / TASKING)", + "description": "Debugger Configuration for WinIDEA (iSYSTEM / TASKING)", + "type": "object", + "additionalProperties": false, + "required": ["type", "node", "port"], + "properties": { + "type": { + "title": "Debugger Connection Type", + "type": "string", + "const": "isystem" + }, + "reset": { + "title": "Target Reset", + "description": "Connecting to the target on measurement start will cause a target reset. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "run": { + "title": "Start Execution", + "description": "Connecting to the target on measurement start will start execution of the program. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "auto-connect": { + "title": "Auto Connect", + "description": "Automatically connects to the winIDEA instance on measurement start.", + "type": "boolean", + "default": true, + "examples": [true, false] + }, + "node": { + "title": "Node Address", + "description": "The IP address of the node where the winIDEA instance is running", + "type": "string", + "examples": ["localhost", "192.168.0.1"] + }, + "port": { + "title": "Node Port", + "description": "The port on which the winIDEA instance is listening.", + "type": "integer", + "minimum": 0, + "maximum": 65535, + "examples": [5315, 20000] + }, + "isystem": { + "title": "iSYSTEM / TASKING winIDEA Settings", + "description": "Debugger specific settings for winIDEA (iSYSTEM / TASKING)", + "type": "object", + "additionalProperties": false, + "properties": { + "disable-winidea-polling": { + "title": "Disable winIDEA GUI Polling", + "description": "Disables the polling of the winIDEA GUI. When set to `true`, it can reduce jitter when communicating with the SIL Adapter on the target. Makes interactive work with the GUI not possible", + "type": "boolean", + "default": false + } + } + } + }, + "examples": [ + { + "type": "isystem", + "node": "localhost", + "port": 5315 + }, + { + "type": "isystem", + "node": "localhost", + "port": 5315, + "run": true, + "reset": true, + "isystem": { + "disable-winidea-polling": true + } + } + ] + }, + { + "title": "Debugger Configuration (GDB)", + "description": "Debugger Configuration for GDB", + "type": "object", + "additionalProperties": false, + "required": ["type", "node", "port", "run", "gdb"], + "properties": { + "type": { + "title": "Debugger Connection Type", + "type": "string", + "const": "gdb" + }, + "reset": { + "title": "Target Reset", + "description": "Connecting to the target on measurement start will cause a target reset. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "run": { + "title": "Start Execution", + "description": "Connecting to the target on measurement start will start execution of the program. Must always be true for GDB", + "type": "boolean", + "const": true + }, + "auto-connect": { + "title": "Auto Connect", + "description": "Automatically connects to the GDB server on measurement start.", + "type": "boolean", + "default": true, + "examples": [true, false] + }, + "node": { + "title": "Node Address", + "description": "The IP address of the node where the GDB server is running", + "type": "string", + "examples": ["localhost", "192.168.0.1"] + }, + "port": { + "title": "Node Port", + "description": "The port on which the GDB server is listening.", + "type": "integer", + "minimum": 0, + "maximum": 65535, + "examples": [5315, 20000] + }, + "gdb": { + "title": "GDB Settings", + "description": "Debugger specific settings for GDB", + "type": "object", + "additionalProperties": false, + "required": [ + "path-to-gdb-client", + "path-to-symbol-file" + ], + "properties": { + "path-to-gdb-client": { + "title": "GDB Client", + "description": "Absolute or relative path to the GDB client, which shall be used by CANoe. Path is relative to this configuration file. This is usually supplied with the compiler toolset", + "type": "string", + "minLength": 1, + "examples": [ + "gdb.exe", + "C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/bin/arm-none-eabi-gdb.exe" + ] + }, + "path-to-symbol-file": { + "title": "GDB Symbol File", + "description": "Absolute or relative path to the symbol file, which shall be used by GDB. Path is relative to this configuration file. Symbol file must match to the binary running on the target", + "type": "string", + "minLength": 1, + "examples": ["MyBinary.elf", "MyBinarySymbols.elf"] + } + } + } + }, + "examples": [ + { + "type": "gdb", + "node": "localhost", + "port": 1234, + "run": true, + "gdb": { + "path-to-gdb-client": "path/to/gdb.exe", + "path-to-symbol-file": "path/to/Symbols.elf" + } + }, + { + "type": "gdb", + "node": "localhost", + "port": 1234, + "run": true, + "reset": true, + "gdb": { + "path-to-gdb-client": "path/to/gdb.exe", + "path-to-symbol-file": "path/to/Symbols.elf" + } + } + ] + } + ] + } + } + } + } + } + }, + "a8e9a": { + "full": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Debugger Configuration Version 1.0", + "description": "Debugger configuration for the Vector CANoe hardware debugger binding (version 1.0)", + "additionalProperties": false, + "required": ["version", "debuggers"], + "properties": { + "version": { + "title": "Version", + "description": "The version of the configuration. Controls what features are available", + "type": "string", + "const": "1.0" + }, + "default-debugger": { + "title": "Default Debugger", + "description": "The default debugger if a distributed object is not assigned explicitly. Must reference an element from the `debuggers` list", + "type": "string", + "pattern": "^[-_a-zA-Z0-9]+$", + "examples": ["my-debugger", "LauterbachDebugger", "iSYSTEMDebugger"] + }, + "debuggers": { + "title": "Debugger Configurations", + "description": "List of all configured debuggers. The elements' key determines the name of the debugger", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[-_a-zA-Z0-9]+$": { + "oneOf": [ + { + "title": "Debugger Configuration (Lauterbach)", + "description": "Debugger Configuration for TRACE32 (Lauterbach)", + "type": "object", + "additionalProperties": false, + "required": ["type", "node", "port"], + "properties": { + "type": { + "title": "Debugger Connection Type", + "type": "string", + "const": "lauterbach" + }, + "reset": { + "title": "Target Reset", + "description": "Connecting to the target on measurement start will cause a target reset. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "run": { + "title": "Start Execution", + "description": "Connecting to the target on measurement start will start execution of the program. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "node": { + "title": "Node Address", + "description": "The IP address of the node where the TRACE32 instance is running", + "type": "string", + "examples": ["localhost", "192.168.0.1"] + }, + "port": { + "title": "Node Port", + "description": "The port on which the TRACE32 instance is listening.", + "type": "integer", + "minimum": 0, + "maximum": 65535, + "examples": [5315, 20000] + }, + "lauterbach": { + "title": "Lauterbach TRACE32 Settings", + "description": "Debugger specific settings for TRACE32 (Lauterbach)", + "type": "object", + "additionalProperties": false, + "properties": { + "pack-len": { + "title": "TRACE32 Package Length", + "description": "The UDP package length. Must match the package length configured for the TRACE32 instance", + "type": "integer", + "minimum": 0, + "maximum": 1024, + "default": 1024 + } + } + } + }, + "examples": [ + { + "type": "lauterbach", + "node": "localhost", + "port": 20000 + }, + { + "type": "lauterbach", + "node": "localhost", + "port": 20000, + "run": true, + "reset": true, + "lauterbach": { + "pack-len": 512 + } + } + ] + }, + { + "title": "Debugger Configuration (iSYSTEM)", + "description": "Debugger Configuration for WinIDEA (iSYSTEM / TASKING)", + "type": "object", + "additionalProperties": false, + "required": ["type", "node", "port"], + "properties": { + "type": { + "title": "Debugger Connection Type", + "type": "string", + "const": "isystem" + }, + "reset": { + "title": "Target Reset", + "description": "Connecting to the target on measurement start will cause a target reset. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "run": { + "title": "Start Execution", + "description": "Connecting to the target on measurement start will start execution of the program. Must be supported by the target", + "type": "boolean", + "default": false, + "examples": [true, false] + }, + "node": { + "title": "Node Address", + "description": "The IP address of the node where the winIDEA instance is running", + "type": "string", + "examples": ["localhost", "192.168.0.1"] + }, + "port": { + "title": "Node Port", + "description": "The port on which the winIDEA instance is listening.", + "type": "integer", + "minimum": 0, + "maximum": 65535, + "examples": [5315, 20000] + }, + "isystem": { + "title": "iSYSTEM / TASKING winIDEA Settings", + "description": "Debugger specific settings for winIDEA (iSYSTEM / TASKING)", + "type": "object", + "additionalProperties": false, + "properties": { + "disable-winidea-polling": { + "title": "Disable winIDEA GUI Polling", + "description": "Disables the polling of the winIDEA GUI. When set to `true`, it can reduce jitter when communicating with the SIL Adapter on the target. Makes interactive work with the GUI not possible", + "type": "boolean", + "default": false + } + } + } + }, + "examples": [ + { + "type": "isystem", + "node": "localhost", + "port": 5315 + }, + { + "type": "isystem", + "node": "localhost", + "port": 5315, + "run": true, + "reset": true, + "isystem": { + "disable-winidea-polling": true + } + } + ] + } + ] + } + } + } + } + } + }, + "7d459": { + "full": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Vector CANoe Hardware Debugger Binding Configuration Schema", + "description": "Schema for the debugger configuration of the Vector CANoe hardware debugger binding", + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/b06cc/full" + }, + { + "$ref": "#/definitions/a8e9a/full" + } + ] + } + } + } +} diff --git a/src/test/vhwdebugger-binding-schema/success.1.0.vhwdebugger-binding.yaml b/src/test/vhwdebugger-binding-schema/success.1.0.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..83ad932b46f --- /dev/null +++ b/src/test/vhwdebugger-binding-schema/success.1.0.vhwdebugger-binding.yaml @@ -0,0 +1,27 @@ +version: '1.0' + +default-debugger: DefaultValues + +debuggers: + DefaultValues: + type: lauterbach + node: localhost + port: 30000 + + iSYSTEM: + type: isystem + reset: true + run: true + node: localhost + port: 5315 + isystem: + disable-winidea-polling: true + + Lauterbach: + type: lauterbach + reset: false + run: true + node: localhost + port: 30000 + lauterbach: + pack-len: 123 diff --git a/src/test/vhwdebugger-binding-schema/success.1.1.vhwdebugger-binding.yaml b/src/test/vhwdebugger-binding-schema/success.1.1.vhwdebugger-binding.yaml new file mode 100644 index 00000000000..c74dba2345a --- /dev/null +++ b/src/test/vhwdebugger-binding-schema/success.1.1.vhwdebugger-binding.yaml @@ -0,0 +1,38 @@ +version: '1.1' + +default-debugger: DefaultValues + +debuggers: + DefaultValues: + type: lauterbach + node: localhost + port: 30000 + + iSYSTEM: + type: isystem + reset: true + run: true + node: localhost + port: 5315 + isystem: + disable-winidea-polling: true + + Lauterbach: + type: lauterbach + reset: false + run: true + node: localhost + port: 30000 + auto-connect: true + lauterbach: + pack-len: 123 + + GDB: + type: gdb + node: localhost + port: 1234 + run: true + auto-connect: false + gdb: + path-to-gdb-client: 'dummy/gdb.exe' + path-to-symbol-file: 'dummy/app.elf'