简体   繁体   English

GDB调试器切换平台(cortex-m3)

[英]GDB debugger switch platform (cortex-m3)

I have previously installed GDB to debug C in eclipse, which is working perfectly. 我以前已经安装了GDB来在eclipse中调试C,它运行良好。 I want to do the same now with my cortex m-3, however I can't make a binary object using GDB because it is giving me an error. 我现在想对我的皮质m-3进行同样的操作,但是我无法使用GDB生成二进制对象,因为它给我一个错误。 I want to make a binary file the following way: 我想通过以下方式制作二进制文件:

as -mcpu=cortex-m3  -mthumb   example1.s   -o example1.o 

It does not recognize my cortex-m3 and it is giving me the following error: 它无法识别我的cortex-m3,并且给了我以下错误:

 as: unrecognized option `-mcpu=cortex-m3'

When doing a version check with my GDB it says the following: 在对我的GDB进行版本检查时,它会显示以下内容:

This GDB was configured as "x86_64-w64-mingw32".

Is there a way to switch this to arm-none-eabi? 有没有办法将其切换为arm-none-eabi?

I hope someone can help me. 我希望有一个人可以帮助我。

This isn't really a question about gdb. 这不是关于gdb的真正问题。 gdb is the debugger. gdb是调试器。 as is the assembler. 和汇编器一样。

You want to build or get a cross-assembler. 您要构建或获取交叉汇编器。

Well, actually it WAS a question about the GDB, because I did not really understand how it worked. 嗯,实际上这是关于GDB的问题,因为我并不真正了解它的工作方式。 I have fixed it now. 我已经修复了。 I have moved my assembly file to the folder containing my Atollic GDB debugger for ARM processors and did the same command. 我已将程序集文件移动到包含用于ARM处理器的Atollic GDB调试器的文件夹中,并执行了相同的命令。 He interpreted the right MCPU, and the binary file has been made now. 他解释了正确的MCPU,并且二进制文件现在已制成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM