Skip to content

Commit

Permalink
Merge pull request #90 from bugadani/rtt
Browse files Browse the repository at this point in the history
Add new/missing defmt log format options
  • Loading branch information
noppej authored May 22, 2024
2 parents 9253afe + 9ff78f0 commit c666cbd
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
74 changes: 60 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -214,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": {
Expand All @@ -238,6 +240,7 @@
},
"formatOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"binaryFormat": {
"type": "string",
Expand Down Expand Up @@ -281,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"
],
Expand All @@ -296,7 +300,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",
Expand All @@ -305,12 +309,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",
Expand All @@ -323,19 +331,35 @@
"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"
},
"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,
"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`."
"description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`."
},
"logFormat": {
"type": "string",
"description": "The default format string to use for decoding defmt logs."
}
}
}
Expand Down Expand Up @@ -450,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"
Expand All @@ -465,7 +490,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",
Expand All @@ -474,12 +499,17 @@
},
"rttChannelFormats": {
"type": "array",
"description": "RTT channel configuration. Unlisted active channels will be configured with `dataFormat=String', and 'showTimestamps=true'.",
"items": {
"type": "object",
"additionalProperties": false,
"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",
Expand All @@ -492,19 +522,35 @@
"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"
},
"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,
"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`."
"description": "Enable the inclusion of defmt location information in the RTT output for `dataFormat=Defmt`."
},
"logFormat": {
"type": "string",
"description": "The default format string to use for decoding defmt logs."
}
}
}
Expand Down

0 comments on commit c666cbd

Please sign in to comment.