What happens if you make a section in RAM for the variable? I wouldn't
think
that you'd be able to put a variable into flash at 0x1d000 (because then
it
wouldn't be "variable", right?).
Also, I'd think it would be easier to maintain using a custom linker file
rather than using command-line settings of section addresses.
Have you tried moving the .data section using something like the command
line
switch
-Wl,-Tdata,0x801100
(that, according to the avr-libc docs would move the .data section to
0x1100).
You have to add 0x800000 to the actual RAM address.
--
Ned Konz
http://bike-nomad.com
On Tuesday 23 November 2004 10:24 am, Yannick PODGORSKI wrote:
Hi,
I saw it in gcc 3.4.2 manual, there is an example.
I use --section-start=.function=0x1D000 and the section is well create.
I use __attribute__ ((section(".function"))) in front of functions and it
works :
uint16_t section_fct(void); __attribute__ ((section(".function")))
The function is well put in memory at 0x1D000
I try with variables but it doesn't work :
uint16_t var_section __attribute__ ((section(".function"))) = 0;
The linker doesn't link :-). The error is about "section type conflict".