c语言 - arm-none-eabi-gdb:未定义的目标命令:"sim"



我试图通过本教程学习一些有关裸机编程的信息:http://www.valvers.com/open-software/raspberry-pi/step01-bare-metal--cpt1/

编程

幸运的是,我成功地眨了眨眼...

...但是似乎我在尝试使用内置CPU模拟器时被卡住了:

zbyszek@ubuntu:~/opt/gcc-arm-none-eabi-4_7-2013q3/bin$ ./arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130913-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) target sim
Undefined target command: "sim".  Try "help target".
(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol.  For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.
List of target subcommands:
target exec -- Use an executable file as a target
target extended-remote -- Use a remote computer via a serial line
target record -- Log program while executing and replay execution from log
target record-core -- Log program while executing and replay execution from log
target remote -- Use a remote computer via a serial line
target tfile -- Use a trace file as a target

我在Stackoverflow上读了几个线程,但还没有找到解决方案。

对我来说很可能看起来很答案:https://stackoverflow.com/a/16217742/6632521

但是,GDB配置脚本具有选项-Disable-sim。这 Crosstool-NG项目默认使用此选项。大多数交叉兼容器 通过此项目Note1构建,因为它是一个相当漫长的过程 手工做。您的GDB很有可能没有 内置的模拟器。

Note1:至少,Linaro,Ubuntu,Debian和Ltib使用Crosstool-NG。我 不确定Android Suite。

但是这意味着什么?我应该手工构建使用残疾人选项的工具链-Disable-SIM吗?还是可用的某个版本包含内置模拟器?

事先感谢您的所有答案,如果有任何不便,我深表歉意,这是我在Stackoverflow上的第一个问题:(

zbyszek

您的GDB不支持内置模拟器目标:

(gdb) target sim

失败:

Undefined target command: "sim".  Try "help target".

您必须对GDB进行编译,并以配置为支持:

./configure --enable-sim

crosstool-ng配置是: CT_GDB_CROSS_SIM=y

这是一个最小的高度自动化的Baremetal Arm crosstool-ng crosstool-ng示例。

ubuntu上的默认gdb-multiarch软件包16.04没有--enable-sim

最新更新