Hi,

I have problems using the mspgcc with the MSP430FG4618 and extended
memory.

I think the compiler does not correctly use the extended memory (the
memory area starting from 0x10000).
As far as I understand the compiler, the assembler code should include
"calla" and "reta" instructions to call functions in the upper memory
area.
But it does instead use "call" and "ret" and jumps to 16Bit addresses
instead of 20Bit addresses.

How can I make the compiler use the upper memory area? 
I am using the actual binary on Windows "mspgcc-20080603.exe".

To be able to use the upper memory area, I made some changes in the
linker file "msp430xG4618.x". Perhaps here is something wrong, (too).

Here are the relevant lines:
MEMORY
{
  specialarea   (rx): ORIGIN = 0x10000,   LENGTH = 0xcec0
  text   (rx)       : ORIGIN = 0x3100,    LENGTH = 0xcec0
  data   (rwx)      : ORIGIN = 0x1100,    LENGTH = 0x2000
  vectors (rw)      : ORIGIN = 0xffc0,    LENGTH = 64
  bootloader(rx)    : ORIGIN = 0x0c00,     LENGTH = 1K
  infomem(rx)       : ORIGIN = 0x1000,     LENGTH = 256
  infomemnobits(rx) : ORIGIN = 0x1000,     LENGTH = 256
}
...
...
...
  .bootloader   :
  {
     PROVIDE (__boot_start = .) ;
    *(.bootloader)
    . = ALIGN(2);
    *(.bootloader.*)
  }  > bootloader

  /* specialarea.  */
  .specialarea   :
  {
     PROVIDE (__specialarea_start = .) ;
    *(.specialarea)
    . = ALIGN(2);
    *(.specialarea.*)
  }  > specialarea
...
...
...

Best Regards,
Stefan



Reply via email to