In addition, the use of an x86 BSP is desirable, as a plain old PC (and even an OLD PC, a 386 or 486 that no-one wants any more) can be used adequately. Really all that's needed is a network card and a motherboard and some RAM; the rest (graphics, disk, etc.) isn't required.
If you're interested in debugging under Linux, newer GDB versions are available (4.16/4.17 at the time of this writing). The port is easy for 68k, i960, and other CPUs, because GCC has built-in options for these. Just identify the target as XXX-vxworks, and it builds happily.
The x86 has no such built-in option (gdb 4.16 doesn't, anyway), so some hacking and porting is required.
After compilation, we'll end up with a target-specific binary: i386-wrs-vxworks-gdb.
--host: Gives the name of the host system. If it can't be auto-detected, which sometimes happens under Linux (my system of i686-pc-gnu-linux isn't recognized, but we can fake it as i486-linux, which is).
--target: Gives the name of the target system. This will be i386-wrs-vxworks, indicating the processor, system manufacturer, and OS.
--prefix: Where we want to install libraries and other information starting from. If you don't have root access, or don't want things in /usr/local (the default), use this. We redirect things to $HOME (/home for this discussion) directory.
--exec-prefix: Similar in intention; where the binaries go. The end result is ${exec-prefix}/bin; we want $HOME/bin, so $HOME is used for this as well.
The first one is for "libiberty", which is a common library containing useful subroutines, and also contains configuration information. It should have a file called "mt-vxworks5", which contains information about what files libiberty needs. No modification is necessary.
The second one is for "bfd", the object file library. This library is used by the debugger, assembler, linker, and pretty much everything else. The important file is config.bfd, which sets some variables containing the "type" of object file (COFF, AOUT, ELF, others), vector sizes, whether to generate underscores, etc. There are some vxworks entries (a29k-*-vxworks, i960-*-vxworks, m68-*-vxworks) already present, but no ix86-*-vxworks. We need to make one.
In the i[3456]86 section, add the following to make a config.bfd file that recognizes x86-vxworks as a target system:
i[3456]86-*-vxworks)
targ_defvec=i386aout_vec
targ_underscore=yes
;;
This says that we're making aout files (which is in agreement with the documentation about vxWorks and x86 BSPs available).
The third one is for "opcodes", which contains the information about opcode names and register usage. No changes are necessary.
The fourth is in "gdb", which is the main source directory. Here we need to make a lot of modifications.
Here is the configuration:
# Target: Linux running VxWorks TDEPFILES= i386-tdep.o remote-vx.o remote-vx386.o xdr_ld.o xdr_ptrace.o xdr_rdb.o TM_FILE= tm-vxi386.hvxi386.mt is also available for download.
tm-vxi386.h is a lengthy file, so we won't include it here.
remote-vx386.c is also lengthy.
regPacket.h
is included by remote-vx386.c, and contains definitions about how long
the register set is and where specific registers live in it.
==> ./configure --host=i486-linux --target=i386-wrs-vxworks --prefix=/home --exec-prefix=/home
Obviously, substitute for your host, prefix, and exec-prefix.
Wait a bit, as a lot of configuration has to go on. It should eventually terminate with some messages like this:
Created "Makefile" in /home/src/gdb-4.16 using "config/mh-linux"
You should see a binary appear in your {}/bin directory looking like this:
/home/bin/i386-wrs-vxworks-gdb
gdb is now complete.
Thanks to Casey Crellin casey@ccii.co.za for providing the necessary files and information.
Complaints to Webmaster.
Last modified Feb 01, 1999.