 Question:
Since the .asect directive is obsolete, what do I do in its place ?
Answer: Replace the .asect line with the .sect line and modify your linker command
file. The .asect was used to specify a run address that was different than the load
address. This is now done with the linker. Here is the assembly and linker command file
with the .asect:
; assembly file
.asect ".test", 809800h ; make this the run address
.label loadaddr
start: ldi r0,r0
/* linker command file */
-m c3x.map
-o c3x.out
-w
-e start
MEMORY
{
RAM0: org = 0x00809800 len = 0x00000400
RAM1: org = 0x00809c00 len = 0x00000400
}
SECTIONS
{
.test: > RAM1
}
Here are the files without the .asect:
; assembly file
.sect ".test"
.label loadaddr
start:
ldi r0,r0
/* linker command file */
-m c3x.map
-o c3x.out
-w
-e start
MEMORY
{
RAM0: org = 0x00809800 len = 0x00000400
RAM1: org = 0x00809c00 len = 0x00000400
}
SECTIONS
{
.test: load = RAM1 run = RAM0
}
You could also use:
/* linker command file */
-m c3x.map
-o c3x.out
-w
-e start
MEMORY
{
RAM0: org = 0x00809800 len = 0x00000400
RAM1: org = 0x00809c00 len = 0x00000400
}
SECTIONS
{
.test: load = RAM1 run = 0x809800
}
|