Before you go any further, you should probably have a look through the
avr-gcc mailing list archives, and possibly look at their
implementations. They have recently gone through a similar process for
the newer AVR cores with larger memories.
If you are only using 16-bit data pointers (and I agree that makes
sense, at least for most applications), then it's important that you put
the rodata section in the low part of the flash in your linker file.
What are you planning to do about function pointers? There are a few
ways to deal with this. You can either have full-size pointers, or put
vectors in the low memory so that function pointer calls are indirect.
It is somewhat of a challenge to get this working well, so that you use
vectors when needed, but don't waste the time or space when they are not
needed.
mvh.,
David
Oszkar Ambrus wrote:
Ok, thank you very much.
Then probably I'll start working on that, after adding 'calla' to the
compiler.
I'm not planning to add 20-bit data instructions to the compiler,
because that would be very hard, and mostly useless.
What I intend to do is add only tha calla and reta to support 1Mb of
code size.
What I ran into is that the msp430.c nor the msp430.md do not use an
emit_call instruction, like other architectures do.
That complicates things a lot. I do not know where to make it use a
20-bit call, if I implement that in binutils.
So I'd like to see first, that it does generate the correct assembler
code, and than add the binutils functionality.
Your help would be really appreciated,
Regards,
Oszkar
*Grant Edwards <[email protected]>*
Sent by: [email protected]
04/12/2007 05:41 PM
Please respond to
"GCC for MSP430 - http://mspgcc.sf.net" <[email protected]>
To
[email protected]
cc
Subject
Re: [Mspgcc-users] mspcgg to support MSP430X
On 2007-04-12, Oszkar Ambrus <[email protected]> wrote:
> Thank you for your answers. So actually there isn't any
> instruction generation for the MSP430X.
>
> Which version should I work on, if I want to add support for
> that? The CVS mspgcc contains mspgcc for gcc-4.1.1 as well.
>
> And how should I start working? I added the 'reta' instruction
> into the msp430.c file, but can't seem to find where to add
> 'calla'. Are there many other things that need to be changed
> (like binutils)?
I presume that new 20-bit relocation types need to be defined
and added to binutils?
> Can I get any help on this anywhere? Should I post these
> questions somewhere else? :)