How do I place a data at a special ram location and init it?

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

I know that
1.all global initilaized variables plased at .data section.

2. It placed at VMA at 0x00800100

3. It placed at LMA at 0x008001180

Then my program works with data section
it works with RAM because VMA is 0x0080xxxx

Then I do *.hex file it copy All data section to end
of flash because LMA 0000000118

And when program starts it copy all section from FLASH to RAM in .init3 -> do_copy_data

My External RAM starts at 0x8000 (32k) but not after 0x1100.

The question is ?

HOW DO I PLACE MY SECTION .my like .data section?

AND where can i find the start adress and size of my section to write in C my own init "do_copy_my"

Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000002 00800100 00000118 01cc
CONTENTS, ALLOC, LOAD, DATA
1 .text 00000118 00000000 00000000 0b4
CONTENTS, ALLOC, LOAD, READONLY,CODE
2 .my 00000001 00808000 00808000 01ce
CONTENTS, ALLOC, LOAD, DATA

I am writing RTOS may be someone will look at it ;-)
http://sourceforge.net/projects/...
http://irtos.sourceforge.net/