foss-for-synopsys-dwc-arc-processors / binutils-gdb

A mirror of the upstream binutils-gdb repository for ARC specific work
GNU General Public License v2.0
13 stars 10 forks source link

[GDB] Proper Build Instructions #45

Closed wrongbaud closed 4 years ago

wrongbaud commented 4 years ago

Hello,

I am trying to build gdb so that I can target an ARC CPU through OpenOCD. I am building on a Raspberry Pi and am able to comminciate with my target ARC CPU over JTAG and I would like to get a GDB instance built such that I can start stepping through the firmware. I have built the latest release on my RPi as follows:

./configure make I am able to get things to build, however when I run ./gdb/gdb I cannot select the ARC architecture, all that is available to me is ARM.

I understand that this is likely something very simple that I am not doing properly with my ./configure step - can someone please point me in the right direction I have tried the following:

./configure --enable-targets=all as well as

./configure --enable-targets=arc Neither of those results in the ability for me to properly select the ARC architecture within GDB.

I apologize for asking this question here - but it takes quite a while to build on the Pi and I have spent a fair amount of time on this tonight.

anthony-kolesov commented 4 years ago

Hi @wrongbaud ,

The command you are looking for is ./configure --enable-targets=arc-elf32 or ./configure --target=arc-elf32, the former will build with support for ARM and ARC baremetal, the latter only with support for ARC baremetal.

To quickly check if command helps, after running configure grep the config.log:

[akolesov@akolesov-z420-lnx gdb]$ grep TARGET_OBS config.log
TARGET_OBS=' arc-tdep.o arch/arc.o arc-newlib-tdep.o'
wrongbaud commented 4 years ago

Thank you! That seems to have fixed it - sorry for such a simple question