本帖最后由 kuaikuai2010 于 2011-1-30 17:20 编辑
在CodeSourcery g++ 编译器中默认的模式貌似是ARM指令集的,我用cortex-m3 -mthumb模式去编生成的elf文件 在gdb加载的时候出现了如下的 错误:
Administrator@PC-201101182203 /cygdrive/d/SDK/src
$ arm-none-eabi-gdb main.elf
GNU gdb (Sourcery G++ Lite 2010.09-51) 7.2.50.20100908-cvs
Copyright (C) 2010 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-mingw32 --target=arm-none-eabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>...
Reading symbols from d:\sdk\src\main.elf...done.
.gdbinit:8: Error in sourced command file:
Remote 'g' packet reply is too long: 0000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000d3000000
(gdb)
如果去掉cortex-m3 -mthumb模式,则可以正常下载,但是由于指令集不对,在jump的时候就会挂掉,所以还必须指定编译器用cortex-m3 -mthumb模式,但是又会出现上面的问题,纠结中..........
莫非CodeSourcery 的gdb还不支持cortex-m3 ?
|