Thanks Salem for the reply.
I use Redboot to download the image file from the system to the target board uisng load command. Would that actual loads the command on the RAM rather than ROM. Is that the reason why the it is been specified as RAM.
And i even checked the authors linker files as well. Even he has specified as ram
Code:
ENTRY (main)
MEMORY
{
ram : ORIGIN = 0x00400000, LENGTH = 64M
rom : ORIGIN = 0x60000000, LENGTH = 16M /* Change to LENGTH = 32M for larger flash. */
}
SECTIONS
{
data : /* Initialized data. */
{
_DataStart = . ;
*(.data)
_DataEnd = . ;
} >ram
bss : /* Uninitialized data. */
{
_BssStart = . ;
*(.bss)
_BssEnd = . ;
} >ram
text : /* The actual instructions. */
{
*(.text)
} >ram
}
It makes sense why it should be rom. Salem i am not pretty sure of what u are trying to says here.
Check the map file to see what other sections there are in the image. Anything which isn't matching text, data or bss is going to start at 0.
This is is my map file
Code:
Memory Configuration
Name Origin Length Attributes
ram 0x00400000 0x04000000
rom 0x60000000 0x01000000
*default* 0x00000000 0xffffffff
Linker script and memory map
data 0x00400000 0x0
0x00400000 _DataStart = .
*(.data)
0x00400000 _DataEnd = .
bss 0x00400000 0x0
0x00400000 _BssStart = .
*(.bss)
0x00400000 _BssEnd = .
text 0x00400000 0x148
*(.text)
.text 0x00400000 0xac led.o
0x00400060 ledToggle
0x00400000 ledInit
.text 0x004000ac 0x9c blink.o
0x0040010c main
0x004000ac delay_ms
LOAD led.o
LOAD blink.o
OUTPUT(blink.exe elf32-littlearm)
....
Thanks Salem
ssharish2005