gpt4 book ai didi

Rust 发现,配置文件未按预期工作

转载 作者:行者123 更新时间:2023-11-29 08:05:45 26 4
gpt4 key购买 nike

我试图避免在每个 GDB session 中输入相同的命令。为此,我遵循了 rust discovery book 中的说明。但是当我通过 cargo run 运行程序时,程序没有像书中提到的那样工作,它给出了以下错误:

ts/project/discovery/src/06-hello-world$ cargo run
error: could not load Cargo configuration
cargo run --target thumbv7em-none-eabihf
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `arm-none-eabi-gdb -q -x openocd.gdb /home/jawwad-turabi/Documents/project/discovery/target/thumbv7em-none-eabihf/debug/led-roulette`
error: could not execute process `arm-none-eabi-gdb -q -x openocd.gdb /home/jawwad-turabi/Documents/project/discovery/target/thumbv7em-none-eabihf/debug/led-roulette` (never executed)

Caused by:
No such file or directory (os error 2)

我的 openocd.gdb 文件包含这些内容:

   target remote: 3333
load
break main
continue

我的配置文件包含这些内容:

 [target.thumbv7em-none-eabihf]
runner = "arm-none-eabi-gdb -q -x openocd.gdb"
rustflags = [
"-C", "link-arg=-Tlink.x",
]
+[build]
+target = "thumbv7em-none-eabihf"

最佳答案

请将 runner = "arm-none-eabi-gdb -q -x openocd.gdb"改成这个runner = "gdb-multiarch -q -x openocd.gdb"。因为,如果您使用的是 Ubuntu 18.04 LTS 版本,那么此命令将用作本书提及。

Ubuntu 18.04 或更新版本/Debian stretch 或更新版本

NOTE gdb-multiarch is the GDB command you'll use to debug your ARM Cortex-M programs

Ubuntu 14.04 和 16.04

NOTE arm-none-eabi-gdb is the GDB command you'll use to debug your ARM Cortex-M programs

关于Rust 发现,配置文件未按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57965415/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com