This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARMLINK PROBLEM ?

Hi,everybody!

I have a armlink question! in my project:I set R/W

BASE to 0x00080000,R/O BASE to 0x00000000 in the eval

mode.and my code as following:

   AREA Word, CODE, READONLY
        EXPORT Reset_Handler
Reset_Handler
         num EQU 20

        ENTRY
start
        LDR r0, =src
        LDR r1, =dst
block
        MOV r2, #num
wordcopy
        LDR r3, [r0], #4
        STR r3, [r1], #4
destination
        SUBS r2, r2, #1
        BNE wordcopy
stop
        B stop
        AREA BlockData, DATA, READWRITE
src DCD 1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4
dst DCD 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        END


After linking,src is set to 0x00080000,but i can't

find 1,2,3,4,.....in that address range!why?

thank you!

Parents
  • I don't work with this tool, but I would assume that the linker has placed a copy of the src constants in the read-only memory area. The startup code will then copy the initial values from the read-only area to the read-write area.

    If you think about it: Pre-initialized RAM variables can't be stored in RAM while the hw is turned off. The compiler don't believe that your read-write area is non-volatile...

Reply
  • I don't work with this tool, but I would assume that the linker has placed a copy of the src constants in the read-only memory area. The startup code will then copy the initial values from the read-only area to the read-write area.

    If you think about it: Pre-initialized RAM variables can't be stored in RAM while the hw is turned off. The compiler don't believe that your read-write area is non-volatile...

Children