From f3bfc8244d778aae5338c09544eab7e2f883ef2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 16 Apr 2024 22:20:05 +0200 Subject: [PATCH 1/6] Add new/missing defmt log format options --- package.json | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/package.json b/package.json index c745133..c6c9fec 100644 --- a/package.json +++ b/package.json @@ -327,6 +327,20 @@ ], "default": "String" }, + "mode": { + "type": "string", + "description": "RTT operating mode.", + "enum": [ + "NoBlockSkip", + "NoBlockTrim", + "BlockIfFull" + ], + "enumDescriptions": [ + "The target will add data to the channel only if it fits completely, otherwise it will skip the data.", + "The target will add as much data to the channel as possible, without blocking.", + "The target will block until there is enough space in the channel to add the data." + ] + }, "showTimestamps": { "type": "boolean", "default": false, @@ -336,6 +350,10 @@ "type": "boolean", "default": true, "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." + }, + "defmtLogFormat": { + "type": "string", + "description": "The default format string to use for decoding defmt logs." } } } @@ -496,6 +514,20 @@ ], "default": "String" }, + "mode": { + "type": "string", + "description": "RTT operating mode.", + "enum": [ + "NoBlockSkip", + "NoBlockTrim", + "BlockIfFull" + ], + "enumDescriptions": [ + "The target will add data to the channel only if it fits completely, otherwise it will skip the data.", + "The target will add as much data to the channel as possible, without blocking.", + "The target will block until there is enough space in the channel to add the data." + ] + }, "showTimestamps": { "type": "boolean", "default": false, @@ -505,6 +537,10 @@ "type": "boolean", "default": true, "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." + }, + "defmtLogFormat": { + "type": "string", + "description": "The default format string to use for decoding defmt logs." } } } From 8ab7cc70d49fe9b2673e7e2534e3dcc20318797a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 10 May 2024 08:34:41 +0200 Subject: [PATCH 2/6] Massage rtt config a bit --- package.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c6c9fec..e75ccc7 100644 --- a/package.json +++ b/package.json @@ -305,12 +305,16 @@ }, "rttChannelFormats": { "type": "array", + "description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.", "items": { "type": "object", + "required": [ + "channelNumber" + ], "properties": { "channelNumber": { "type": "number", - "description": "The channel number to which this data format applies. If any active channel numbers are omitted, we will assume the default will be `dataFormat=String', and 'showTimestamps=false'." + "description": "The channel number to which this data format applies." }, "dataFormat": { "type": "string", @@ -343,12 +347,10 @@ }, "showTimestamps": { "type": "boolean", - "default": false, "description": "Enable the inclusion of timestamps in the RTT output for `dataFormat=String`." }, "showLocation": { "type": "boolean", - "default": true, "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." }, "defmtLogFormat": { @@ -492,12 +494,16 @@ }, "rttChannelFormats": { "type": "array", + "description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.", "items": { "type": "object", + "required": [ + "channelNumber" + ], "properties": { "channelNumber": { "type": "number", - "description": "The channel number to which this data format applies. If any active channel numbers are omitted, we will assume the default will be `dataFormat=String', and 'showTimestamps=false'." + "description": "The channel number to which this data format applies." }, "dataFormat": { "type": "string", @@ -530,12 +536,10 @@ }, "showTimestamps": { "type": "boolean", - "default": false, "description": "Enable the inclusion of timestamps in the RTT output for `dataFormat=String`." }, "showLocation": { "type": "boolean", - "default": true, "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." }, "defmtLogFormat": { From ed9ee0ec2fe416bd4182c8309b846269f03313c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sat, 11 May 2024 09:16:53 +0200 Subject: [PATCH 3/6] Fix a few typos --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e75ccc7..4b1d43b 100644 --- a/package.json +++ b/package.json @@ -296,7 +296,7 @@ }, "svdFile": { "type": "string", - "description": "The path (relative to `cwd` or absolute) to the CMCIS-SVD file for your target core" + "description": "The path (relative to `cwd` or absolute) to the CMSIS-SVD file for your target core" }, "rttEnabled": { "type": "boolean", @@ -327,7 +327,7 @@ "enumDescriptions": [ "String (text) format.", "Binary Little Endian format.", - "Deferred formatting (see: https://defmt.ferrous-systems.com)." + "defmt (see: https://defmt.ferrous-systems.com)." ], "default": "String" }, @@ -351,7 +351,7 @@ }, "showLocation": { "type": "boolean", - "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." + "description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`." }, "defmtLogFormat": { "type": "string", @@ -485,7 +485,7 @@ }, "svdFile": { "type": "string", - "description": "The path (relative to `cwd` or absolute) to the CMCIS-SVD file for your target core" + "description": "The path (relative to `cwd` or absolute) to the CMSIS-SVD file for your target core" }, "rttEnabled": { "type": "boolean", @@ -516,7 +516,7 @@ "enumDescriptions": [ "String (text) format.", "Binary Little Endian format.", - "Deferred formatting (see: https://defmt.ferrous-systems.com)." + "defmt (see: https://defmt.ferrous-systems.com)." ], "default": "String" }, @@ -540,7 +540,7 @@ }, "showLocation": { "type": "boolean", - "description": "Enable the inclusion of Defmt location information in the RTT output for `dataFormat=Defmt`." + "description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`." }, "defmtLogFormat": { "type": "string", From d2c83362b04d0cd8d34471ebc4284dbc2d520c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sat, 11 May 2024 09:17:53 +0200 Subject: [PATCH 4/6] Remove defmt from the config key --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4b1d43b..ae0b50f 100644 --- a/package.json +++ b/package.json @@ -353,7 +353,7 @@ "type": "boolean", "description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`." }, - "defmtLogFormat": { + "logFormat": { "type": "string", "description": "The default format string to use for decoding defmt logs." } @@ -542,7 +542,7 @@ "type": "boolean", "description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`." }, - "defmtLogFormat": { + "logFormat": { "type": "string", "description": "The default format string to use for decoding defmt logs." } From 3bddbbb8dbc121e20fa54f318d68d95ef1631789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sat, 11 May 2024 09:20:06 +0200 Subject: [PATCH 5/6] Use a less verbose label, add C to languages --- .vscode/settings.json | 5 ++++- package.json | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 24499a6..8351c99 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,5 +11,8 @@ // Enable prettier format on save "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "editor.formatOnPaste": false + "editor.formatOnPaste": false, + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + } } diff --git a/package.json b/package.json index ae0b50f..92cdf15 100644 --- a/package.json +++ b/package.json @@ -107,9 +107,10 @@ "debuggers": [ { "type": "probe-rs-debug", - "label": "Debug adapter on top of probe-rs", + "label": "probe-rs Debugger", "languages": [ - "rust" + "rust", + "c" ], "configurationAttributes": { "launch": { From fbae1db66b6c61cb047af9d71586b2a87b564f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sat, 11 May 2024 12:05:09 +0200 Subject: [PATCH 6/6] Disallow additional properties --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 92cdf15..7238450 100644 --- a/package.json +++ b/package.json @@ -215,6 +215,7 @@ }, "flashingConfig": { "type": "object", + "additionalProperties": false, "description": "These options are applied when flashing one or more `program_binary` files to the target memory.", "properties": { "flashingEnabled": { @@ -239,6 +240,7 @@ }, "formatOptions": { "type": "object", + "additionalProperties": false, "properties": { "format": { "type": "string", @@ -282,6 +284,7 @@ "description": "Each MCU core has a mandatory `programBinary` as well as several other optional properties.", "items": { "type": "object", + "additionalProperties": false, "required": [ "programBinary" ], @@ -471,6 +474,7 @@ "description": "Each MCU core has a mandatory `programBinary` as well as several other optional properties.", "items": { "type": "object", + "additionalProperties": false, "properties": { "required": [ "programBinary" @@ -498,6 +502,7 @@ "description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.", "items": { "type": "object", + "additionalProperties": false, "required": [ "channelNumber" ],