Example 7–6. Copying a Section From ROM to RAM
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
;
define a section to be copied from ROM to RAM
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
.sect
".fir"
.label fir_src
fir:
<code here>
.label fir_end
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
;
copy .fir section from ROM into RAM
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
.text
STM
fir_src, AR1
RPT
#(fir_end – fir_src – 1)
MVDP
*AR1+, fir
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
;
jump to section, now in RAM
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––
CALL
fir
Linker Command File
/**************************************************/
/*
PARTIAL LINKER COMMAND FILE FOR FIR EXAMPLE
/**************************************************/
MEMORY
{
PAGE 0 :
ONCHIP :
PAGE 0 :
PROG
PAGE 1 :
DATA
}
SECTIONS
{
.text: load = PROG PAGE 0
.fir:
load = DATA PAGE 1, run ONCHIP PAGE 0
}
Specifying a Section's Runtime Address
; load address of section
; run address of section
; code for the section
; load address of section end
; get load address
; copy address to program memory
origin = 0800h,
:
origin = 02C00h, length = 0D200h
:
origin = 0800h,
*/
length = 02400h
length = 0F800h
Linker Description
7-43
Need help?
Do you have a question about the TMS320C54x and is the answer not in the manual?