gcc xram & studio problem

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

I have a problem programming with studio using gcc with external ram.

Im trying to put specific variables in xram, and leave the rest and the stack in internal.
Ive set up XRAM in the .init1 section as described in gcc doco. Im declaring the variable like this:

unsigned char extvar __attribute__ ((section (".xram")));

And the linker script in the makefle is this:
LDFLAGS = -Wl,-Map=$(TARGET).map,--cre, --section-start=.xram=0x801100

It all compiles fine, showing the .xram section to have the proper number of bytes in it. The problem is when I try to program the HEX file with studio, it says hex file will not fit into selected device. The code is tiny and this happens even when I try to put a single byte in XRAM.

Im using studio 4.08 SP1 and avrgcc 3.3.2.
Any help woud be much appreciated.

Cheers,
Peter.