Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rust 锈蚀发现,配置文件未按预期工作_Rust_Gdb_Openocd_Stm32ldiscovery_Rustdoc - Fatal编程技术网

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

Rust 锈蚀发现,配置文件未按预期工作,rust,gdb,openocd,stm32ldiscovery,rustdoc,Rust,Gdb,Openocd,Stm32ldiscovery,Rustdoc,我试图避免在每个GDB会话中输入相同的命令。为此,我已按照中的说明进行操作,但当我通过cargo run运行程序时,程序未按本书中所述运行,它会出现以下错误: ts/project/discovery/src/06-hello-world$ cargo run error: could not load Cargo configuration 我的openocd.gdb文件包含以下内容: target remote: 3333 load break main

我试图避免在每个GDB会话中输入相同的命令。为此,我已按照中的说明进行操作,但当我通过cargo run运行程序时,程序未按本书中所述运行,它会出现以下错误:

ts/project/discovery/src/06-hello-world$ cargo run
   error: could not load Cargo configuration  
我的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"
我的配置文件包含以下内容:

   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更改为此 流道=gdb多拱-q-x openocd.gdb。 因为,如果你使用的是Ubuntu18.04LTS版本,那么这个命令将作为书中提到的使用

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

注意gdb-multiarch是用于调试ARM的gdb命令 Cortex-M程序

Ubuntu 14.04和16.04

注意arm none eabi gdb是用于调试arm的gdb命令 Cortex-M程序


在闪烁STM32F3时,我们必须连接到相应的GDB服务器。它可能是arm none eabi gdb、gdb多拱或gdb。这三种你可能都得试试

现在,就您的问题而言,您必须在openocd.gdb中使用相同的参数。在我的例子中,我已经成功地使用arm none eabi gdb进行了尝试。记住,我在Windows 10上使用了锈迹