About eCos |
![]() Using the ARM Multi-ICE with GDBIntroductionFor some time now, Red Hat has been in possession of a program named the multi-ice-gdb-server, which allows GDB to communicate with the ARM Multi-ICE JTAG emulator. However a legal issue prevented the software being released. Recently though, ARM were kind enough to release a GPL friendly version of the ARM RDI headers. This has allowed Red Hat to release the sources to the multi-ice-gdb-server. The server should work with both the 1.x and 2.x versions of the ARM Multi-ICE. Note: The only supported host is Windows. Legal statusAs explained in great detail in the GNU General Public Licence, this software is supplied without warranty or guarantee of any kind. This software makes use of Dynamically Linked Libraries on Windows, to which the source code is not available. This is a known grey area of the GPL. Neither Red Hat Inc. nor ARM Ltd. may be held responsible for the obligations that the use of this software puts on you, under the terms of the GNU General Public Licence. It is your responsibility to comply with the terms of the licence. It is considered likely that under the terms of the GPL it would be a breach of the GPL to distribute this software in binary form. Hence it is provided here on an as-is basis in source form only. Downloading software for building the multi-ice-gdb-serverTo build the multi-ice-gdb-server you must first download and install several pieces of software. Most obviously you must obtain a copy of GDB, and Cygwin on which it depends. At this point you should download and install Cygwin, and download GDB, but not try to install it. You must also have installed the ARM Multi-ICE server software that came supplied with the Multi-ICE unit. Next, you should download the RDI 1.5.1 distribution from ARM. The download is available from this page. You should download and install the package in an appropriate location. Finally, you should download the multi-ice-gdb-server sources. Preparing to build the multi-ice-gdb-serverOpen a Cygwin bash shell window, create a directory to contain the sources and build directory, and change into it, e.g.: bash-2.04$ mkdir /tmp/migdb bash-2.04$ cd /tmp/migdb Unarchive the GDB sources, e.g. for GDB 5.1.1, assuming the .tar.gz file had been saved to C:\: bash-2.04$ tar -zxvf /cygdrive/c/gdb-5.1.1.tar.gz Create a GDB multi-ice source directory and unarchive the multi-ice-gdb-server sources, e.g. assuming the multi-ice-gdb-server sources were saved to C:\: bash-2.04$ cd gdb-5.1.1/gdb bash-2.04$ mkdir multi-ice bash-2.04$ cd multi-ice bash-2.04$ tar -zxvf /cygdrive/c/multi-ice-gdb.tar.gz Create a directory for building, and change to it, e.g.: bash-2.04$ mkdir /tmp/migdb/build bash-2.04$ cd /tmp/migdb/build Building the multi-ice-gdb-serverFirst configure the sources, e.g.: bash-2.04$ /tmp/migdb/gdb-5.1.1/configure -v --target arm-elf --enable-multi-ice 2>&1 | tee configure.outwhich should produce a lot of output. The configure.out file contains a copy of the output for further diagnosis if something goes wrong. If you want to build all of GDB as well, at this point type: bash-2.04$ make -w all install 2>&1 | tee make.outwhich will build and install everything into the default install location ( /usr/local/bin ). If you wish to install to a different location you should configure the sources with a different prefix. Read the GDB manual on how to do this. Alternatively to only build the minimum required for the multi-ice-gdb-server, type: bash-2.04$ make -w all-libiberty all-bfd 2>&1 | tee make.out Finally to build the multi-ice-gdb-server itself, change to the multi-ice build directory and type make, supplying the make variables MULTI_ICE_INCLUDES which should point to the location of the ARM RDI 1.5 headers, and MULTI_ICE_LIBS which should point to the location of the ARM Multi-ICE server directory, as well as the location of the GDB multi-ice directory. For example: bash-2.04$ cd gdb/multi-ice bash-2.04$ make -w MULTI_ICE_INCLUDES="-I/cygdrive/c/Rdi/Headers" \ MULTI_ICE_LIBS="-L/cygdrive/c/Multi-ICE -L/tmp/migdb/gdb-5.1.1/gdb/multi-ice -ltoolconf" 2>&1 | tee make.outNote: There may be a large number of warnings. At this point the build of the multi-ice-gdb-server should be complete. As it needs access to the Multi-ICE.dll file, it is probably easiest to copy it straight alongside the ARM Multi-ICE server software: bash-2.04$ cp -i multi-ice-gdb-server.exe /cygdrive/c/Multi-ICE bash-2.04$ cp -i /tmp/migdb/gdb-5.1.1/gdb/multi-ice/*.dll /cygdrive/c/Multi-ICE Running the multi-ice-gdb-serverConnecting to the Multi-ICE server software
eCos Thread debugging using Multi-ICENote: This functionality will not be available until eCos 2.0. Normally, the Multi-ICE (and the Multi-ICE GDB server) have no knowledge of threads which might be running on the target hardware. In the case of an eCos application, some additional support is provided. If the eCos program has been built with the "CYGHWR_HAL_ARM_ICE_THREAD_SUPPORT" option enabled (found in the eCos Configuration Tool under the ARM architecture-specific flags), then the Multi-ICE GDB server and the eCos application co-operate to provide the thread information. Note: It is also required that the following options are also enabled:
When an eCos program is built with these options, then the server will call into the program in order to obtain thread information. This can take place at any time and does not require any explicit action on the eCos application side other than being compiled with the appropriate options enabled. The GDB requests are made as anonymous function calls run transparently behind the scenes as far as the running eCos program is concerned. |