From: Mitch D. <mj...@al...> - 2000-08-17 19:21:59
|
Bryan Rittmeyer wrote: > > I have been lurking on this list for a couple days Welcome Bryan! > kernel running. However, for some reason, the GDB on my > workstation just does not want to talk to the embedded board. It's not possible to use just any version of gdb, nor an arbitrary version compiled for the SuperH. The definitive version of GDB that you should use is stored in CVS on SourceForge. > I have experimented with as > many versions of the boot/stub as I could find, including the one on > sourceforge CVS (which has some rather broken code in places), I briefly experimented with checking an earlier version of Niibe-san's gdb-sh-stub into CVS on SourceForge, but he changed the name and layout of the stub/loader to sh-ipl-g, so I abandoned it. So I would not recommend getting the stub/loader from here. Instead I would go to Niibe-san's site, here: ftp://ftp.m17n.org/pub/super-h/ > I now believe the problem is now with the GDB on the > workstation Please note there's a definite sequence of commands you must type to connect gdb on the host to the stub on the target. Look for ".gdbinit-sesh4" in the top-level of the Linux kernel source. The first few commands are those necessary to establish a connection. > since it looks like > there are three forks of the same code (CVS sh-boot, gdb-sh-stub, and > sh-ipl+g). Use sh-ipl+g. The rest are older. > I am assuming it is possible to load a kernel into an arbitrary memory > location (over the serial port) once GDB and the SH4 stub are talking? We (Greg and I) compile our kernel with "make ARCH=sh vmlinux". This is an ELF file which contains the start address of the kernel. When you transfer this file to the target, gdb uses the embedded ELF information to send it to the right location. If you wanted it to run at an alternative location, you should modify the linker script. If you wanted it to run at the standard location but be loaded into an alternate place (maybe your boot code will copy it into the right place) you should look into the ": AT ()" linker directive in the linker script. This will cause the kernel to be linked to run at one address, but GDB will load it at another. Regards, Mitch. -- mailto:mj...@al... | Certified Linux Evangelist! |