This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MCF528x (MCFv4) support for ieee files


Hi,

I'm using Mentor Graphic's coldfire compiler (mcfccc) to generate code for
the mcf5282. The only way to get debugging information from that compiler is
to use the ieee-695 output format. To make this work with GDB I'm converting
this ieee output to coff format using m68k-coff-objcopy.

I found Bernado Innocenti/Peter Barada's coldfire patch on this mailing list
(see "[m68k] Add MCF528x (MCFv4) support" from 12 Aug 2003,
http://sources.redhat.com/ml/binutils/2003-08/msg00193.html) and applied that to the release
version 2.14 of binutils (Thanks for that patch - it's very helpful!).

However, I was still unable to convert the ieee output file to any other
format. I got a "File format not recognized" error every time I tried to read
the ieee file. I tracked the problem and found that the only problem appears to
be the missing recognition of the "5282" processor type. I tried two minor
modifications (see patch below) - and was lucky. I can now convert ieee files
for the mcf5282 to coff
format - and successfully use them in GDB. So far, the patch only works for
the mcf5282 - one could easily extend it for the other processors of the 528x
family.

Very well then. However, I'm not yet really trusting the magic I did there.
;) I need to integrate the tool in our company's make process and I'd really
be grateful for any comments before I dare to do that.
Was that all what was missing or is there more to this issue? Comments very
welcome.

Thanks,

Thorsten


diff -u binutils-2.14.origmcfpatch/bfd/archures.c
binutils-2.14/bfd/archures.c
--- binutils-2.14.origmcfpatch/bfd/archures.c	2003-10-20 09:53:35.000000000
+0200
+++ binutils-2.14/bfd/archures.c	2003-10-15 11:44:05.000000000 +0200
@@ -965,6 +965,10 @@
       arch = bfd_arch_m68k;
       number = bfd_mach_mcf5407;
       break;
+    case 5282:
+      arch = bfd_arch_m68k;
+      number = bfd_mach_mcf528x;
+      break;
 
     case 32000:
       arch = bfd_arch_we32k;
diff -u binutils-2.14.origmcfpatch/bfd/ieee.c binutils-2.14/bfd/ieee.c
--- binutils-2.14.origmcfpatch/bfd/ieee.c	2003-03-14 13:47:20.000000000
+0100
+++ binutils-2.14/bfd/ieee.c	2003-10-15 11:45:43.000000000 +0200
@@ -3704,6 +3704,7 @@
 	  case bfd_mach_mcf5206e:id = "5206e"; break;
 	  case bfd_mach_mcf5307:id = "5307";  break;
 	  case bfd_mach_mcf5407:id = "5407";  break;
+	  case bfd_mach_mcf528x:id = "5282";  break;
 	  }
 
 	if (! ieee_write_id (abfd, id))

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]