This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Supporting more than one CPU with the same gas port.
- From: James Murray <jsm at jsm-net dot demon dot co dot uk>
- To: binutils at sourceware dot org
- Cc: nick clifton <nickc at redhat dot com>
- Date: Wed, 04 Jan 2012 13:35:10 +0000
- Subject: Re: Supporting more than one CPU with the same gas port.
- References: <4F0379F1.6030901@ipdatasys.com> <4F043066.2060603@redhat.com>
On Wed, 2012-01-04 at 10:56 +0000, nick clifton wrote:
> Hi Sean,
>
> > I have a general question when it comes to supporting more than one core
> > with the same assembler(tc-x)
>
> Theoretically yes, but in practice no. Why do you want this though ?
> What is hard about having different assemblers for different architectures ?
>
What I believe Sean is specifically asking about is in relation to
Freescale embedded microcontrollers that have two distinct CPUs within
them.
The main processor is a CISC device (S12X)
The second processor is a RISC device (XGATE)
So, within one microcontroller there are two processors that use
different machine code. However, they share common RAM and peripherals
and the XGATE code starts off in the same flash space as the S12X code.
In my extension to the m68hc11 port I've added support for the XGATE
assembly language and allow the two codes to be linked together to a
single object file.
My belief is that this works, given a caveat
- you have to know which target the code was assembled for when
disassembling it and where in memory it is located.
gas and objdump use the CPU specific target
ld uses the m68hc12elf (shared) target
I felt that the linking together (sharing external variables) was a
benefit outweighing the perhaps unconventional approach.
thoughts?
regards
James Murray