cancel
Showing results for 
Search instead for 
Did you mean: 

Memory mapping - running code from internal RAM

siowlim
Associate II
Posted on April 28, 2007 at 06:35

Memory mapping - running code from internal RAM

3 REPLIES 3
siowlim
Associate II
Posted on April 12, 2007 at 21:04

Hi there,

My code size is much smaller to fit into RAM. Hence, I want to ran the entire code from RAM by copying all code from Flash to RAM. I learned that I can achieve that by using adding this line, The line,

* (InRoot$$Sections). I've got the memory map configured accordingly, please refer below for details. However, the code seems to be not working properly after __main.

Can someone pleas advise. Thanks in advance.

myFlash.scf

USER_MODE 0x40000000 0x40000 ; Load Region

{

FLASH 0x40000000 ; Execution Region

{

;71x_vect.o (Vect, +First) ; Uncomment this if Vector is placed in Flash( comment the corresponding RAM Line )

71x_init.o (Init, +First)

* (InRoot$$Sections)

;* (+RO)

}

; built-in RAM = 64kBytes

RAM 0x20000000 0x10000

{

71x_vect.o (Vect, +First) ; Uncomment this if Vector is placed in RAM( comment the corresponding FLASH line )

* (+RO)

* (+RW)

* (+ZI)

}

; Heap will grow just above ZI region :

; This Symbol is exported to ''71x_init.s'' file

HEAP +0 EMPTY 0x400

{

}

; Stack Base address exported to ''71x_init.s'' file ( Top of SRAM )

STACK 0x2000F000 EMPTY -0x0

{

}

}

mohamed23
Associate II
Posted on April 22, 2007 at 16:38

Hi vibnwis,

I have the same issue with few particular programs. The execution hangs

at a decompress stage after the branch to __main and before the execution of the main(), it seems a bug/ limitation of RVDK linker.

I think that you have to escalte the issue to ARM // www.arm.com.

Rave :-Z

[ This message was edited by: Rave on 22-04-2007 20:10 ]

siowlim
Associate II
Posted on April 28, 2007 at 06:35

Hi Ravi,

You are absolutely right about the bug. ST has confirmed that is a bug, but only fixes it in MDK3.1 which is a new release. Bad news is you need pay for that, almost half of a new product.

Incidentally, why should I pay someone for the bugs he introduced.

Hope these help.