diff --git a/CHANGELOG.md b/CHANGELOG.md index b06c1dc8b0..fc4b6c508e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Increased default RTT Timeout (retry waiting for RTT Control Block initialization) to 1000ms in `probe-rs-debugger`. (#847) - Improved when RTT is initialized/retried, and removed `rtt_timeout` from recognized options of `probe-rs-debugger`. (#850) - Refactor `probe-rs-debugger` code as per `launch` vs. `attach` changes documented in [VS Code extension PR # 12](https://github.com/probe-rs/vscode/pull/12) (#854) +- Breaking change: `probe-rs-debugger` and the associated [VSCode extension PR #21](https://github.com/probe-rs/vscode/pull/21) now uses camelCase for all `launch.json` properties (#885) ### Fixed - Detect proper USB HID interface to use for CMSIS-DAP v1 probes. Without this, CMSIS-DAP probes with multiple HID interfaces, e.g. MCUlink, were not working properly on MacOS (#722). diff --git a/debugger/src/dap_types.rs b/debugger/src/dap_types.rs index 75e808a072..ed7f6c549f 100644 --- a/debugger/src/dap_types.rs +++ b/debugger/src/dap_types.rs @@ -25,6 +25,7 @@ pub struct QuitRequest { } #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] pub struct RttChannelEventBody { pub channel_number: usize, pub channel_name: String, @@ -32,6 +33,7 @@ pub struct RttChannelEventBody { } #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] pub struct RttDataEventBody { pub channel_number: usize, /// RTT output diff --git a/debugger/src/debugger.rs b/debugger/src/debugger.rs index a83ee6c303..cfb3aa1e8a 100644 --- a/debugger/src/debugger.rs +++ b/debugger/src/debugger.rs @@ -90,6 +90,7 @@ impl std::str::FromStr for TargetSessionType { /// Shared options for all commands which use a specific probe #[derive(StructOpt, Clone, Deserialize, Debug, Default)] +#[serde(rename_all = "camelCase")] pub struct DebuggerOptions { /// Will be set when the DAP client issues a `launch` or `attach` request #[structopt(long, requires("dap"))] diff --git a/debugger/src/rtt.rs b/debugger/src/rtt.rs index 52537a4943..4fe22dff81 100644 --- a/debugger/src/rtt.rs +++ b/debugger/src/rtt.rs @@ -50,16 +50,17 @@ impl Default for DataFormat { #[derive(StructOpt, Debug, Clone, Deserialize, Default)] pub struct RttConfig { #[structopt(skip)] - #[serde(default, rename = "rtt_enabled")] + #[serde(default, rename = "rttEnabled")] pub enabled: bool, /// Configure data_format and show_timestamps for select channels #[structopt(skip)] - #[serde(default = "default_channel_formats", rename = "rtt_channel_formats")] + #[serde(default = "default_channel_formats", rename = "rttChannelFormats")] pub channels: Vec, } /// The User specified configuration for each active RTT Channel. The configuration is passed via a DAP Client configuration (`launch.json`). If no configuration is specified, the defaults will be `Dataformat::String` and `show_timestamps=false`. #[derive(StructOpt, Debug, Clone, serde::Deserialize, Default)] +#[serde(rename_all = "camelCase")] pub struct RttChannelConfig { pub channel_number: Option, pub channel_name: Option,