James,
Here is how I do it. The following sets the lma/vma
addresses in the script rather than in the Makefile--
> FLASHLO AT>BANK3E =0xff
The Makefile only has the objcopy flags--
OBJCOPY_FLAGS=--srec-len=0x20 --change-addresses 0xffff0000
Below are some snips of my script.
Don
---snip--
MEMORY
{
PAGE0 (rwx) : ORIGIN = 0x000000, LENGTH = 0X100
RAM (rwx) : ORIGIN = 0x000100, LENGTH = 0x2000-0X100
FLASHLO (rx) : ORIGIN = 0x004000, LENGTH = 0x4000
FLASHHI (rx) : ORIGIN = 0x00c000, LENGTH = 0X4000-0x1000
BOOT (rx) : ORIGIN = 0x00f000, LENGTH = 0x1000
BANK38 (rx) : ORIGIN = 0x0f0000, LENGTH = 0x4000
BANK39 (rx) : ORIGIN = 0x0f4000, LENGTH = 0x4000
BANK3A (rx) : ORIGIN = 0x0f8000, LENGTH = 0x4000
BANK3B (rx) : ORIGIN = 0x0fc000, LENGTH = 0x4000
BANK3C (rx) : ORIGIN = 0x100000, LENGTH = 0x4000
BANK3D (rx) : ORIGIN = 0x104000, LENGTH = 0x4000
BANK3E (rx) : ORIGIN = 0x108000, LENGTH = 0x4000
BANK3F (rx) : ORIGIN = 0x10c000, LENGTH = 0x4000-0x1000
BANK3FA (rx) : ORIGIN = 0x10f000, LENGTH = 0x1000
}
/* Setup the stack on the top of the data memory bank. */
PROVIDE (_stack = 0x2000);
SECTIONS
{
---snip---
.bank3b :
{
BinHexFastbk.o(.text .rodata)
timer/MorseCodebk.o(.text .rodata)
ScaleATD.o(.text .rodata)
DoATDbk.o(.text .rodata)
tramps3B.o(.text .rodata)
*(.bank3b)
. = ALIGN(2);
} > BANK3B =0xff
.bank3c :
{
---snip---
/* Start of text section. */
.text :
{
/* Put startup code at beginning so that _start keeps
same address. */
/* Startup code. */
KEEP (*(.install0)) /* Section should setup the stack
pointer. */
--snip--
. = ALIGN(2);
} > FLASHLO AT>BANK3E =0xff
.text_h :
{
*(.text_h) /* Bootloader; high Flash area
unbanked */
. = ALIGN(2);
} > FLASHHI AT>BANK3F =0xff
---snip--
On Friday 03 July 2009 06:00:10 am James Murray wrote:
> --- In gnu-m68hc11@yahoogroups.com, "Diego Manenti
Martins" <dmmartins@...> wrote:
> > I used it to generate a linear s-record from a paged
> > elf:
> >
> > m6811-elf-objcopy --output-target=srec --srec-len=0x20
> > --change-addresses 0xffff0000 --change-section-lma
> > .bank8=0x388000 --change-section-lma .bank9=0x398000
> > --change-section-lma .bank10=0x3a8000
> > --change-section-lma .bank11=0x3b8000
> > --change-section-lma .bank12=0x3c8000
> > --change-section-lma .bank13=0x3d8000
> > --change-section-lma .text=0x4000 --change-section-lma
> > .text_h=0xc000 --change-section-lma .vectors=0xff80
> > main.elf main.s19
> >
> > and it works! :)
> >
> > is there other way to do it?
>
> that's pretty much what I'm doing in my application and
> it works too.
>
> James
>
>
>
>
> ------------------------------------
>
> To Post a message, send it to: gnu-m68hc11@eGroups.com
>
> To Unsubscribe, send a blank message to:
> gnu-m68hc11-unsubscribe@...! Groups Links
>
>
>