一般的なトラブルシューティング
cargo-embed の問題
ほとんどの cargo-embed の問題は、udev ルールが正しくインストールされていないこと
(Linux の場合)か、Embed.toml で誤ったチップ設定を選択していることに関連しているため、
その両方が正しいことを確認してください。
上記で解決しない場合は、discovery issue tracker に issue を作成できます。
あるいは、Rust Embedded matrix channel または probe-rs matrix channel にアクセスして、
そこで助けを求めることもできます。
Cargo の問題
“can’t find crate for core”
症状
Compiling volatile-register v0.1.2
Compiling rlibc v1.0.0
Compiling r0 v0.1.0
error[E0463]: can't find crate for `core`
error: aborting due to previous error
error[E0463]: can't find crate for `core`
error: aborting due to previous error
error[E0463]: can't find crate for `core`
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
Build failed, waiting for other jobs to finish...
error: Could not compile `r0`.
To learn more, run the command again with --verbose.
原因
マイクロコントローラーに対応する適切なターゲット(v2 では thumbv7em-none-eabihf、
v1 では thumbv6m-none-eabi)のインストールを忘れています。
対処法
適切なターゲットをインストールしてください。
# micro:bit v2
$ rustup target add thumbv7em-none-eabihf
# micro:bit v1
$ rustup target add thumbv6m-none-eabi