Skip to content

Instantly share code, notes, and snippets.

@GtTmy
Created February 8, 2022 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GtTmy/856b31ff0b4cb111d77d3925d08a6630 to your computer and use it in GitHub Desktop.
Save GtTmy/856b31ff0b4cb111d77d3925d08a6630 to your computer and use it in GitHub Desktop.
cargo-embed と連携してデバッグするためのlaunch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "probe-rs-debug",
"request": "attach",
"name": "probe_rs Executable launch example",
"cwd": "${workspaceFolder}",
"programBinary": "${workspaceFolder}/microbit/target/thumbv7em-none-eabihf/debug/i2c", //!MODIFY
"chip": "nrf52833_xxAA", //!MODIFY
"coreIndex": 0,
"consoleLogLevel": "Info", //Error, Warn, Info, Debug, Trace
"rttEnabled": true,
"rttChannelFormats": [
{
"channelNumber": 0,
"dataFormat": "String", // Format RTT data as String data
"showTimestamps": true // Include host-side timestamps for every line of data transferred from the target RTT output
},
{
"channelNumber": 1,
"dataFormat": "BinaryLE" // Treat data as raw binary data, and do not format in any way
}
]
}
]
}
@GtTmy
Copy link
Author

GtTmy commented Feb 8, 2022

Discovery をデバッグするためのlaunch.json。RTT有効化済み。

cargo-embed をターミナルで実行してからattachしている。Embed.tomlは下記

[default.general]
chip = "nrf52833_xxAA" # uncomment this line for micro:bit V2
# chip = "nrf51822_xxAA" # uncomment this line for micro:bit V1

[default.reset]
halt_afterwards = false

[default.rtt]
enabled = false

[default.gdb]
enabled = true

@GtTmy
Copy link
Author

GtTmy commented Feb 8, 2022

ただし、警告メッセージが出る。まだ開発中だからうまく動かない?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment